From 2038df50cd4a6b26b0ecf89c2652b437bb01b1ab Mon Sep 17 00:00:00 2001 From: Tim Vaillancourt Date: Sat, 5 Oct 2024 22:48:24 +0200 Subject: [PATCH] set time Signed-off-by: Tim Vaillancourt --- go/vt/discovery/healthcheck_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/go/vt/discovery/healthcheck_test.go b/go/vt/discovery/healthcheck_test.go index ef69a50fdbe..d367ad13afb 100644 --- a/go/vt/discovery/healthcheck_test.go +++ b/go/vt/discovery/healthcheck_test.go @@ -149,6 +149,7 @@ func TestHealthCheck(t *testing.T) { input := make(chan *querypb.StreamHealthResponse) conn := createFakeConn(tablet, input) now := time.Now() + hc.nowTimeFunc = func() time.Time { return now } // create a channel and subscribe to healthcheck resultChan := hc.Subscribe() @@ -497,6 +498,7 @@ func TestHealthCheckErrorOnPrimaryAfterExternalReparent(t *testing.T) { Serving: true, Stats: &querypb.RealtimeStats{ReplicationLagSeconds: 0, CpuUsage: 0.2}, PrimaryTermStartTime: 20, + Timestamp: protoutil.TimeToProto(now), }} a = hc.GetHealthyTabletStats(&querypb.Target{Keyspace: "k", Shard: "s", TabletType: topodatapb.TabletType_PRIMARY}) mustMatch(t, health, a, "unexpected result")