Skip to content

Commit

Permalink
wait for CSI
Browse files Browse the repository at this point in the history
  • Loading branch information
sauterp committed Feb 20, 2024
1 parent 56bbe4c commit 90c77b7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 5 additions & 0 deletions internal/integ/cluster/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"fmt"
"log/slog"
"os"
"time"

"github.com/exoscale/exoscale/csi-driver/internal/integ/flags"

Expand Down Expand Up @@ -150,5 +151,9 @@ func Setup() error {
}
}

// give the CSI some time to become ready
// TODO find a more appropriate way to do this.
time.Sleep(30 * time.Second)

return nil
}
4 changes: 1 addition & 3 deletions internal/integ/integ_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ func TestMain(m *testing.M) {
exitCode = 1
}

time.Sleep(time.Minute)

if err == nil {
exitCode = m.Run()
}
Expand Down Expand Up @@ -65,7 +63,7 @@ func awaitExpectation(t *testing.T, expected interface{}, get getFunc) {
for i := 0; i < 10; i++ {
actual = get()

time.Sleep(5 * time.Second)
time.Sleep(10 * time.Second)

if assert.ObjectsAreEqualValues(expected, actual) {
break
Expand Down

0 comments on commit 90c77b7

Please sign in to comment.