test: fix test fallout from notify push
@@ -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()
@@ -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()
}
