Skip to content

Commit

Permalink
Fix epoch test
Browse files Browse the repository at this point in the history
  • Loading branch information
aminst committed Nov 14, 2023
1 parent 937b8a2 commit 1822351
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/router/epoch_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand All @@ -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 {
Expand Down

0 comments on commit 1822351

Please sign in to comment.