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:37 UTC
(commons-pool) branch POOL_2_X updated: Use Assertions.assertInstanceOf()
This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch POOL_2_X
in repository https://gitbox.apache.org/repos/asf/commons-pool.git
The following commit(s) were added to refs/heads/POOL_2_X by this push:
new 549e884b Use Assertions.assertInstanceOf()
549e884b is described below
commit 549e884bef9131af170e9963dae5df77ce2392a9
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sun Sep 1 19:03:33 2024 -0400
Use Assertions.assertInstanceOf()
---
src/test/java/org/apache/commons/pool2/impl/TestGenericObjectPool.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/test/java/org/apache/commons/pool2/impl/TestGenericObjectPool.java b/src/test/java/org/apache/commons/pool2/impl/TestGenericObjectPool.java
index 3df97039..ef80c115 100644
--- a/src/test/java/org/apache/commons/pool2/impl/TestGenericObjectPool.java
+++ b/src/test/java/org/apache/commons/pool2/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;
@@ -1160,7 +1161,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