increase delay in test

parent d90184df
Pipeline #42957 failed with stage
in 3 minutes and 53 seconds
Description: Add a small delay to allow metrics to be collected; otherwise this
test fails under high CPU contention.
Update: Increased the delay from 5 to 100 ms.
To further reduce the posibility of failing.
--- a/listener_test.go
+++ b/listener_test.go
@@ -78,6 +78,7 @@
assert.Equal(s.T(), beforeClosed, sumCountersForMetricAndLabels(s.T(), "net_conntrack_listener_conn_closed_total", listenerName),
"the closed conn counter must not be incremented before the connection is closed")
conn.Close()
+ time.Sleep(5 * time.Millisecond)
+ time.Sleep(100 * time.Millisecond)
assert.Equal(s.T(), beforeClosed+1, sumCountersForMetricAndLabels(s.T(), "net_conntrack_listener_conn_closed_total", listenerName),
"the closed conn counter must be incremented after connection was closed")
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment