Skip to content

Commit

Permalink
test(runtime): fix concurrency in disruption tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hspedro committed May 2, 2024
1 parent 8b03916 commit 45b592c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions internal/adapters/runtime/kubernetes/scheduler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,12 @@ func TestMitigateDisruption(t *testing.T) {
}
}()

pdb, err := client.PolicyV1().PodDisruptionBudgets(scheduler.Name).Get(ctx, scheduler.Name, metav1.GetOptions{})
require.NoError(t, err)
require.NotNil(t, pdb)
require.Equal(t, pdb.Name, scheduler.Name)
require.Equal(t, pdb.Spec.MinAvailable.IntVal, int32(0))

time.Sleep(time.Millisecond * 100)
newValue := 100
err = kubernetesRuntime.MitigateDisruption(ctx, scheduler, newValue, 0.0)
Expand Down

0 comments on commit 45b592c

Please sign in to comment.