test(ananke): stabilize cooldown lifecycle assertions
This commit is contained in:
parent
efa68269c9
commit
aabcf83c5f
@ -126,7 +126,7 @@ func TestLifecycleDeepFailureMatrix(t *testing.T) {
|
||||
t.Run("startup-cooldown-reread-intent-error", func(t *testing.T) {
|
||||
cfg := lifecycleFastConfig(t)
|
||||
cfg.Startup.RequireNodeInventoryReach = false
|
||||
cfg.Startup.ShutdownCooldownSeconds = 1
|
||||
cfg.Startup.ShutdownCooldownSeconds = 5
|
||||
if err := state.WriteIntent(cfg.State.IntentPath, state.Intent{
|
||||
State: state.IntentShutdownComplete,
|
||||
Reason: "recent",
|
||||
@ -136,7 +136,7 @@ func TestLifecycleDeepFailureMatrix(t *testing.T) {
|
||||
t.Fatalf("seed cooldown intent: %v", err)
|
||||
}
|
||||
go func(intentPath string) {
|
||||
time.Sleep(150 * time.Millisecond)
|
||||
time.Sleep(2 * time.Second)
|
||||
_ = os.Remove(intentPath)
|
||||
_ = os.Mkdir(intentPath, 0o755)
|
||||
}(cfg.State.IntentPath)
|
||||
@ -150,7 +150,7 @@ func TestLifecycleDeepFailureMatrix(t *testing.T) {
|
||||
t.Run("startup-cooldown-shutdown-became-active", func(t *testing.T) {
|
||||
cfg := lifecycleFastConfig(t)
|
||||
cfg.Startup.RequireNodeInventoryReach = false
|
||||
cfg.Startup.ShutdownCooldownSeconds = 1
|
||||
cfg.Startup.ShutdownCooldownSeconds = 5
|
||||
if err := state.WriteIntent(cfg.State.IntentPath, state.Intent{
|
||||
State: state.IntentShutdownComplete,
|
||||
Reason: "recent",
|
||||
@ -160,7 +160,7 @@ func TestLifecycleDeepFailureMatrix(t *testing.T) {
|
||||
t.Fatalf("seed cooldown intent: %v", err)
|
||||
}
|
||||
go func(intentPath string) {
|
||||
time.Sleep(150 * time.Millisecond)
|
||||
time.Sleep(2 * time.Second)
|
||||
_ = state.WriteIntent(intentPath, state.Intent{
|
||||
State: state.IntentShuttingDown,
|
||||
Reason: "peer-shutdown",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user