Compare commits

...

4 Commits

Author SHA1 Message Date
Bojan Serafimov
d4585bcb67 Fix typo 2022-05-30 16:49:38 -04:00
Bojan Serafimov
ae7b7bcf7c Run multiple times 2022-05-30 16:21:43 -04:00
Bojan Serafimov
894721c204 check more often 2022-05-30 16:17:48 -04:00
Bojan Serafimov
d7bb3d14df WIP 2022-05-30 15:39:08 -04:00
3 changed files with 32 additions and 2 deletions

View File

@@ -293,7 +293,7 @@ jobs:
# `Too long with no output` error, if a test is running for a long time.
# In that case, tests should have internal timeouts that are less than
# no_output_timeout, specified here.
no_output_timeout: 10m
no_output_timeout: 1m
environment:
- ZENITH_BIN: /tmp/zenith/bin
- POSTGRES_DISTRIB_DIR: /tmp/zenith/pg_install
@@ -354,6 +354,7 @@ jobs:
fi
fi
- run:
# TODO wait for processes to die in case of timeout?
# CircleCI artifacts are preserved one file at a time, so skipping
# this step isn't a good idea. If you want to extract the
# pageserver state, perhaps a tarball would be a better idea.

View File

@@ -1,6 +1,6 @@
//! Main entry point for the Page Server executable.
use std::{env, path::Path, str::FromStr};
use std::{env, fs::File, path::Path, process, str::FromStr, thread::sleep, time::Duration};
use tracing::*;
use anyhow::{bail, Context, Result};
@@ -276,6 +276,22 @@ fn start_pageserver(conf: &'static PageServerConf, daemonize: bool) -> Result<()
let remote_index = tenant_mgr::init_tenant_mgr(conf)?;
// Create file and frequently check if it's still here
thread_mgr::spawn(
ThreadKind::HttpEndpointListener,
None,
None,
"http_endpoint_thread",
true,
move || {
File::create("delete-me.txt").expect("FFFF failed creating file");
loop {
File::open("delete-me.txt").expect("FFFF cannot find file");
sleep(Duration::from_millis(1));
}
},
)?;
// Spawn a new thread for the http endpoint
// bind before launching separate thread so the error reported before startup exits
let auth_cloned = auth.clone();

View File

@@ -0,0 +1,13 @@
import pytest
import os
import time
from fixtures.zenith_fixtures import ZenithEnvBuilder
@pytest.mark.parametrize('iteration', list(range(100)))
def test_timeout(zenith_env_builder: ZenithEnvBuilder, test_output_dir: str, iteration: int):
env = zenith_env_builder.init_start()
# Sleep long enough with no output so CI step times out
time.sleep(1000)