Skip to content

Commit 8bd512c

Browse files
committed
fix tests
1 parent fc91428 commit 8bd512c

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

mongo/client_bulk_write_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ import (
1717
func TestBatches(t *testing.T) {
1818
t.Parallel()
1919

20-
t.Parallel()
21-
2220
batches := &modelBatches{
2321
models: make([]clientWriteModel, 2),
2422
}

mongo/client_test.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -533,6 +533,13 @@ func TestClient(t *testing.T) {
533533
defer func() {
534534
_ = client.Disconnect(bgCtx)
535535
}()
536+
537+
serverVersion, err := getServerVersion(client.Database("admin"))
538+
require.NoError(t, err)
539+
if compareVersions(serverVersion, "8.0.0") < 1 {
540+
t.Skip("skipping server version < 8.0")
541+
}
542+
536543
document := bson.D{{"largeField", strings.Repeat("a", 16777216-100)}} // Adjust size to account for BSON overhead
537544
models := &ClientWriteModels{}
538545
models = models.AppendInsertOne("db", "x", NewClientInsertOneModel().SetDocument(document))

0 commit comments

Comments
 (0)