You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2022/08/30 21:25:41 UTC
[commons-pool] 02/03: Use scale in test names
This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-pool.git
commit c0ea911402d25cd5d77314a29f09a8c45f7ba6ef
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Tue Aug 30 17:22:13 2022 -0400
Use scale in test names
---
.../pool2/impl/TestAbandonedKeyedObjectPool.java | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/src/test/java/org/apache/commons/pool2/impl/TestAbandonedKeyedObjectPool.java b/src/test/java/org/apache/commons/pool2/impl/TestAbandonedKeyedObjectPool.java
index a91c8d2f..7c59c314 100644
--- a/src/test/java/org/apache/commons/pool2/impl/TestAbandonedKeyedObjectPool.java
+++ b/src/test/java/org/apache/commons/pool2/impl/TestAbandonedKeyedObjectPool.java
@@ -80,17 +80,17 @@ public class TestAbandonedKeyedObjectPool {
private static class SimpleFactory implements KeyedPooledObjectFactory<Integer, PooledTestObject, InterruptedException> {
- private final long destroyLatency;
- private final long validateLatency;
+ private final long destroyLatencyMillis;
+ private final long validateLatencyMillis;
public SimpleFactory() {
- destroyLatency = 0;
- validateLatency = 0;
+ destroyLatencyMillis = 0;
+ validateLatencyMillis = 0;
}
- public SimpleFactory(final long destroyLatency, final long validateLatency) {
- this.destroyLatency = destroyLatency;
- this.validateLatency = validateLatency;
+ public SimpleFactory(final long destroyLatencyMillis, final long validateLatencyMillis) {
+ this.destroyLatencyMillis = destroyLatencyMillis;
+ this.validateLatencyMillis = validateLatencyMillis;
}
@Override
@@ -109,8 +109,8 @@ public class TestAbandonedKeyedObjectPool {
// while destroying instances, yield control to other threads
// helps simulate threading errors
Thread.yield();
- if (destroyLatency != 0) {
- Thread.sleep(destroyLatency);
+ if (destroyLatencyMillis != 0) {
+ Thread.sleep(destroyLatencyMillis);
}
obj.getObject().destroy(destroyMode);
}
@@ -127,7 +127,7 @@ public class TestAbandonedKeyedObjectPool {
@Override
public boolean validateObject(final Integer key, final PooledObject<PooledTestObject> obj) {
- Waiter.sleepQuietly(validateLatency);
+ Waiter.sleepQuietly(validateLatencyMillis);
return true;
}
}