Skip to content

Commit 8d7c0dc

Browse files
authored
Fix parameterized test names in CrudProseTest (#1775)
Previously, for a parameterized test like CrudProseTest::testBulkWriteHandlesWriteErrorsAcrossBatches, the test names in the JUnit XML output (and therefore in CI) were [1] false [2] true Now the test names are 6. MongoClient.bulkWrite handles individual WriteErrors across batches--ordered:false 6. MongoClient.bulkWrite handles individual WriteErrors across batches--ordered:true and appear in the IDEA UI like 6. MongoClient.bulkWrite handles individual WriteErrors across batches --ordered:false --ordered:true and in Gradle output like 6. MongoClient.bulkWrite handles individual WriteErrors across batches Test 6. MongoClient.bulkWrite handles individual WriteErrors across batches--ordered:false PASSED (5.1s) Test 6. MongoClient.bulkWrite handles individual WriteErrors across batches--ordered:true PASSED
1 parent a0173ff commit 8d7c0dc

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ protected void testBulkWriteCollectsWriteConcernErrorsAcrossBatches() throws Int
238238
}
239239

240240
@DisplayName("6. MongoClient.bulkWrite handles individual WriteErrors across batches")
241-
@ParameterizedTest
241+
@ParameterizedTest(name = "6. MongoClient.bulkWrite handles individual WriteErrors across batches--ordered:{0}")
242242
@ValueSource(booleans = {false, true})
243243
protected void testBulkWriteHandlesWriteErrorsAcrossBatches(final boolean ordered) {
244244
assumeTrue(serverVersionAtLeast(8, 0));
@@ -380,7 +380,7 @@ private void testBulkWriteSplitsWhenExceedingMaxMessageSizeBytesDueToNsInfo(
380380
}
381381

382382
@DisplayName("12. MongoClient.bulkWrite returns an error if no operations can be added to ops")
383-
@ParameterizedTest
383+
@ParameterizedTest(name = "12. MongoClient.bulkWrite returns an error if no operations can be added to ops--tooLarge:{0}")
384384
@ValueSource(strings = {"document", "namespace"})
385385
protected void testBulkWriteSplitsErrorsForTooLargeOpsOrNsInfo(final String tooLarge) {
386386
assumeTrue(serverVersionAtLeast(8, 0));
@@ -465,7 +465,8 @@ protected void testWriteConcernOfAllBatchesWhenUnacknowledgedRequested() {
465465
/**
466466
* This test is not from the specification.
467467
*/
468-
@ParameterizedTest
468+
@DisplayName("insertMustGenerateIdAtMostOnce")
469+
@ParameterizedTest(name = "insertMustGenerateIdAtMostOnce--documentClass:{0}, expectIdGenerated:{1}")
469470
@MethodSource("insertMustGenerateIdAtMostOnceArgs")
470471
protected <TDocument> void insertMustGenerateIdAtMostOnce(
471472
final Class<TDocument> documentClass,

0 commit comments

Comments
 (0)