mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-08 05:52:55 +00:00
tests: turn on safekeeper eviction by default (#8352)
## Problem Ahead of enabling eviction in the field, where it will become the normal/default mode, let's enable it by default throughout our tests in case any issues become visible there. ## Summary of changes - Make default `extra_opts` for safekeepers enable offload & deletion - Set low timeouts in `extra_opts` so that tests running for tens of seconds have a chance to hit some of these background operations.
This commit is contained in:
@@ -4077,6 +4077,22 @@ class Safekeeper(LogUtils):
|
||||
self.id = id
|
||||
self.running = running
|
||||
self.logfile = Path(self.data_dir) / f"safekeeper-{id}.log"
|
||||
|
||||
if extra_opts is None:
|
||||
# Testing defaults: enable everything, and set short timeouts so that background
|
||||
# work will happen during short tests.
|
||||
# **Note**: Any test that explicitly sets extra_opts will not get these defaults.
|
||||
extra_opts = [
|
||||
"--enable-offload",
|
||||
"--delete-offloaded-wal",
|
||||
"--partial-backup-timeout",
|
||||
"10s",
|
||||
"--control-file-save-interval",
|
||||
"1s",
|
||||
"--eviction-min-resident",
|
||||
"10s",
|
||||
]
|
||||
|
||||
self.extra_opts = extra_opts
|
||||
|
||||
def start(
|
||||
|
||||
Reference in New Issue
Block a user