File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
surefire-report-parser/src
main/java/org/apache/maven/plugins/surefire/report
test/java/org/apache/maven/plugins/surefire/report Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 1919package org .apache .maven .plugins .surefire .report ;
2020
2121import java .util .ArrayList ;
22+ import java .util .Collections ;
2223import java .util .List ;
2324
2425import static org .apache .maven .shared .utils .StringUtils .isNotBlank ;
@@ -168,7 +169,7 @@ public boolean hasSkipped() {
168169 return hasSkipped ;
169170 }
170171
171- public boolean hasFlake () {
172+ public boolean hasFlakes () {
172173 return !flakyErrors .isEmpty () || !flakyFailures .isEmpty ();
173174 }
174175
@@ -177,15 +178,15 @@ public void addFlakyError(FlakyError flakyError) {
177178 }
178179
179180 public List <FlakyError > getFlakyErrors () {
180- return flakyErrors ;
181+ return Collections . unmodifiableList ( flakyErrors ) ;
181182 }
182183
183184 public void addFlakyFailure (FlakyFailure flakyFailure ) {
184185 flakyFailures .add (flakyFailure );
185186 }
186187
187188 public List <FlakyFailure > getFlakyFailures () {
188- return flakyFailures ;
189+ return Collections . unmodifiableList ( flakyFailures ) ;
189190 }
190191
191192 /**
Original file line number Diff line number Diff line change @@ -744,7 +744,7 @@ public void shouldParseFlakes() throws Exception {
744744 assertThat (tests .get (0 ).getTime (), is (0.034f ));
745745 assertThat (tests .get (0 ).getFullName (), is ("org.acme.FlakyTest.testFlaky" ));
746746 assertThat (tests .get (0 ).hasError (), is (false ));
747- assertThat (tests .get (0 ).hasFlake (), is (true ));
747+ assertThat (tests .get (0 ).hasFlakes (), is (true ));
748748
749749 List <FlakyFailure > flakyFailures = tests .get (0 ).getFlakyFailures ();
750750 assertThat (flakyFailures .size (), is (3 ));
@@ -781,6 +781,6 @@ public void shouldParseFlakes() throws Exception {
781781 assertThat (tests .get (1 ).getTime (), is (0.001f ));
782782 assertThat (tests .get (1 ).getFullName (), is ("org.acme.FlakyTest.testStable" ));
783783 assertThat (tests .get (1 ).hasError (), is (false ));
784- assertThat (tests .get (1 ).hasFlake (), is (false ));
784+ assertThat (tests .get (1 ).hasFlakes (), is (false ));
785785 }
786786}
You can’t perform that action at this time.
0 commit comments