test: add 26.2 replay decode failure tests from live capture
29 tests generated from live 26.2 clientbound capture via tcpflow. 6076 packets captured, 35 decode failures (0.58%), 0 serverbound failures.
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
package failed_packets_test
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"testing"
|
||||
|
||||
generated "github.com/admin-else/strom/mc/proto_generated/v26_2"
|
||||
)
|
||||
|
||||
// Error: unexpected EOF
|
||||
func TestFailedPacketFE935CF2E584C649(t *testing.T) {
|
||||
p := &generated.PlayToClientPacketUpdateTime{}
|
||||
b := bytes.NewReader([]byte{0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1c, 0x1a, 0x0})
|
||||
err := p.Decode(b)
|
||||
if err == nil {
|
||||
t.Fatalf("expected decode error but got nil")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user