-
Notifications
You must be signed in to change notification settings - Fork 0
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
Improve timestamps #20
base: main
Are you sure you want to change the base?
Conversation
# Conflicts: # src/main/java/de/rub/nds/anvilcore/execution/TestRunner.java # src/main/java/de/rub/nds/anvilcore/teststate/AnvilTestRun.java
pom.xml
Outdated
@@ -8,7 +8,7 @@ | |||
</parent> | |||
<groupId>de.rub.nds</groupId> | |||
<artifactId>anvil-core</artifactId> | |||
<version>1.1.4-SNAPSHOT</version> | |||
<version>1.1.3</version> |
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.
version number should always be left as is at snapshot
return startInputGenerationTimes; | ||
} | ||
|
||
public synchronized Date getStartInputGenerationTime(String k) { |
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.
use descirptive parameter names
@@ -98,11 +99,16 @@ public void runTests() { | |||
(MethodBasedTestDescriptor) descriptor; | |||
Method method = md.getTestMethod(); | |||
String anvilTestId = null; | |||
try { | |||
if (method.getAnnotation(AnvilTest.class) != null) |
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.
alwys use curly braces for if/else statement blocks
@@ -314,7 +327,7 @@ public void executionFinished( | |||
public void logTestFinished( | |||
TestExecutionResult testExecutionResult, TestIdentifier testIdentifier) { | |||
if (testExecutionResult.getThrowable().isPresent() && testIdentifier.isContainer()) { | |||
LOGGER.error( | |||
LOGGER.info( |
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.
why the change?
@@ -183,8 +195,28 @@ public void finish() { | |||
scoreContainer.updateForResult(result); | |||
AnvilContext.getInstance() | |||
.addTestResult(result, testClass.getName() + "." + testMethod.getName()); | |||
AnvilContext.getInstance().getMapper().saveTestRunToPath(this); | |||
// AnvilContext.getInstance().testFinished(uniqueId); |
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.
delete uncommented code
.getEndInputGenerationTimes() | ||
.get(this.testMethod.toString()); | ||
this.setStartInputGenerationTime(startInputGenerationTimes); | ||
this.setEndInputGenerationTime(endInputGenerationTimes); |
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.
Could you change it from date to seconds elapsed? Attrbutes could be named like "generationTimeSeconds" and "executionTimeSeconds"
…timestamps # Conflicts: # pom.xml # src/main/java/de/rub/nds/anvilcore/junit/extension/AnvilTestWatcher.java
No description provided.