diff --git a/Makefile b/Makefile index 52b0ad2be5..777e38400c 100644 --- a/Makefile +++ b/Makefile @@ -83,7 +83,7 @@ deflake: ## Run randomized, racing tests until the test fails to catch flakes --randomize-all \ --until-it-fails \ -v \ - ./pkg/... + ./pkg/controllers/state/... vulncheck: ## Verify code vulnerabilities @govulncheck ./pkg/... diff --git a/pkg/controllers/state/suite_test.go b/pkg/controllers/state/suite_test.go index ec047339c8..937f2ca745 100644 --- a/pkg/controllers/state/suite_test.go +++ b/pkg/controllers/state/suite_test.go @@ -1474,17 +1474,25 @@ var _ = Describe("Consolidated State", func() { cluster.MarkUnconsolidated() Expect(cluster.ConsolidationState()).ToNot(Equal(state)) }) - It("should update the consolidated value when consolidation timeout (5m) has passed and state hasn't changed", func() { + It("should update the consolidated value when state timeout (5m) has passed and state hasn't changed", func() { + fmt.Println(fakeClock.Now()) state := cluster.ConsolidationState() + fmt.Printf("Initial state: %v\n", state) fakeClock.Step(time.Minute) - Expect(cluster.ConsolidationState()).To(Equal(state)) + initial := cluster.ConsolidationState() + fmt.Printf("After moving a minute: %v\n", initial) + Expect(initial).To(Equal(state)) fakeClock.Step(time.Minute * 2) - Expect(cluster.ConsolidationState()).To(Equal(state)) + initial2 := cluster.ConsolidationState() + fmt.Printf("After moving two minutes: %v\n", initial2) + Expect(initial2).To(Equal(state)) fakeClock.Step(time.Minute * 2) - Expect(cluster.ConsolidationState()).ToNot(Equal(state)) + initial3 := cluster.ConsolidationState() + fmt.Printf("After moving two more minutes: %v\n", initial3) + Expect(initial3).ToNot(Equal(state)) }) It("should cause consolidation state to change when a NodePool is updated", func() { cluster.MarkUnconsolidated()