summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorZeling Feng <zeling@google.com>2020-12-01 18:52:02 -0800
committergVisor bot <gvisor-bot@google.com>2020-12-01 18:53:57 -0800
commitaa419cef4b0189d0dbe739e65553482a135cd5d1 (patch)
tree74e94ea7f24345bcfea0dcf05695255eb1a21d92
parentc140b0c4934dd670b3b103f17c4efcaadff5453e (diff)
Avoid wrong error messages
Stop showing wrong timeout values in packetimpact test error messages. e.g. "got frames ... want ... during -123ms" PiperOrigin-RevId: 345144938
-rw-r--r--test/packetimpact/testbench/connections.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/packetimpact/testbench/connections.go b/test/packetimpact/testbench/connections.go
index 266a8601c..50b9ccf68 100644
--- a/test/packetimpact/testbench/connections.go
+++ b/test/packetimpact/testbench/connections.go
@@ -598,7 +598,7 @@ func (conn *Connection) ExpectFrame(t *testing.T, layers Layers, timeout time.Du
var errs error
for {
var gotLayers Layers
- if timeout = time.Until(deadline); timeout > 0 {
+ if timeout := time.Until(deadline); timeout > 0 {
gotLayers = conn.recvFrame(t, timeout)
}
if gotLayers == nil {