Skip to content

Commit b0a6da0

Browse files
committed
Fix TestClientStress test.
1 parent 8b5d898 commit b0a6da0

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
@@ -526,7 +526,7 @@ func TestClientStress(t *testing.T) {
526526
// Run tests with various "maxPoolSize" values, including 1-connection pools and the default
527527
// size of 100, to test how the client handles traffic spikes using different connection
528528
// pool configurations.
529-
maxPoolSizes := []uint64{0, 1, 10, 100}
529+
maxPoolSizes := []uint64{1, 10, 100}
530530
for _, maxPoolSize := range maxPoolSizes {
531531
tpm := newTestPoolMonitor()
532532
maxPoolSizeOpt := mtest.NewOptions().ClientOptions(
@@ -565,10 +565,10 @@ func TestClientStress(t *testing.T) {
565565
errs := findOneFor(mt.Coll, timeout, 1*time.Second)
566566
assert.True(mt, len(errs) == 0, "expected no errors, but got %d (%v)", len(errs), errs)
567567

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

0 commit comments

Comments
 (0)