File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
junit-platform-console/src/main/java/org/junit/platform/console/tasks
platform-tests/src/test/java/org/junit/platform/console/tasks Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -92,7 +92,7 @@ private static Set<Path> determineClasspathRoots(TestDiscoveryOptions options) {
92
92
() -> "No classpath entries selected" );
93
93
if (selectedClasspathEntries .isEmpty ()) {
94
94
Set <Path > rootDirs = new LinkedHashSet <>(ReflectionUtils .getAllClasspathRootDirectories ());
95
- rootDirs .addAll (options .getExistingAdditionalClasspathEntries ());
95
+ rootDirs .addAll (options .getAdditionalClasspathEntries ());
96
96
return validateAndLogInvalidRoots (rootDirs );
97
97
}
98
98
return validateAndLogInvalidRoots (new LinkedHashSet <>(selectedClasspathEntries ));
Original file line number Diff line number Diff line change @@ -391,15 +391,17 @@ void logsInvalidSearchPathRoots(@TrackLogRecords LogRecordListener listener) {
391
391
}
392
392
393
393
@ Test
394
- void doesNotLogInvalidAdditionalClasspathRoots (@ TrackLogRecords LogRecordListener listener ) {
394
+ void logsInvalidAdditionalClasspathRoots (@ TrackLogRecords LogRecordListener listener ) {
395
395
var opts = new TestDiscoveryOptions ();
396
396
opts .setScanClasspath (true );
397
397
opts .setAdditionalClasspathEntries (List .of (Paths .get ("/also/does/not/exist" )));
398
398
399
399
DiscoveryRequestCreator .toDiscoveryRequestBuilder (opts );
400
400
401
- assertThat (listener .stream (DiscoveryRequestCreator .class )).map (LogRecord ::getMessage ).filteredOn (
402
- msg -> msg .contains ("/also/does/not/exist" )).isEmpty ();
401
+ assertThat (listener .stream (DiscoveryRequestCreator .class ))
402
+ .map (LogRecord ::getMessage )
403
+ .filteredOn (msg -> msg .contains ("/also/does/not/exist" ))
404
+ .hasSize (1 );
403
405
}
404
406
405
407
private LauncherDiscoveryRequest convert () {
You can’t perform that action at this time.
0 commit comments