diff --git a/internal/integtest/integtest.go b/internal/integtest/integtest.go index 37ab6e4d77..af4d3e3210 100644 --- a/internal/integtest/integtest.go +++ b/internal/integtest/integtest.go @@ -223,6 +223,10 @@ func AddServerlessAuthCredentials(uri string) (string, error) { // ConnString gets the globally configured connection string. func ConnString(t *testing.T) *connstring.ConnString { + if testing.Short() { + t.Skip("skipping integration test in short mode") + } + connectionStringOnce.Do(func() { uri, err := MongoDBURI() require.NoError(t, err, "error constructing mongodb URI: %v", err) diff --git a/x/mongo/driver/topology/server_test.go b/x/mongo/driver/topology/server_test.go index 818a7818f6..2b2cb980ec 100644 --- a/x/mongo/driver/topology/server_test.go +++ b/x/mongo/driver/topology/server_test.go @@ -130,6 +130,9 @@ func (d *timeoutDialer) DialContext(ctx context.Context, network, address string // TestServerHeartbeatTimeout tests timeout retry and preemptive canceling. func TestServerHeartbeatTimeout(t *testing.T) { + if testing.Short() { + t.Skip("skipping integration test in short mode") + } if os.Getenv("DOCKER_RUNNING") != "" { t.Skip("Skipping this test in docker.") }