forked from fl00r/go-tarantool-1.6
-
Notifications
You must be signed in to change notification settings - Fork 60
Closed
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers
Description
Reproducer:
func TestNewStream_Many(t *testing.T) {
test_helpers.SkipIfStreamsUnsupported(t)
conn := test_helpers.ConnectWithValidation(t, server, opts)
defer conn.Close()
for i := 0; i < 256; i++ {
stream, _ := conn.NewStream()
req := NewPingRequest()
_, err := stream.Do(req).Get()
if err != nil {
t.Fatalf("Failed to Ping: %s", err.Error())
}
}
}
Result:
Failed to Ping: Invalid MsgPack - packet header (0x14)
Most likely the reason is an incorrect conversion to bytes of a stream id value:
Line 549 in 8b58928
hBytes = append(hBytes, KeyStreamId, byte(streamId)) |
You can compare it with the code above:
Lines 544 to 546 in 8b58928
KeySync, 0xce, | |
byte(reqid >> 24), byte(reqid >> 16), | |
byte(reqid >> 8), byte(reqid), |
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers