Skip to content

Commit

Permalink
test: fix test fallout from notify push
Browse files Browse the repository at this point in the history
  • Loading branch information
Stebalien committed Jul 4, 2019
1 parent 3a41aa0 commit 4c28cc7
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions p2p/host/basic/basic_host_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,8 @@ func TestHostProtoPreference(t *testing.T) {
t.Fatal(err)
}

// XXX: This is racy now that we push protocol updates. If this tests
// fails, try allowing both protoOld and protoMinor.
assertWait(t, connectedOn, protoOld)

s2.Close()
Expand All @@ -218,6 +220,12 @@ func TestHostProtoPreference(t *testing.T) {
t.Fatal(err)
}

// Force a lazy handshake as we may have received a protocol update by this point.
_, err = s3.Write([]byte("hello"))
if err != nil {
t.Fatal(err)
}

assertWait(t, connectedOn, protoMinor)
s3.Close()
}
Expand Down

0 comments on commit 4c28cc7

Please sign in to comment.