File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed
driver-sync/src/test/functional/com/mongodb/client Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change 68
68
69
69
import static com .mongodb .ClusterFixture .getConnectionString ;
70
70
import static com .mongodb .ClusterFixture .getMultiMongosConnectionString ;
71
+ import static com .mongodb .ClusterFixture .isDataLakeTest ;
71
72
import static com .mongodb .ClusterFixture .isSharded ;
72
73
import static com .mongodb .ClusterFixture .serverVersionAtLeast ;
73
74
import static com .mongodb .ClusterFixture .serverVersionLessThan ;
@@ -169,14 +170,16 @@ public void setUp() {
169
170
170
171
killAllSessions ();
171
172
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 {
177
175
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
+ }
180
183
}
181
184
}
182
185
You can’t perform that action at this time.
0 commit comments