|
45 | 45 | import java.util.List;
|
46 | 46 | import java.util.concurrent.TimeUnit;
|
47 | 47 |
|
48 |
| -import static com.mongodb.ClusterFixture.isDiscoverableReplicaSet; |
| 48 | +import static com.mongodb.ClusterFixture.isSharded; |
| 49 | +import static com.mongodb.ClusterFixture.serverVersionLessThan; |
49 | 50 | import static com.mongodb.JsonTestServerVersionChecker.skipTest;
|
50 | 51 | import static com.mongodb.client.Fixture.getDefaultDatabaseName;
|
51 | 52 | import static com.mongodb.client.Fixture.getMongoClientSettingsBuilder;
|
@@ -89,6 +90,11 @@ protected BsonDocument getDefinition() {
|
89 | 90 | @Before
|
90 | 91 | public void setUp() {
|
91 | 92 | assumeFalse(skipTest);
|
| 93 | + // Remove this as part of JAVA-5125 |
| 94 | + if (isSharded() && serverVersionLessThan(5, 0)) { |
| 95 | + assumeFalse(description.contains("succeeds after WriteConcernError")); |
| 96 | + assumeFalse(description.contains("fails after multiple retryable writeConcernErrors")); |
| 97 | + } |
92 | 98 | collectionHelper = new CollectionHelper<>(new DocumentCodec(), new MongoNamespace(databaseName, collectionName));
|
93 | 99 | BsonDocument clientOptions = definition.getDocument("clientOptions", new BsonDocument());
|
94 | 100 | MongoClientSettings.Builder builder = getMongoClientSettingsBuilder();
|
@@ -254,7 +260,7 @@ public static Collection<Object[]> data() throws URISyntaxException, IOException
|
254 | 260 | data.add(new Object[]{file.getName(), test.asDocument().getString("description").getValue(),
|
255 | 261 | testDocument.getString("database_name", new BsonString(getDefaultDatabaseName())).getValue(),
|
256 | 262 | testDocument.getArray("data"), test.asDocument(),
|
257 |
| - !isDiscoverableReplicaSet() || skipTest(testDocument, test.asDocument())}); |
| 263 | + skipTest(testDocument, test.asDocument())}); |
258 | 264 | }
|
259 | 265 | }
|
260 | 266 | return data;
|
|
0 commit comments