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-lang.git
The following commit(s) were added to refs/heads/master by this push:
new 6b0795737 Javadoc and comments
6b0795737 is described below
commit 6b079573792690b91f2afd1e0a94f622f0e1dee9
Author: Gary D. Gregory <[email protected]>
AuthorDate: Thu Jun 19 16:02:18 2025 -0400
Javadoc and comments
---
.../concurrent/locks/LockingVisitorsTest.java | 33 ++++++++--------------
1 file changed, 11 insertions(+), 22 deletions(-)
diff --git
a/src/test/java/org/apache/commons/lang3/concurrent/locks/LockingVisitorsTest.java
b/src/test/java/org/apache/commons/lang3/concurrent/locks/LockingVisitorsTest.java
index 9dd9e10b5..8a5fb8a89 100644
---
a/src/test/java/org/apache/commons/lang3/concurrent/locks/LockingVisitorsTest.java
+++
b/src/test/java/org/apache/commons/lang3/concurrent/locks/LockingVisitorsTest.java
@@ -35,6 +35,9 @@
import org.apache.commons.lang3.function.FailableConsumer;
import org.junit.jupiter.api.Test;
+/**
+ * Tests {@link LockingVisitors}.
+ */
class LockingVisitorsTest extends AbstractLangTest {
private static final Duration SHORT_DELAY = Duration.ofMillis(100);
@@ -109,24 +112,18 @@ void testDeprecatedConstructor() {
@Test
void testReentrantReadWriteLockExclusive() throws Exception {
-
- /*
- * If our threads are running concurrently, then we expect to be no
faster than running one after the other.
- */
+ // If our threads are running concurrently, then we expect to be no
faster than running one after the other.
final boolean[] booleanValues = new boolean[10];
runTest(DELAY, true, millis -> assertTrue(millis >=
TOTAL_DELAY.toMillis()), booleanValues,
- LockingVisitors.reentrantReadWriteLockVisitor(booleanValues));
+ LockingVisitors.reentrantReadWriteLockVisitor(booleanValues));
}
@Test
void testReentrantReadWriteLockNotExclusive() throws Exception {
-
- /*
- * If our threads are running concurrently, then we expect to be
faster than running one after the other.
- */
+ // If our threads are running concurrently, then we expect to be
faster than running one after the other.
final boolean[] booleanValues = new boolean[10];
runTest(DELAY, false, millis -> assertTrue(millis <
TOTAL_DELAY.toMillis()), booleanValues,
- LockingVisitors.reentrantReadWriteLockVisitor(booleanValues));
+ LockingVisitors.reentrantReadWriteLockVisitor(booleanValues));
}
@Test
@@ -143,23 +140,15 @@ void testResultValidation() {
@Test
void testStampedLockExclusive() throws Exception {
-
- /*
- * If our threads are running concurrently, then we expect to be no
faster than running one after the other.
- */
+ // If our threads are running concurrently, then we expect to be no
faster than running one after the other.
final boolean[] booleanValues = new boolean[10];
- runTest(DELAY, true, millis -> assertTrue(millis >=
TOTAL_DELAY.toMillis()), booleanValues,
- LockingVisitors.stampedLockVisitor(booleanValues));
+ runTest(DELAY, true, millis -> assertTrue(millis >=
TOTAL_DELAY.toMillis()), booleanValues,
LockingVisitors.stampedLockVisitor(booleanValues));
}
@Test
void testStampedLockNotExclusive() throws Exception {
-
- /*
- * If our threads are running concurrently, then we expect to be
faster than running one after the other.
- */
+ // If our threads are running concurrently, then we expect to be
faster than running one after the other.
final boolean[] booleanValues = new boolean[10];
- runTest(DELAY, false, millis -> assertTrue(millis <
TOTAL_DELAY.toMillis()), booleanValues,
- LockingVisitors.stampedLockVisitor(booleanValues));
+ runTest(DELAY, false, millis -> assertTrue(millis <
TOTAL_DELAY.toMillis()), booleanValues,
LockingVisitors.stampedLockVisitor(booleanValues));
}
}