mirror of
https://github.com/neondatabase/neon.git
synced 2026-06-04 22:10:39 +00:00
WIP
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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(10));
|
||||
}
|
||||
},
|
||||
)?;
|
||||
|
||||
// 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();
|
||||
|
||||
11
test_runner/batch_others/test_ci.py
Normal file
11
test_runner/batch_others/test_ci.py
Normal file
@@ -0,0 +1,11 @@
|
||||
import pytest
|
||||
import os
|
||||
import time
|
||||
|
||||
from fixtures.zenith_fixtures import ZenithEnvBuilder
|
||||
|
||||
def test_timeout(zenith_env_builder: ZenithEnvBuilder, test_output_dir: str):
|
||||
env = zenith_env_builder.init_start()
|
||||
|
||||
# Sleep long enough with no output so CI step times out
|
||||
time.sleep(1000)
|
||||
Reference in New Issue
Block a user