-
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
feat: add deduplication in java according to v2 #163
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Sarthak160 <[email protected]>
Signed-off-by: Sarthak160 <[email protected]>
@@ -0,0 +1,8 @@ | |||
package io.keploy.cli; |
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.JavadocPackageCheck> reported by reviewdog 🐶
Missing package-info.java file.
|
||
public class KeployUtils { | ||
|
||
|
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.regexp.RegexpSinglelineCheck> reported by reviewdog 🐶
Line has trailing spaces.
@@ -420,4 +420,71 @@ private static int getCurrentPid() { | |||
String processName = ManagementFactory.getRuntimeMXBean().getName(); | |||
return Integer.parseInt(processName.split("@")[0]); | |||
} | |||
|
|||
public static void runTestsAndCoverage(String jarPath, String[] testSets) { |
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.MissingJavadocMethodCheck> reported by reviewdog 🐶
Missing a Javadoc comment.
@@ -420,4 +420,71 @@ private static int getCurrentPid() { | |||
String processName = ManagementFactory.getRuntimeMXBean().getName(); | |||
return Integer.parseInt(processName.split("@")[0]); | |||
} | |||
|
|||
public static void runTestsAndCoverage(String jarPath, String[] testSets) { |
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.FinalParametersCheck> reported by reviewdog 🐶
Parameter jarPath should be final.
@@ -420,4 +420,71 @@ private static int getCurrentPid() { | |||
String processName = ManagementFactory.getRuntimeMXBean().getName(); | |||
return Integer.parseInt(processName.split("@")[0]); | |||
} | |||
|
|||
public static void runTestsAndCoverage(String jarPath, String[] testSets) { |
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.FinalParametersCheck> reported by reviewdog 🐶
Parameter testSets should be final.
} | ||
} | ||
|
||
private static void waitForTestRunCompletion(String testRunId) { |
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.FinalParametersCheck> reported by reviewdog 🐶
Parameter testRunId should be final.
|
||
private static void waitForTestRunCompletion(String testRunId) { | ||
// Implement the logic to wait for test run completion using KeployCLI | ||
long MAX_TIMEOUT = 6000000; // 1m |
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.naming.LocalVariableNameCheck> reported by reviewdog 🐶
Name 'MAX_TIMEOUT' must match pattern '^[a-z][a-zA-Z0-9]*$'.
|
||
private static void waitForTestRunCompletion(String testRunId) { | ||
// Implement the logic to wait for test run completion using KeployCLI | ||
long MAX_TIMEOUT = 6000000; // 1m |
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.coding.MagicNumberCheck> reported by reviewdog 🐶
'6000000' is a magic number.
KeployCLI.TestRunStatus testRunStatus; | ||
|
||
while (true) { | ||
Thread.sleep(2000); |
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.coding.MagicNumberCheck> reported by reviewdog 🐶
'2000' is a magic number.
System.out.println("Test run passed"); | ||
} | ||
} catch (InterruptedException e) { | ||
System.err.println("Error waiting for test run completion: " + e.getMessage()); |
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.sizes.LineLengthCheck> reported by reviewdog 🐶
Line is longer than 80 characters (found 91).
Signed-off-by: charankamarapu <[email protected]>
|
||
try { | ||
KeployCLI.FindCoverage(testSet); | ||
Thread.sleep(5000); |
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.coding.MagicNumberCheck> reported by reviewdog 🐶
'5000' is a magic number.
Related Issue
Closes: #[issue number that will be closed through this PR]
Describe the changes you've made
target/site
folder . Here you can analyse through coverage reports present attarget/site/e2e-ut-aggregate/index.html
in the form of HTML .Type of change
How did you test your code changes?
Please describe the tests(if any). Provide instructions how its affecting the coverage.
Describe if there is any unusual behaviour of your code(Write
NA
if there isn't)A clear and concise description of it.
Checklist:
Screenshots (if any)