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