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