Skip to content
Permalink
Browse files
Test old and new APIs.
  • Loading branch information
Gary Gregory committed Aug 13, 2021
1 parent 286baea commit 4740044e38744fd4b3a736de4462a987997c2355
Showing 1 changed file with 7 additions and 3 deletions.
@@ -91,14 +91,18 @@ public void testGetIdleTimeMillis() throws Exception {
final ExecutorService executor = Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors() * 3);
final Runnable allocateAndDeallocateTask = () -> {
for (int i1 = 0; i1 < 10000; i1++) {
if (dpo.getIdleTime().isNegative()) {
if (dpo.getIdleDuration().isNegative() || dpo.getIdleTime().isNegative()) {
negativeIdleTimeReturned.set(true);
break;
}
if (dpo.getIdleDuration().isNegative() || dpo.getIdleTime().isNegative()) {
negativeIdleTimeReturned.set(true);
break;
}
}
dpo.allocate();
for (int i2 = 0; i2 < 10000; i2++) {
if (dpo.getIdleTime().isNegative()) {
if (dpo.getIdleDuration().isNegative() || dpo.getIdleTime().isNegative()) {
negativeIdleTimeReturned.set(true);
break;
}
@@ -107,7 +111,7 @@ public void testGetIdleTimeMillis() throws Exception {
};
final Runnable getIdleTimeTask = () -> {
for (int i = 0; i < 10000; i++) {
if (dpo.getIdleTime().isNegative()) {
if (dpo.getIdleDuration().isNegative() || dpo.getIdleTime().isNegative()) {
negativeIdleTimeReturned.set(true);
break;
}

0 comments on commit 4740044

Please sign in to comment.