This is an automated email from the ASF dual-hosted git repository. garydgregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-lang.git
commit 5e4f4655e527d4a2665b21ab172cb29c9c2c9b4f Author: Gary Gregory <[email protected]> AuthorDate: Wed Nov 18 13:37:31 2026 -0500 Sort members --- .../org/apache/commons/lang3/ThreadUtilsTest.java | 24 +++++++++++----------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/test/java/org/apache/commons/lang3/ThreadUtilsTest.java b/src/test/java/org/apache/commons/lang3/ThreadUtilsTest.java index 1990fe4d3..88e5f0df3 100644 --- a/src/test/java/org/apache/commons/lang3/ThreadUtilsTest.java +++ b/src/test/java/org/apache/commons/lang3/ThreadUtilsTest.java @@ -51,18 +51,6 @@ */ class ThreadUtilsTest extends AbstractLangTest { - @ParameterizedTest - @ValueSource(longs = { -1, -999_999, -1_000_001 }) - void testJoinRejectsNegativeDuration(final long nanos) { - assertIllegalArgumentException(() -> ThreadUtils.join(new Thread(), Duration.ofNanos(nanos))); - } - - @ParameterizedTest - @ValueSource(longs = { -1, -999_999, -1_000_001 }) - void testSleepRejectsNegativeDuration(final long nanos) { - assertIllegalArgumentException(() -> ThreadUtils.sleep(Duration.ofNanos(nanos))); - } - private static final class TestThread extends Thread { private final CountDownLatch latch = new CountDownLatch(1); @@ -210,6 +198,12 @@ void testJoinDurationZero() throws InterruptedException { ThreadUtils.join(new Thread(), Duration.ZERO); } + @ParameterizedTest + @ValueSource(longs = { -1, -999_999, -1_000_001 }) + void testJoinRejectsNegativeDuration(final long nanos) { + assertIllegalArgumentException(() -> ThreadUtils.join(new Thread(), Duration.ofNanos(nanos))); + } + @Test void testNoThread() { assertEquals(0, ThreadUtils.findThreadsByName("some_thread_which_does_not_exist_18762ZucTT").size()); @@ -302,6 +296,12 @@ void testSleepQuietlyRejectsNegativeDuration(final long nanos) { assertIllegalArgumentException(() -> ThreadUtils.sleepQuietly(Duration.ofNanos(nanos))); } + @ParameterizedTest + @ValueSource(longs = { -1, -999_999, -1_000_001 }) + void testSleepRejectsNegativeDuration(final long nanos) { + assertIllegalArgumentException(() -> ThreadUtils.sleep(Duration.ofNanos(nanos))); + } + @Test void testSystemThreadGroupExists() { final ThreadGroup systemThreadGroup = ThreadUtils.getSystemThreadGroup();
