mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[junit 5] JUnit5TestExecutionListener: use System#nanoTime for duration computation
GitOrigin-RevId: fbfee40c2884c93493ed723a7100ac535ce8ab11
This commit is contained in:
committed by
intellij-monorepo-bot
parent
49b5521ccd
commit
2278d05ac4
@@ -138,7 +138,7 @@ public class JUnit5TestExecutionListener implements TestExecutionListener {
|
||||
public void executionStarted(TestIdentifier testIdentifier) {
|
||||
if (testIdentifier.isTest()) {
|
||||
testStarted(testIdentifier);
|
||||
myCurrentTestStart = System.currentTimeMillis();
|
||||
myCurrentTestStart = System.nanoTime();
|
||||
}
|
||||
else if (!shouldSkipContainer(testIdentifier)) {
|
||||
myFinishCount = 0;
|
||||
@@ -216,7 +216,7 @@ public class JUnit5TestExecutionListener implements TestExecutionListener {
|
||||
}
|
||||
|
||||
protected long getDuration() {
|
||||
return System.currentTimeMillis() - myCurrentTestStart;
|
||||
return (System.nanoTime() - myCurrentTestStart) / 1_000_000;
|
||||
}
|
||||
|
||||
private void testStarted(TestIdentifier testIdentifier) {
|
||||
|
||||
Reference in New Issue
Block a user