-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathload_test.go
More file actions
41 lines (34 loc) · 796 Bytes
/
Copy pathload_test.go
File metadata and controls
41 lines (34 loc) · 796 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
//go:build load
// +build load
package main
import (
"context"
"testing"
"time"
registry "github.com/Ishan27g/registry/golang/registry/package"
)
const bulkMessages = 100
func Test_Gossip_Load_Single_Round(t *testing.T) {
ctx, can := context.WithCancel(context.Background())
defer func() {
can()
<-ctx.Done()
registry.ShutDown()
<-time.After(2 * time.Second)
}()
runTest(t, ctx, zone1, bulkMessages, atAny, func() time.Duration {
return time.Millisecond * 100
})
}
func Test_Gossip_Load_Multiple_Rounds(t *testing.T) {
ctx, can := context.WithCancel(context.Background())
defer func() {
can()
<-ctx.Done()
registry.ShutDown()
<-time.After(2 * time.Second)
}()
runTest(t, ctx, zone1, bulkMessages, atAny, func() time.Duration {
return 1 * time.Second
})
}