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) {
9292 () -> "No classpath entries selected" );
9393 if (selectedClasspathEntries .isEmpty ()) {
9494 Set <Path > rootDirs = new LinkedHashSet <>(ReflectionUtils .getAllClasspathRootDirectories ());
95- rootDirs .addAll (options .getExistingAdditionalClasspathEntries ());
95+ rootDirs .addAll (options .getAdditionalClasspathEntries ());
9696 return validateAndLogInvalidRoots (rootDirs );
9797 }
9898 return validateAndLogInvalidRoots (new LinkedHashSet <>(selectedClasspathEntries ));
Original file line number Diff line number Diff line change @@ -391,15 +391,17 @@ void logsInvalidSearchPathRoots(@TrackLogRecords LogRecordListener listener) {
391391 }
392392
393393 @ Test
394- void doesNotLogInvalidAdditionalClasspathRoots (@ TrackLogRecords LogRecordListener listener ) {
394+ void logsInvalidAdditionalClasspathRoots (@ TrackLogRecords LogRecordListener listener ) {
395395 var opts = new TestDiscoveryOptions ();
396396 opts .setScanClasspath (true );
397397 opts .setAdditionalClasspathEntries (List .of (Paths .get ("/also/does/not/exist" )));
398398
399399 DiscoveryRequestCreator .toDiscoveryRequestBuilder (opts );
400400
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 );
403405 }
404406
405407 private LauncherDiscoveryRequest convert () {
You can’t perform that action at this time.
0 commit comments