Skip to content

Commit 5ae5e58

Browse files
committed
Wait before testing
Signed-off-by: joshvanl <[email protected]>
1 parent 5745bb4 commit 5ae5e58

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

tests/apps/scheduler/app.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,14 @@ func main() {
4545
mux.HandleFunc("/healthz", func(w http.ResponseWriter, r *http.Request) {})
4646

4747
go func() {
48+
log.Printf("Waiting for registration call...")
49+
select {
50+
case <-regCh:
51+
log.Printf("Registration call received")
52+
case <-ctx.Done():
53+
log.Printf("Context done while waiting for registration call")
54+
return
55+
}
4856
register(ctx)
4957
}()
5058

tests/e2e/standalone/scheduler_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ func TestSchedulerList(t *testing.T) {
5555
t.Log(err)
5656
}()
5757

58+
time.Sleep(time.Second * 10)
59+
5860
require.EventuallyWithT(t, func(c *assert.CollectT) {
5961
output, err := cmdSchedulerList()
6062
require.NoError(t, err)

0 commit comments

Comments
 (0)