-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add: support of user command #175
Changes from all commits
9686bdd
0cc4ba0
1e62b42
1e0c718
9a5648d
a699378
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,6 +29,7 @@ public static class RunOptions { | |
private boolean debug; | ||
private int port; | ||
private String path; | ||
private String appCmd; | ||
|
||
public RunOptions() { | ||
this(10, false, 6789, "."); | ||
|
@@ -73,6 +74,14 @@ public void setDebug(boolean debug) { | |
this.debug = debug; | ||
} | ||
|
||
public void setappCmd(String appCmd) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.design.DesignForExtensionCheck> reported by reviewdog 🐶 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.javadoc.MissingJavadocMethodCheck> reported by reviewdog 🐶 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.FinalParametersCheck> reported by reviewdog 🐶 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.coding.HiddenFieldCheck> reported by reviewdog 🐶 |
||
this.appCmd = appCmd; | ||
} | ||
|
||
public String getappCmd() { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.design.DesignForExtensionCheck> reported by reviewdog 🐶 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.javadoc.MissingJavadocMethodCheck> reported by reviewdog 🐶 |
||
return this.appCmd; | ||
} | ||
|
||
public int getPort() { | ||
return port; | ||
} | ||
|
@@ -487,7 +496,6 @@ public RunTestSetResult(boolean success, String error) { | |
} | ||
|
||
public static void runTests(String jarPath, RunOptions runOptions) { | ||
|
||
String runCmd = "java -jar " + jarPath; | ||
if (runOptions.getPort() != 0) { | ||
serverPort = runOptions.getPort(); | ||
|
@@ -546,12 +554,12 @@ public static void runTests(String jarPath, RunOptions runOptions) { | |
} | ||
} | ||
// unload the ebpf hooks from the kernel | ||
stopKeploy(); | ||
// delete jacoco files | ||
deleteJacocoFiles(); | ||
} catch (Exception e) { | ||
logger.error("Error occurred while fetching test sets: " + e.getMessage(), e); | ||
} | ||
stopKeploy(); | ||
deleteJacocoFiles(); | ||
} | ||
|
||
public static void startKeploy(String runCmd, int delay, boolean debug, int port) { | ||
|
@@ -735,8 +743,6 @@ private static void waitForTestRunCompletion(String testRunId, String testSet, S | |
testRunStatus = Keploy.FetchTestSetStatus(testRunId, testSet); | ||
|
||
if (testRunStatus == Keploy.TestRunStatus.RUNNING) { | ||
System.out.println("Test run still in progress"); | ||
|
||
if (System.currentTimeMillis() - startTime > MAX_TIMEOUT) { | ||
System.out.println("Timeout reached, exiting loop"); | ||
break; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocVariableCheck> reported by reviewdog 🐶
Missing a Javadoc comment.