Skip to content

Commit 94c9917

Browse files
committed
Fix TestClientStress test.
1 parent f92a927 commit 94c9917

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

mongo/integration/client_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@ func TestClientStress(t *testing.T) {
533533
// Run tests with various "maxPoolSize" values, including 1-connection pools and the default
534534
// size of 100, to test how the client handles traffic spikes using different connection
535535
// pool configurations.
536-
maxPoolSizes := []uint64{0, 1, 10, 100}
536+
maxPoolSizes := []uint64{1, 10, 100}
537537
for _, maxPoolSize := range maxPoolSizes {
538538
tpm := newTestPoolMonitor()
539539
maxPoolSizeOpt := mtest.NewOptions().ClientOptions(
@@ -572,10 +572,10 @@ func TestClientStress(t *testing.T) {
572572
errs := findOneFor(mt.Coll, timeout, 1*time.Second)
573573
assert.True(mt, len(errs) == 0, "expected no errors, but got %d (%v)", len(errs), errs)
574574

575-
// Simulate an extreme traffic spike by running 2,000 FindOne loops in parallel for 10
575+
// Simulate an extreme traffic spike by running 1,000 FindOne loops in parallel for 10
576576
// seconds and expect at least some errors to occur.
577577
g := new(errgroup.Group)
578-
for i := 0; i < 2000; i++ {
578+
for i := 0; i < 1000; i++ {
579579
g.Go(func() error {
580580
errs := findOneFor(mt.Coll, timeout, 10*time.Second)
581581
if len(errs) == 0 {

0 commit comments

Comments
 (0)