From 65a232bd9d22cb24431acad01c1447bff8bae66e Mon Sep 17 00:00:00 2001 From: Ethan Buchman Date: Tue, 17 Mar 2015 22:20:30 -0700 Subject: [PATCH] p2p: fix switch_test to account for handshake --- p2p/switch_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/p2p/switch_test.go b/p2p/switch_test.go index 9f2106c81..80a5a5794 100644 --- a/p2p/switch_test.go +++ b/p2p/switch_test.go @@ -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) }