From 1822351fd462c2a6b5852502114d1829742e78a7 Mon Sep 17 00:00:00 2001 From: aminst Date: Mon, 13 Nov 2023 21:28:56 -0500 Subject: [PATCH] Fix epoch test --- pkg/router/epoch_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/router/epoch_test.go b/pkg/router/epoch_test.go index 838f737..9f328ad 100644 --- a/pkg/router/epoch_test.go +++ b/pkg/router/epoch_test.go @@ -114,7 +114,7 @@ func getMockShardNodeClients() map[int]ReplicaRPCClientMap { func TestSendEpochRequestsAndAnswerThemReturnsAllResponses(t *testing.T) { e := newEpochManager(getMockShardNodeClients(), time.Second) - e.currentEpoch = 1 + e.currentEpoch = 2 request1 := &request{ctx: context.Background(), operationType: Write, block: "a", value: "123"} request2 := &request{ctx: context.Background(), operationType: Read, block: "b"} e.requests[1] = []*request{ @@ -127,7 +127,7 @@ func TestSendEpochRequestsAndAnswerThemReturnsAllResponses(t *testing.T) { e.reponseChans[1][request2] = chan2 go e.sendEpochRequestsAndAnswerThem() - timeout := time.After(2 * time.Second) + timeout := time.After(5 * time.Second) responseCount := 0 for { if responseCount == 2 {