Browse Source

p2p: fix switch_test to account for handshake

pull/32/head
Ethan Buchman 10 years ago
committed by Jae Kwon
parent
commit
65a232bd9d
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      p2p/switch_test.go

+ 2
- 2
p2p/switch_test.go View File

@ -141,10 +141,10 @@ func TestSwitches(t *testing.T) {
// Check message on ch0 // Check message on ch0
ch0Msgs := s2.Reactors()[0].(*TestReactor).msgsReceived[byte(0x00)] 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") 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) t.Errorf("Unexpected message bytes. Wanted: %X, Got: %X", binary.BinaryBytes(ch0Msg), ch0Msgs[0].Bytes)
} }


Loading…
Cancel
Save