@@ -479,18 +479,17 @@ func TestClientStress(t *testing.T) {
479
479
// TODO: Enable with GODRIVER-2038.
480
480
t .Skip ("TODO: Enable with GODRIVER-2038" )
481
481
482
- mtOpts := mtest .NewOptions ().
483
- MinServerVersion ("3.6" ).
484
- Topologies (mtest .ReplicaSet , mtest .Sharded , mtest .Single ).
485
- CreateClient (false )
482
+ testutil .Integration (t )
483
+
484
+ mtOpts := mtest .NewOptions ().CreateClient (false )
486
485
mt := mtest .New (t , mtOpts )
487
486
488
487
// Test that a Client can recover from a massive traffic spike after the traffic spike is over.
489
488
mt .Run ("Client recovers from traffic spike" , func (mt * mtest.T ) {
490
489
oid := primitive .NewObjectID ()
491
490
doc := bson.D {{Key : "_id" , Value : oid }, {Key : "key" , Value : "value" }}
492
491
_ , err := mt .Coll .InsertOne (context .Background (), doc )
493
- assert .Nil (mt , err , "unexpected error inserting document : %v" , err )
492
+ assert .Nil (mt , err , "InsertOne error: %v" , err )
494
493
495
494
// findOne calls FindOne("_id": oid) on the given collection and with the given timeout. It
496
495
// returns any errors.
@@ -521,7 +520,7 @@ func TestClientStress(t *testing.T) {
521
520
for i := 0 ; i < 50 ; i ++ {
522
521
start := time .Now ()
523
522
err := findOne (mt .Coll , 10 * time .Second )
524
- assert .Nil (t , err , "unexpected error calling FindOne : %v" , err )
523
+ assert .Nil (t , err , "FindOne error: %v" , err )
525
524
duration := time .Since (start )
526
525
if duration > maxRTT {
527
526
maxRTT = duration
@@ -538,7 +537,7 @@ func TestClientStress(t *testing.T) {
538
537
mt .RunOpts (fmt .Sprintf ("maxPoolSize %d" , maxPoolSize ), maxPoolSizeOpt , func (mt * mtest.T ) {
539
538
doc := bson.D {{Key : "_id" , Value : oid }, {Key : "key" , Value : "value" }}
540
539
_ , err := mt .Coll .InsertOne (context .Background (), doc )
541
- assert .Nil (mt , err , "unexpected error inserting document : %v" , err )
540
+ assert .Nil (mt , err , "InsertOne error: %v" , err )
542
541
543
542
// Set the timeout to be 10x the maximum observed RTT. Use a minimum 10ms timeout to
544
543
// prevent spurious test failures due to extremely low timeouts.
0 commit comments