diff --git a/go/msgpack_test.go b/go/msgpack_test.go index 2cdad6de..081be7b2 100644 --- a/go/msgpack_test.go +++ b/go/msgpack_test.go @@ -246,7 +246,14 @@ func TestPackMap(t *testing.T) { if err != nil { t.Error("err != nil") } - if bytes.Compare(b.Bytes(), []byte{0x83, 0x00, 0x01, 0x04, 0x05, 0x02, 0x03}) != 0 { + + // map ordering is no longer deterministic -- check all possible orderings :( + if bytes.Compare(b.Bytes(), []byte{0x83, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05}) != 0 && + bytes.Compare(b.Bytes(), []byte{0x83, 0x00, 0x01, 0x04, 0x05, 0x02, 0x03}) != 0 && + bytes.Compare(b.Bytes(), []byte{0x83, 0x02, 0x03, 0x00, 0x01, 0x04, 0x05}) != 0 && + bytes.Compare(b.Bytes(), []byte{0x83, 0x02, 0x03, 0x04, 0x05, 0x00, 0x01}) != 0 && + bytes.Compare(b.Bytes(), []byte{0x83, 0x04, 0x05, 0x00, 0x01, 0x02, 0x03}) != 0 && + bytes.Compare(b.Bytes(), []byte{0x83, 0x04, 0x05, 0x02, 0x03, 0x00, 0x01}) != 0 { t.Error("wrong output", b.Bytes()) } }