Skip to content

Commit 740fdd6

Browse files
committed
Increase UUID test goroutines to 10,000.
1 parent dc064d0 commit 740fdd6

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

x/mongo/driver/uuid/uuid_test.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ func TestNew(t *testing.T) {
2727
// Test that initializing many package-global UUID sources concurrently never leads to any duplicate
2828
// UUIDs being generated.
2929
func TestGlobalSource(t *testing.T) {
30-
// Create a slice of 1,000 sources and initialize them in 1,000 separate goroutines. The goal is
31-
// to emulate many separate Go driver processes starting at the same time and initializing the
32-
// uuid package at the same time.
33-
sources := make([]*source, 1000)
30+
// Create a slice of 10,000 sources and initialize them in 10,000 separate goroutines. The goal
31+
// is to emulate many separate Go driver processes starting at the same time and initializing
32+
// the uuid package at the same time.
33+
sources := make([]*source, 10000)
3434
var wg sync.WaitGroup
3535
for i := range sources {
3636
wg.Add(1)
@@ -41,9 +41,9 @@ func TestGlobalSource(t *testing.T) {
4141
}
4242
wg.Wait()
4343

44-
// Read 1,000 UUIDs from each source and assert that there is never a duplicate value, either
45-
// from the same source or from separate sources.
46-
const iterations = 1000
44+
// Read 100 UUIDs from each source and assert that there is never a duplicate value, either from
45+
// the same source or from separate sources.
46+
const iterations = 100
4747
uuids := make(map[UUID]bool, len(sources)*iterations)
4848
for i := 0; i < iterations; i++ {
4949
for j, s := range sources {

0 commit comments

Comments
 (0)