summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip/stack/nud_test.go
diff options
context:
space:
mode:
authorTamir Duberstein <tamird@google.com>2021-05-26 06:47:52 -0700
committergVisor bot <gvisor-bot@google.com>2021-05-26 06:49:57 -0700
commitfcad6f91a3f292b6b76be10f03baf05ee5245d3d (patch)
treefa383878218fe0c69c5c346a08cfd953e398ee2d /pkg/tcpip/stack/nud_test.go
parentb63e61828d0652ad1769db342c17a3529d2d24ed (diff)
Use the stack clock everywhere
Updates #5939. Updates #6012. RELNOTES: n/a PiperOrigin-RevId: 375931554
Diffstat (limited to 'pkg/tcpip/stack/nud_test.go')
-rw-r--r--pkg/tcpip/stack/nud_test.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/pkg/tcpip/stack/nud_test.go b/pkg/tcpip/stack/nud_test.go
index bfce2fe16..1aeb2f8a5 100644
--- a/pkg/tcpip/stack/nud_test.go
+++ b/pkg/tcpip/stack/nud_test.go
@@ -711,7 +711,8 @@ func TestNUDStateReachableTime(t *testing.T) {
rng := fakeRand{
num: defaultFakeRandomNum,
}
- s := stack.NewNUDState(c, rand.New(&rng))
+ var clock faketime.NullClock
+ s := stack.NewNUDState(c, &clock, rand.New(&rng))
if got, want := s.ReachableTime(), test.want; got != want {
t.Errorf("got ReachableTime = %q, want = %q", got, want)
}
@@ -783,7 +784,8 @@ func TestNUDStateRecomputeReachableTime(t *testing.T) {
rng := fakeRand{
num: defaultFakeRandomNum,
}
- s := stack.NewNUDState(c, rand.New(&rng))
+ var clock faketime.NullClock
+ s := stack.NewNUDState(c, &clock, rand.New(&rng))
old := s.ReachableTime()
if got, want := s.ReachableTime(), old; got != want {