mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-16 09:52:54 +00:00
fix test_gc_cutoff test
Also improve it so it fails earlier if something is not working because otherwise it was failing because of the timeout. And if timeout was big enough test can even pass
This commit is contained in:
@@ -538,9 +538,7 @@ impl Tenant {
|
||||
// We're ready for business.
|
||||
// Change to active state under the hood spawns background loops
|
||||
// The loops will shut themselves down when they notice that the tenant is inactive.
|
||||
self.set_state(TenantState::Active {
|
||||
background_jobs_running: true,
|
||||
});
|
||||
self.activate(true);
|
||||
|
||||
info!("Done");
|
||||
|
||||
@@ -777,9 +775,7 @@ impl Tenant {
|
||||
// We're ready for business.
|
||||
// Change to active state under the hood spawns background loops
|
||||
// The loops will shut themselves down when they notice that the tenant is inactive.
|
||||
self.set_state(TenantState::Active {
|
||||
background_jobs_running: true,
|
||||
});
|
||||
self.activate(true);
|
||||
|
||||
info!("Done");
|
||||
|
||||
|
||||
@@ -307,10 +307,11 @@ pub fn create_tenant(
|
||||
hash_map::Entry::Vacant(v) => {
|
||||
let wal_redo_manager = Arc::new(PostgresRedoManager::new(conf, tenant_id));
|
||||
create_tenant_files(conf, tenant_conf, tenant_id)?;
|
||||
// TODO review, created in active state immediately, is it correctly?
|
||||
// create tenant in Active state so it is possible to issue create_timeline
|
||||
// request. Which on timeline activation will trigger tenant activation
|
||||
let tenant = Arc::new(Tenant::new(
|
||||
TenantState::Active {
|
||||
background_jobs_running: true,
|
||||
background_jobs_running: false,
|
||||
},
|
||||
conf,
|
||||
tenant_conf,
|
||||
|
||||
Reference in New Issue
Block a user