Closed
Description
Overview
I am using the platform-version 1.0.2. The bug happens when I use the ConsoleLauncher (from a gradle JavaExec Task, but I doubt that matters).
I accidentally provided twice the same key for --config
as follows:
'--config', 'forgive=".*spec:ch.tutteli.atrium.api.cc.en_UK.Iterable.error cases."',
'--config', 'forgive=".*spec:ch.tutteli.atrium.api.cc.en_UK.Iterable.failing cases."',
The following Exception was thrown
Exception in thread "main" java.lang.IllegalStateException: Duplicate key .*spec:ch.tutteli.atrium.api.cc.en_UK.Iterable.*error
at java.util.stream.Collectors.lambda$throwingMerger$114(Collectors.java:133)
at java.util.HashMap.merge(HashMap.java:1245)
at java.util.stream.Collectors.lambda$toMap$172(Collectors.java:1320)
at java.util.stream.ReduceOps$3ReducingSink.accept(ReduceOps.java:169)
at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1374)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
at org.junit.platform.console.options.AvailableOptions.toCommandLineOptions(AvailableOptions.java:237)
at org.junit.platform.console.options.JOptSimpleCommandLineOptionsParser.parse(JOptSimpleCommandLineOptionsParser.java:41)
at org.junit.platform.console.ConsoleLauncher.execute(ConsoleLauncher.java:68)
at org.junit.platform.console.ConsoleLauncher.execute(ConsoleLauncher.java:47)
at org.junit.platform.console.ConsoleLauncher.main(ConsoleLauncher.java:39)
The error as such is fine, but I would have expected it reports that forgive
was duplicated. I am not entirely sure if this a junit5 bug or a JDK8 bug but I guess you will find out quickly.