Destroy all contexts before waiting in integration test cleanup
@@ -124,7 +124,9 @@ func destroyAndWait(t *testing.T, ctxs []*scheduler.Context) {
for _, ctx := range ctxs {
err := schedulerDriver.Destroy(ctx, nil)
require.NoError(t, err, "Error destroying ctx: %+v", ctx)
- err = schedulerDriver.WaitForDestroy(ctx)
+ }
+ for _, ctx := range ctxs {
+ err := schedulerDriver.WaitForDestroy(ctx)
require.NoError(t, err, "Error waiting for destroy of ctx: %+v", ctx)
_, err = schedulerDriver.DeleteVolumes(ctx)
require.NoError(t, err, "Error deleting volumes in ctx: %+v", ctx)
