Skip to content
Permalink
Browse files
Code cleanup - unused test stop was removed
  • Loading branch information
dspavlov committed Sep 30, 2021
1 parent d438687 commit 2fa56fa4691d7f449abc02a9f62cae904ece82a7
Showing 4 changed files with 2 additions and 23 deletions.
@@ -104,10 +104,7 @@ public GitHubConfig code(String code) {
@Override public String gitAuthTok() {
String encAuth = gitAuthTokenEncoded();

if (isNullOrEmpty(encAuth))
return null;

return PasswordEncoder.decode(encAuth);
return isNullOrEmpty(encAuth) ? null : PasswordEncoder.decode(encAuth);
}

/** {@inheritDoc} */
@@ -26,11 +26,6 @@ public interface ILogProductSpecific {
*/
public boolean isTestStarting(String line);

/**
* @param line Line.
*/
public boolean isTestStopping(String line);

/**
* @param line Line.
*/
@@ -27,19 +27,12 @@ public class LogIgniteSpecific implements ILogProductSpecific {
private static final String STARTING_TEST = ">>> Starting test: ";
/** Test name end. */
private static final String TEST_NAME_END = " <<<";
/** Stopping test. */
private static final String STOPPING_TEST = ">>> Stopping test: ";

/** {@inheritDoc} */
@Override public boolean isTestStarting(String line) {
return line.contains(STARTING_TEST) && line.contains(TEST_NAME_END);
}

/** {@inheritDoc} */
@Override public boolean isTestStopping(String line) {
return line.contains(STOPPING_TEST);
}

/** {@inheritDoc} */
@Override public boolean needWarn(String line) {
return line.contains("java.lang.AssertionError:")
@@ -51,13 +51,7 @@ public class TestLogHandler implements ILineHandler {
if (currentTestName != null)
currentTestName = null;

String startTest = line.substring(line.indexOf(STARTING_TEST) + STARTING_TEST.length(), line.indexOf(TEST_NAME_END));

this.currentTestName = startTest;
}
else if (currentTestName != null && logSpecific.isTestStopping(line)) {
//currentTestName = null;

this.currentTestName = line.substring(line.indexOf(STARTING_TEST) + STARTING_TEST.length(), line.indexOf(TEST_NAME_END));
}

if (currentTestName == null)

0 comments on commit 2fa56fa

Please sign in to comment.