Skip to content

Commit

Permalink
pstoremanager: fix flaky TestClose (#1649)
Browse files Browse the repository at this point in the history
  • Loading branch information
marten-seemann committed Aug 9, 2022
1 parent b845164 commit eb77ba4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion p2p/host/pstoremanager/pstoremanager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ func TestReconnect(t *testing.T) {
}

func TestClose(t *testing.T) {
t.Parallel()
ctrl := gomock.NewController(t)
defer ctrl.Finish()
eventBus := eventbus.NewBus()
Expand All @@ -98,6 +97,7 @@ func TestClose(t *testing.T) {
// make sure the event is sent before we close
select {
case <-sub.Out():
time.Sleep(100 * time.Millisecond) // make sure this event is also picked up by the pstoremanager
case <-time.After(5 * time.Second):
t.Fatalf("Hit timeout")
}
Expand Down

0 comments on commit eb77ba4

Please sign in to comment.