Skip to content
Snippets Groups Projects
Unverified Commit ee32dd7f authored by Luca Bruno's avatar Luca Bruno
Browse files

sdjournal: fix a race in GetEntry test

Hard-sleep instead of waiting for a journal event.
This fixes a race due to waiting for any events but enumerating only
matching ones.
parent a5232356
No related branches found
No related tags found
No related merge requests found
......@@ -204,10 +204,7 @@ func TestJournalGetEntry(t *testing.T) {
t.Fatalf("Error writing to journal: %s", err)
}
r := j.Wait(time.Duration(1) * time.Second)
if r < 0 {
t.Fatalf("Error waiting to journal")
}
time.Sleep(time.Duration(1) * time.Second)
n, err := j.Next()
if err != nil {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment