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 2024/09/01 23:03:59 UTC

(commons-pool) branch master updated: Use Assertions.assertInstanceOf()

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


The following commit(s) were added to refs/heads/master by this push:
     new 851fdc4a Use Assertions.assertInstanceOf()
851fdc4a is described below

commit 851fdc4ab407b3e6e3b0b46e042c8a5c4c06c839
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sun Sep 1 19:03:54 2024 -0400

    Use Assertions.assertInstanceOf()
---
 .../java/org/apache/commons/pool3/impl/TestGenericObjectPool.java     | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/test/java/org/apache/commons/pool3/impl/TestGenericObjectPool.java b/src/test/java/org/apache/commons/pool3/impl/TestGenericObjectPool.java
index 2abc0259..537b7e42 100644
--- a/src/test/java/org/apache/commons/pool3/impl/TestGenericObjectPool.java
+++ b/src/test/java/org/apache/commons/pool3/impl/TestGenericObjectPool.java
@@ -21,6 +21,7 @@ import static org.hamcrest.MatcherAssert.assertThat;
 import static org.hamcrest.Matchers.lessThanOrEqualTo;
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertInstanceOf;
 import static org.junit.jupiter.api.Assertions.assertNotEquals;
 import static org.junit.jupiter.api.Assertions.assertNotNull;
 import static org.junit.jupiter.api.Assertions.assertNull;
@@ -64,7 +65,6 @@ import org.apache.commons.pool3.Waiter;
 import org.apache.commons.pool3.WaiterFactory;
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeEach;
-import org.junit.jupiter.api.Disabled;
 import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.Timeout;
 
@@ -1156,7 +1156,7 @@ public class TestGenericObjectPool extends TestBaseObjectPool {
         }
         // Failure expected
         assertNotNull(ex);
-        assertTrue(ex instanceof NoSuchElementException);
+        assertInstanceOf(NoSuchElementException.class, ex);
         assertNull(obj);
 
         // Configure factory to create valid objects so subsequent borrows work