Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

Commit

Permalink
p2p: fix switch_test to account for handshake
Browse files Browse the repository at this point in the history
  • Loading branch information
ebuchman authored and jaekwon committed Mar 19, 2015
1 parent 4abca6e commit 65a232b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions p2p/switch_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,10 @@ func TestSwitches(t *testing.T) {

// Check message on ch0
ch0Msgs := s2.Reactors()[0].(*TestReactor).msgsReceived[byte(0x00)]
if len(ch0Msgs) != 1 {
if len(ch0Msgs) != 2 {
t.Errorf("Expected to have received 1 message in ch0")
}
if !bytes.Equal(ch0Msgs[0].Bytes, binary.BinaryBytes(ch0Msg)) {
if !bytes.Equal(ch0Msgs[1].Bytes, binary.BinaryBytes(ch0Msg)) {
t.Errorf("Unexpected message bytes. Wanted: %X, Got: %X", binary.BinaryBytes(ch0Msg), ch0Msgs[0].Bytes)
}

Expand Down

0 comments on commit 65a232b

Please sign in to comment.