Is your feature request related to a problem? Please describe.
ShutdownManager.CHECK_PERIOD_MS is hard-coded to 250 ms. In env-per-test setups this dominates wall-time customer measured shutdown p50 = 506 ms (stock) vs 7 ms (after locally patching the constant).
Reproduced internally at ~257 ms/test.
Describe the solution you'd like
Either a builder option (WorkerFactoryOptions / TestEnvironmentOptions#setShutdownCheckInterval(Duration)) or, as a lighter first step, a system property like temporal.worker.shutdownCheckPeriodMs
Describe alternatives you've considered
- One env per test class customer hit test-isolation issues.
- Lowering the default for everyone might not be suitable for production shutdowns.
Additional context
private static final int CHECK_PERIOD_MS = 250
Is your feature request related to a problem? Please describe.
ShutdownManager.CHECK_PERIOD_MS is hard-coded to 250 ms. In env-per-test setups this dominates wall-time customer measured shutdown p50 = 506 ms (stock) vs 7 ms (after locally patching the constant).
Reproduced internally at ~257 ms/test.
Describe the solution you'd like
Either a builder option (WorkerFactoryOptions / TestEnvironmentOptions#setShutdownCheckInterval(Duration)) or, as a lighter first step, a system property like temporal.worker.shutdownCheckPeriodMs
Describe alternatives you've considered
Additional context
private static final int CHECK_PERIOD_MS = 250