Skip to content

Commit

Permalink
Add logs; increase timeout for retry loop (#22291)
Browse files Browse the repository at this point in the history
[NPM-3173] Add logs; increase timeout for retry loop
  • Loading branch information
hmahmood authored Jan 23, 2024
1 parent 3de13d4 commit 5b4beaa
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions pkg/network/tracer/tracer_linux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -847,9 +847,11 @@ func (s *TracerSuite) TestGatewayLookupCrossNamespace() {

require.Eventually(t, func() bool {
var ok bool
conn, ok = findConnection(c.LocalAddr(), c.RemoteAddr(), getConnections(t, tr))
conns := getConnections(t, tr)
t.Log(conns)
conn, ok = findConnection(c.LocalAddr(), c.RemoteAddr(), conns)
return ok && conn.Direction == network.OUTGOING
}, 2*time.Second, 500*time.Millisecond)
}, 3*time.Second, 100*time.Millisecond)

// conn.Via should be nil, since traffic is local
require.Nil(t, conn.Via)
Expand Down Expand Up @@ -877,9 +879,11 @@ func (s *TracerSuite) TestGatewayLookupCrossNamespace() {
var conn *network.ConnectionStats
require.Eventually(t, func() bool {
var ok bool
conn, ok = findConnection(c.LocalAddr(), c.RemoteAddr(), getConnections(t, tr))
conns := getConnections(t, tr)
t.Log(conns)
conn, ok = findConnection(c.LocalAddr(), c.RemoteAddr(), conns)
return ok && conn.Direction == network.OUTGOING
}, 2*time.Second, 500*time.Millisecond)
}, 3*time.Second, 100*time.Millisecond)

// traffic is local, so Via field should not be set
require.Nil(t, conn.Via)
Expand Down

0 comments on commit 5b4beaa

Please sign in to comment.