Skip to content

Commit

Permalink
[SUREFIRE-1345] - Do not parse system out and system err
Browse files Browse the repository at this point in the history
  • Loading branch information
gsmet committed Dec 17, 2023
1 parent ebe163f commit 4f48957
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 87 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -207,10 +207,6 @@ public static class FlakyFailure {

private String type;

private String systemOut;

private String systemErr;

private String stackTrace;

FlakyFailure(String message, String type) {
Expand All @@ -226,22 +222,6 @@ public String getType() {
return type;
}

public void setSystemOut(String systemOut) {
this.systemOut = systemOut;
}

public String getSystemOut() {
return systemOut;
}

public void setSystemErr(String systemErr) {
this.systemErr = systemErr;
}

public String getSystemErr() {
return systemErr;
}

public void setStackTrace(String stackTrace) {
this.stackTrace = stackTrace;
}
Expand All @@ -257,10 +237,6 @@ public static class FlakyError {

private String type;

private String systemOut;

private String systemErr;

private String stackTrace;

FlakyError(String message, String type) {
Expand All @@ -276,22 +252,6 @@ public String getType() {
return type;
}

public void setSystemOut(String systemOut) {
this.systemOut = systemOut;
}

public String getSystemOut() {
return systemOut;
}

public void setSystemErr(String systemErr) {
this.systemErr = systemErr;
}

public String getSystemErr() {
return systemErr;
}

public void setStackTrace(String stackTrace) {
this.stackTrace = stackTrace;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -257,22 +257,6 @@ public void endElement(String uri, String localName, String qName) throws SAXExc
testCaseFlakyError.setStackTrace(currentElement.toString());
}
break;
case "system-out":
if (testCaseFlakyFailure != null) {
testCaseFlakyFailure.setSystemOut(currentElement.toString());
}
if (testCaseFlakyError != null) {
testCaseFlakyError.setSystemOut(currentElement.toString());
}
break;
case "system-err":
if (testCaseFlakyFailure != null) {
testCaseFlakyFailure.setSystemErr(currentElement.toString());
}
if (testCaseFlakyError != null) {
testCaseFlakyError.setSystemErr(currentElement.toString());
}
break;
default:
break;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -754,41 +754,18 @@ public void shouldParseFlakes() throws Exception {
assertThat(
flakyFailures.get(0).getStackTrace(),
containsString("at org.acme.FlakyTest.testFlaky(FlakyTest.java:18)"));
assertThat(
flakyFailures.get(0).getSystemOut(),
is(
"2023-06-23 17:27:31,351 INFO [io.quarkus] (main) code-with-quarkus 1.0.0-SNAPSHOT on JVM (powered by Quarkus 3.1.2.Final) started in 1.493s. Listening on: http://localhost:8081\n"
+ "2023-06-23 17:27:31,353 INFO [io.quarkus] (main) Profile test activated. \n"
+ "2023-06-23 17:27:31,353 INFO [io.quarkus] (main) Installed features: [cdi, resteasy-reactive, smallrye-context-propagation, vertx]\n"));
assertNull(flakyFailures.get(0).getSystemErr());

assertThat(flakyFailures.get(1).getMessage(), startsWith("expected: <1> but was: <3>"));
assertThat(flakyFailures.get(1).getType(), is("org.opentest4j.AssertionFailedError"));
assertThat(
flakyFailures.get(1).getStackTrace(),
containsString("at org.acme.FlakyTest.testFlaky(FlakyTest.java:18)"));
assertThat(
flakyFailures.get(1).getSystemOut(),
is(
"2023-06-23 17:27:31,695 INFO [io.quarkus] (main) code-with-quarkus stopped in 0.022s\n"
+ "2023-06-23 17:27:33,059 INFO [io.quarkus] (main) code-with-quarkus 1.0.0-SNAPSHOT on JVM (powered by Quarkus 3.1.2.Final) started in 1.200s. Listening on: http://localhost:8081\n"
+ "2023-06-23 17:27:33,059 INFO [io.quarkus] (main) Profile test activated. \n"
+ "2023-06-23 17:27:33,059 INFO [io.quarkus] (main) Installed features: [cdi, resteasy-reactive, smallrye-context-propagation, vertx]\n"));
assertNull(flakyFailures.get(1).getSystemErr());

assertThat(flakyFailures.get(2).getMessage(), startsWith("expected: <1> but was: <4>"));
assertThat(flakyFailures.get(2).getType(), is("org.opentest4j.AssertionFailedError"));
assertThat(
flakyFailures.get(2).getStackTrace(),
containsString("at org.acme.FlakyTest.testFlaky(FlakyTest.java:18)"));
assertThat(
flakyFailures.get(2).getSystemOut(),
is(
"2023-06-23 17:27:33,117 INFO [io.quarkus] (main) code-with-quarkus stopped in 0.016s\n"
+ "2023-06-23 17:27:34,404 INFO [io.quarkus] (main) code-with-quarkus 1.0.0-SNAPSHOT on JVM (powered by Quarkus 3.1.2.Final) started in 1.180s. Listening on: http://localhost:8081\n"
+ "2023-06-23 17:27:34,404 INFO [io.quarkus] (main) Profile test activated. \n"
+ "2023-06-23 17:27:34,404 INFO [io.quarkus] (main) Installed features: [cdi, resteasy-reactive, smallrye-context-propagation, vertx]\n"));
assertNull(flakyFailures.get(2).getSystemErr());

List<FlakyError> flakyErrors = tests.get(0).getFlakyErrors();
assertThat(flakyErrors.size(), is(1));
Expand All @@ -797,14 +774,6 @@ public void shouldParseFlakes() throws Exception {
assertThat(
flakyErrors.get(0).getStackTrace(),
containsString("at org.acme.FlakyTest.testFlaky(FlakyTest.java:18)"));
assertThat(
flakyErrors.get(0).getSystemOut(),
is(
"2023-06-23 17:27:34,461 INFO [io.quarkus] (main) code-with-quarkus stopped in 0.014s\n"
+ "2023-06-23 17:27:35,705 INFO [io.quarkus] (main) code-with-quarkus 1.0.0-SNAPSHOT on JVM (powered by Quarkus 3.1.2.Final) started in 1.159s. Listening on: http://localhost:8081\n"
+ "2023-06-23 17:27:35,705 INFO [io.quarkus] (main) Profile test activated. \n"
+ "2023-06-23 17:27:35,705 INFO [io.quarkus] (main) Installed features: [cdi, resteasy-reactive, smallrye-context-propagation, vertx]\n"));
assertThat(flakyErrors.get(0).getSystemErr(), is("Test system.err\n"));

assertThat(tests.get(1).getFullClassName(), is("org.acme.FlakyTest"));
assertThat(tests.get(1).getName(), is("testStable"));
Expand Down

0 comments on commit 4f48957

Please sign in to comment.