Skip to content

Commit

Permalink
Fixes for Java 8 and Groovy 4.
Browse files Browse the repository at this point in the history
  • Loading branch information
renatoathaydes committed May 2, 2023
1 parent 598d737 commit 80c0611
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -279,10 +279,9 @@ class HtmlReportCreator extends AbstractHtmlCreator<SpecData>

List<IterationInfo> iterations = run
? run.copyFailuresByIteration().keySet()
.toList().findAll { it.iterationIndex >= 0 }
.sort { it.iterationIndex }
: List.of()
def extraInfo = List.of()
.toList().sort { it.iterationIndex }
: Collections.emptyList()
def extraInfo = Collections.emptyList()
def multipleIterations = iterations.size() > 1
if ( run && multipleIterations ) {
extraInfo = iterations.collectMany {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ trait CanRunSpockSpecs {
else execute( selectClass( specClass ) )
}

private static void execute( DiscoverySelector selector, Consumer<EventStatistics> statisticsConsumer ) {
private void execute( DiscoverySelector selector, Consumer<EventStatistics> statisticsConsumer ) {
execute( selector )
.testEvents()
.debug()
.assertStatistics( statisticsConsumer )
}

private static EngineExecutionResults execute( DiscoverySelector selector ) {
private EngineExecutionResults execute( DiscoverySelector selector ) {
return EngineTestKit
.engine( "spock" )
.selectors( selector )
Expand Down

0 comments on commit 80c0611

Please sign in to comment.