Skip to content

Commit

Permalink
test(broadcast): fixed test
Browse files Browse the repository at this point in the history
  • Loading branch information
aleksander-vedvik committed Jun 11, 2024
1 parent c634b01 commit 8dba797
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions tests/broadcast/broadcast_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ func TestSimpleBroadcastCancel(t *testing.T) {

func TestBroadcastCancel(t *testing.T) {
numSrvs := 3
numReqs := 10
numReqs := 3
_, srvAddrs, srvCleanup, err := createSrvs(numSrvs)
if err != nil {
t.Error(err)
Expand All @@ -195,7 +195,7 @@ func TestBroadcastCancel(t *testing.T) {
_, _ = config.LongRunningTask(ctx, &Request{Value: val}, true)
cancel()
// wait until cancel has reaced the servers before asking for the result
time.Sleep(100 * time.Millisecond)
time.Sleep(1 * time.Second)
ctx, cancel = context.WithTimeout(context.Background(), 10*time.Second)
resp, err := config.GetVal(ctx, &Request{Value: val})
cancel()
Expand Down Expand Up @@ -1381,10 +1381,10 @@ func BenchmarkBroadcastCallTenClientsTRACE(b *testing.B) {
b.StopTimer()
}

/*func TestBroadcastCallManyRequestsAsync(t *testing.T) {
func TestBroadcastCallManyRequestsAsync(t *testing.T) {
numSrvs := 3
numClients := 20
numReqs := 50
numReqs := 10
_, srvAddrs, srvCleanup, err := createSrvs(numSrvs)
if err != nil {
t.Error(err)
Expand Down Expand Up @@ -1440,7 +1440,7 @@ func BenchmarkBroadcastCallTenClientsTRACE(b *testing.B) {
}
wg.Wait()
srvCleanup()
}*/
}

func TestAuthenticationBroadcastCall(t *testing.T) {
numSrvs := 3
Expand Down
2 changes: 1 addition & 1 deletion tests/broadcast/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func newtestServer(addr string, srvAddresses []string, _ int, withOrder ...bool)
srv.peers = srvAddresses
srv.addr = addr
if addr != leader {
srv.processingTime = 100 * time.Millisecond
srv.processingTime = 1 * time.Second
}
srv.mgr = NewManager(
gorums.WithGrpcDialOptions(
Expand Down

0 comments on commit 8dba797

Please sign in to comment.