mirror of
https://github.com/fluencelabs/tendermint
synced 2025-04-25 06:42:16 +00:00
p2p: fix switch_test to account for handshake
This commit is contained in:
parent
4abca6e963
commit
65a232bd9d
@ -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…
x
Reference in New Issue
Block a user