Skip to content

Commit

Permalink
x
Browse files Browse the repository at this point in the history
  • Loading branch information
bassosimone committed Feb 8, 2024
1 parent 8314809 commit ebe2fe8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions internal/webconnectivityalgo/dnsoverhttps_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,21 +121,21 @@ func TestOpportunisticDNSOverHTTPSURLProvider(t *testing.T) {
// run test cases
for _, tc := range cases {
t.Run(tc.name, func(t *testing.T) {
o := NewOpportunisticDNSOverHTTPSURLProvider(tc.urls...)
oup := NewOpportunisticDNSOverHTTPSURLProvider(tc.urls...)

// note: we need to reconfigure timeNow before resetting the seed
if tc.timeNow != nil {
o.timeNow = tc.timeNow
oup.timeNow = tc.timeNow
}
if !tc.seed.IsZero() {
o.seed(tc.seed)
oup.seed(tc.seed)
} else {
o.seed(o.timeNow())
oup.seed(oup.timeNow())
}

var got []expectation
for len(got) < len(tc.expect) {
url, good := o.MaybeNextURL()
url, good := oup.MaybeNextURL()
got = append(got, expectation{
URL: url,
Good: good,
Expand Down

0 comments on commit ebe2fe8

Please sign in to comment.