Skip to content

Commit

Permalink
Small adjustments to tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jnmoyne committed Feb 5, 2023
1 parent 58561c5 commit 1435b8e
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion kv_test.go
Expand Up @@ -289,7 +289,22 @@ func TestKeyValueSourcing(t *testing.T) {
}

// Wait half a second to make sure it has time to populate the stream from it's sources
time.Sleep(20 * time.Millisecond)
i := 0
for {
status, err := kvC.Status()
if err != nil {
t.Fatalf("Error getting bucket status: %v", err)
}
if status.Values() == 2 {
break
} else {
i++
if i > 3 {
t.Fatalf("Error sourcing bucket does not contain the expected number of values")
}
}
time.Sleep(20 * time.Millisecond)
}

if _, err := kvC.Get("keyA"); err != nil {
t.Fatalf("Got error getting keyA from C: %v", err)
Expand Down

0 comments on commit 1435b8e

Please sign in to comment.