Skip to content

Commit

Permalink
npm: revert changes for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
guyarb committed Dec 9, 2024
1 parent f41dfa5 commit 05195f4
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions pkg/network/tracer/tracer_linux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -726,9 +726,9 @@ func (s *TracerSuite) TestGatewayLookupEnabled() {

var clientIP string
var clientPort int
require.Eventually(t, func() bool {
require.EventuallyWithT(t, func(c *assert.CollectT) {
clientIP, clientPort, _, err = testdns.SendDNSQueries([]string{"google.com"}, dnsAddr, "udp")
return err == nil
assert.NoError(c, err)
}, 6*time.Second, 100*time.Millisecond, "failed to send dns query")

dnsClientAddr := &net.UDPAddr{IP: net.ParseIP(clientIP), Port: clientPort}
Expand Down Expand Up @@ -783,9 +783,9 @@ func (s *TracerSuite) TestGatewayLookupSubnetLookupError() {

var clientIP string
var clientPort int
require.Eventually(t, func() bool {
require.EventuallyWithT(t, func(c *assert.CollectT) {
clientIP, clientPort, _, err = testdns.SendDNSQueries([]string{destDomain}, destAddr, "udp")
return err == nil
assert.NoError(c, err)
}, 6*time.Second, 100*time.Millisecond, "failed to send dns query")

dnsClientAddr := &net.UDPAddr{IP: net.ParseIP(clientIP), Port: clientPort}
Expand All @@ -798,9 +798,9 @@ func (s *TracerSuite) TestGatewayLookupSubnetLookupError() {
}, 3*time.Second, 100*time.Millisecond, "connection not found")
require.Nil(t, c.Via)

require.Eventually(t, func() bool {
require.EventuallyWithT(t, func(c *assert.CollectT) {
clientIP, clientPort, _, err = testdns.SendDNSQueries([]string{destDomain}, destAddr, "udp")
return err == nil
assert.NoError(c, err)
}, 6*time.Second, 100*time.Millisecond, "failed to send dns query")

dnsClientAddr = &net.UDPAddr{IP: net.ParseIP(clientIP), Port: clientPort}
Expand Down Expand Up @@ -958,12 +958,12 @@ func (s *TracerSuite) TestGatewayLookupCrossNamespace() {
var dnsClientAddr, dnsServerAddr *net.UDPAddr
var clientIP string
var clientPort int
require.Eventually(t, func() bool {
require.EventuallyWithT(t, func(c *assert.CollectT) {
kernel.WithNS(test2Ns, func() error {
clientIP, clientPort, _, err = testdns.SendDNSQueries([]string{"google.com"}, dnsAddr, "udp")
return nil
})
return err == nil
assert.NoError(c, err)
}, 6*time.Second, 100*time.Millisecond, "failed to send dns query")

dnsClientAddr = &net.UDPAddr{IP: net.ParseIP(clientIP), Port: clientPort}
Expand Down

0 comments on commit 05195f4

Please sign in to comment.