Skip to content

Commit e4792f2

Browse files
committed
Revert change to AbstractUnifiedTest since the whole file
will be removed soon, and this will just create a merge conflict.
1 parent 016b48e commit e4792f2

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

driver-sync/src/test/functional/com/mongodb/client/AbstractUnifiedTest.java

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@
6868

6969
import static com.mongodb.ClusterFixture.getConnectionString;
7070
import static com.mongodb.ClusterFixture.getMultiMongosConnectionString;
71+
import static com.mongodb.ClusterFixture.isDataLakeTest;
7172
import static com.mongodb.ClusterFixture.isSharded;
7273
import static com.mongodb.ClusterFixture.serverVersionAtLeast;
7374
import static com.mongodb.ClusterFixture.serverVersionLessThan;
@@ -169,14 +170,16 @@ public void setUp() {
169170

170171
killAllSessions();
171172

172-
try {
173-
collectionHelper.create(collectionName, new CreateCollectionOptions(), WriteConcern.MAJORITY);
174-
} catch (MongoCommandException e) {
175-
// Older sharded clusters sometimes reply with this error. Work around it by retrying once.
176-
if (e.getErrorCode() == 11601 && isSharded() && serverVersionLessThan(4, 2)) {
173+
if (!isDataLakeTest()) {
174+
try {
177175
collectionHelper.create(collectionName, new CreateCollectionOptions(), WriteConcern.MAJORITY);
178-
} else {
179-
throw e;
176+
} catch (MongoCommandException e) {
177+
// Older sharded clusters sometimes reply with this error. Work around it by retrying once.
178+
if (e.getErrorCode() == 11601 && isSharded() && serverVersionLessThan(4, 2)) {
179+
collectionHelper.create(collectionName, new CreateCollectionOptions(), WriteConcern.MAJORITY);
180+
} else {
181+
throw e;
182+
}
180183
}
181184
}
182185

0 commit comments

Comments
 (0)