Skip to content

Commit

Permalink
Task:1537 Test_DNSUsecase is unstable (#1556)
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Peretyatko <alexander.peretyatko@xored.com>
Co-authored-by: Alexander Peretyatko <alexander.peretyatko@xored.com>
  • Loading branch information
dualBreath and Alexander Peretyatko authored Nov 28, 2023
1 parent 4d02ed4 commit c1f9028
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pkg/networkservice/chains/nsmgr/dns_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,13 @@ func Test_DNSUsecase(t *testing.T) {
conn, err := nsc.Request(ctx, request)
require.NoError(t, err)

healthCheck := func() bool {
_, e := resolver.LookupIP(ctx, "ip4", "my.domain")
return e == nil
}
// To ensure that DNS records sent with nsc.Request are ready
require.Eventually(t, healthCheck, time.Second, 10*time.Millisecond)

requireIPv4Lookup(ctx, t, &resolver, "my.domain", "4.4.4.4")
requireIPv4Lookup(ctx, t, &resolver, "my.domain.com", "5.5.5.5")

Expand Down

0 comments on commit c1f9028

Please sign in to comment.