summaryrefslogtreecommitdiffhomepage
path: root/test/packetimpact/tests
diff options
context:
space:
mode:
authorEyal Soha <eyalsoha@google.com>2020-04-24 15:02:33 -0700
committergVisor bot <gvisor-bot@google.com>2020-04-24 15:04:03 -0700
commit3d860530a904004aea5bc95e6331b3b11cec1877 (patch)
tree8eccdfef2a5d51f4b94324558978c33b2d6ddbb5 /test/packetimpact/tests
parentd5776be3fbcc9e71c449b7b41786929734ce47e2 (diff)
Better error message from ExpectFrame
Display the errors as diffs between the expected and wanted frame. PiperOrigin-RevId: 308333271
Diffstat (limited to 'test/packetimpact/tests')
-rw-r--r--test/packetimpact/tests/fin_wait2_timeout_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/packetimpact/tests/fin_wait2_timeout_test.go b/test/packetimpact/tests/fin_wait2_timeout_test.go
index b98594f94..99dc77f9a 100644
--- a/test/packetimpact/tests/fin_wait2_timeout_test.go
+++ b/test/packetimpact/tests/fin_wait2_timeout_test.go
@@ -61,8 +61,8 @@ func TestFinWait2Timeout(t *testing.T) {
t.Fatalf("expected a RST packet within a second but got none: %s", err)
}
} else {
- if _, err := conn.Expect(tb.TCP{Flags: tb.Uint8(header.TCPFlagRst)}, 10*time.Second); err == nil {
- t.Fatalf("expected no RST packets within ten seconds but got one: %s", err)
+ if got, err := conn.Expect(tb.TCP{Flags: tb.Uint8(header.TCPFlagRst)}, 10*time.Second); got != nil || err == nil {
+ t.Fatalf("expected no RST packets within ten seconds but got one: %s", got)
}
}
})