diff options
author | Gary Gregory <garydgregory@gmail.com> | 2020-06-18 12:49:40 -0400 |
---|---|---|
committer | Gary Gregory <garydgregory@gmail.com> | 2020-06-18 12:49:40 -0400 |
commit | bb270696fd83de10172b2483941e52711d78d860 (patch) | |
tree | b7e05194c790918b859b5a7a1a9c2d30a22274a7 /src/test/java/org/apache | |
parent | ed0f5bea111c449fa17478d7e0c7c37c3ede3863 (diff) | |
download | apache-commons-lang-bb270696fd83de10172b2483941e52711d78d860.tar.gz |
Tests are public by convention on Commons Lang.
Diffstat (limited to 'src/test/java/org/apache')
-rw-r--r-- | src/test/java/org/apache/commons/lang3/concurrent/LocksTest.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/test/java/org/apache/commons/lang3/concurrent/LocksTest.java b/src/test/java/org/apache/commons/lang3/concurrent/LocksTest.java index 881648935..ee8fc09f4 100644 --- a/src/test/java/org/apache/commons/lang3/concurrent/LocksTest.java +++ b/src/test/java/org/apache/commons/lang3/concurrent/LocksTest.java @@ -24,11 +24,11 @@ import org.apache.commons.lang3.concurrent.Locks.Lock; import org.apache.commons.lang3.function.FailableConsumer; import org.junit.jupiter.api.Test; -class LocksTest { +public class LocksTest { private static final int NUMBER_OF_THREADS = 10; @Test - void testReadLock() throws Exception { + public void testReadLock() throws Exception { final long DELAY=3000; /** If our threads are running concurrently, then we expect to be faster * than running one after the other. @@ -36,7 +36,7 @@ class LocksTest { runTest(DELAY, false, l -> assertTrue(l < NUMBER_OF_THREADS*DELAY)); } - void testWriteLock() throws Exception { + public void testWriteLock() throws Exception { final long DELAY = 100; /** If our threads are running concurrently, then we expect to be no faster * than running one after the other. @@ -83,6 +83,7 @@ class LocksTest { booleanArray[offset] = value; } } + protected boolean someValueIsTrue(boolean[] booleanArray) { synchronized(booleanArray) { for (int i = 0; i < booleanArray.length; i++) { |