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 2021/08/22 13:18:58 UTC
[commons-pool] branch master updated: Remove unused exceptions from
test methods.
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 feb5f9d Remove unused exceptions from test methods.
feb5f9d is described below
commit feb5f9d3313dc85f77cf7463af7f316eb5c5578b
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sun Aug 22 09:18:56 2021 -0400
Remove unused exceptions from test methods.
---
src/test/java/org/apache/commons/pool2/TestBaseObjectPool.java | 2 +-
.../java/org/apache/commons/pool2/impl/TestAbandonedObjectPool.java | 2 +-
.../java/org/apache/commons/pool2/impl/TestDefaultPooledObject.java | 4 ++--
.../org/apache/commons/pool2/impl/TestGenericKeyedObjectPool.java | 6 +++---
4 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/test/java/org/apache/commons/pool2/TestBaseObjectPool.java b/src/test/java/org/apache/commons/pool2/TestBaseObjectPool.java
index faa1f70..71b99da 100644
--- a/src/test/java/org/apache/commons/pool2/TestBaseObjectPool.java
+++ b/src/test/java/org/apache/commons/pool2/TestBaseObjectPool.java
@@ -262,7 +262,7 @@ public class TestBaseObjectPool extends TestObjectPool {
// tests
@Test
- public void testUnsupportedOperations() throws Exception {
+ public void testUnsupportedOperations() {
if (!getClass().equals(TestBaseObjectPool.class)) {
return; // skip redundant tests
}
diff --git a/src/test/java/org/apache/commons/pool2/impl/TestAbandonedObjectPool.java b/src/test/java/org/apache/commons/pool2/impl/TestAbandonedObjectPool.java
index dd5e164..bae22ab 100644
--- a/src/test/java/org/apache/commons/pool2/impl/TestAbandonedObjectPool.java
+++ b/src/test/java/org/apache/commons/pool2/impl/TestAbandonedObjectPool.java
@@ -218,7 +218,7 @@ public class TestAbandonedObjectPool {
@SuppressWarnings("deprecation")
@BeforeEach
- public void setUp() throws Exception {
+ public void setUp() {
abandonedConfig = new AbandonedConfig();
// Uncomment the following line to enable logging:
diff --git a/src/test/java/org/apache/commons/pool2/impl/TestDefaultPooledObject.java b/src/test/java/org/apache/commons/pool2/impl/TestDefaultPooledObject.java
index 9ae69b1..abf8a0b 100644
--- a/src/test/java/org/apache/commons/pool2/impl/TestDefaultPooledObject.java
+++ b/src/test/java/org/apache/commons/pool2/impl/TestDefaultPooledObject.java
@@ -20,8 +20,8 @@ import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.lessThan;
import static org.hamcrest.Matchers.lessThanOrEqualTo;
import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
import java.time.Duration;
import java.util.ArrayList;
@@ -81,7 +81,7 @@ public class TestDefaultPooledObject {
}
@Test
- public void testInitialStateCreateInstant() throws InterruptedException {
+ public void testInitialStateCreateInstant() {
final PooledObject<Object> dpo = new DefaultPooledObject<>(new Object());
// In the initial state, all instants are the creation instant: last borrow, last use, last return.
diff --git a/src/test/java/org/apache/commons/pool2/impl/TestGenericKeyedObjectPool.java b/src/test/java/org/apache/commons/pool2/impl/TestGenericKeyedObjectPool.java
index 13626dc..00ec161 100644
--- a/src/test/java/org/apache/commons/pool2/impl/TestGenericKeyedObjectPool.java
+++ b/src/test/java/org/apache/commons/pool2/impl/TestGenericKeyedObjectPool.java
@@ -851,7 +851,7 @@ public class TestGenericKeyedObjectPool extends TestKeyedObjectPool {
}
@BeforeEach
- public void setUp() throws Exception {
+ public void setUp() {
simpleFactory = new SimpleFactory<>();
gkoPool = new GenericKeyedObjectPool<>(simpleFactory);
}
@@ -1884,7 +1884,7 @@ public class TestGenericKeyedObjectPool extends TestKeyedObjectPool {
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
- public void testMaxTotalPerKeyZero() throws Exception {
+ public void testMaxTotalPerKeyZero() {
gkoPool.setMaxTotalPerKey(0);
gkoPool.setBlockWhenExhausted(false);
@@ -1934,7 +1934,7 @@ public class TestGenericKeyedObjectPool extends TestKeyedObjectPool {
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
- public void testMaxTotalZero() throws Exception {
+ public void testMaxTotalZero() {
gkoPool.setMaxTotal(0);
gkoPool.setBlockWhenExhausted(false);