From 5c0ef8179f4600a29b8b6842098d1d15c84e8ea4 Mon Sep 17 00:00:00 2001 From: Chris Schinnerl Date: Tue, 2 Jul 2024 13:58:05 +0200 Subject: [PATCH] stores: add leeway to uptime --- stores/chain_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stores/chain_test.go b/stores/chain_test.go index af127bb8a..db72ac44f 100644 --- a/stores/chain_test.go +++ b/stores/chain_test.go @@ -160,7 +160,7 @@ func TestProcessChainUpdate(t *testing.T) { t.Fatal(err) } else if h, err := ss.Host(context.Background(), hks[0]); err != nil { t.Fatal(err) - } else if h.Interactions.Uptime != time.Minute { + } else if h.Interactions.Uptime < time.Minute || h.Interactions.Uptime > time.Minute+time.Second { t.Fatalf("unexpected uptime %v", h.Interactions.Uptime) } @@ -173,7 +173,7 @@ func TestProcessChainUpdate(t *testing.T) { } if h, err := ss.Host(context.Background(), hks[0]); err != nil { t.Fatal("unexpected error", err) - } else if h.Interactions.Uptime != time.Minute { + } else if h.Interactions.Uptime < time.Minute || h.Interactions.Uptime > time.Minute+time.Second { t.Fatalf("unexpected uptime %v", h.Interactions.Uptime) } else if h.NetAddress != "fooNew" { t.Fatal("unexpected net address", h.NetAddress)