File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
enterprise/coderd/prebuilds Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -688,7 +688,8 @@ func TestSkippingHardLimitedPresets(t *testing.T) {
688
688
clock := quartz .NewMock (t )
689
689
ctx := testutil .Context (t , testutil .WaitShort )
690
690
cfg := codersdk.PrebuildsConfig {
691
- FailureHardLimit : serpent .Int64 (tc .hardLimit ),
691
+ FailureHardLimit : serpent .Int64 (tc .hardLimit ),
692
+ ReconciliationBackoffInterval : 0 ,
692
693
}
693
694
logger := slogtest .Make (
694
695
t , & slogtest.Options {IgnoreErrors : true },
@@ -731,8 +732,9 @@ func TestSkippingHardLimitedPresets(t *testing.T) {
731
732
workspaceCount := len (workspaces )
732
733
require .Equal (t , 1 , workspaceCount )
733
734
734
- // Advance clock to bypass backoff mechanisms
735
- clock .Advance (time .Second ).MustWait (ctx )
735
+ // We simulate a failed prebuild in the test; Consequently, the backoff mechanism is triggered when ReconcileAll is called.
736
+ // Even though ReconciliationBackoffInterval is set to zero, we still need to advance the clock by at least one nanosecond.
737
+ clock .Advance (time .Nanosecond ).MustWait (ctx )
736
738
737
739
// Trigger reconciliation to attempt creating a new prebuild
738
740
// The outcome depends on whether the hard limit has been reached
You can’t perform that action at this time.
0 commit comments