Skip to content
Permalink
Browse files
Remove unused exceptions from test methods.
  • Loading branch information
Gary Gregory committed Aug 22, 2021
1 parent 7aef038 commit feb5f9d3313dc85f77cf7463af7f316eb5c5578b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
@@ -262,7 +262,7 @@ public void testClose() {

// tests
@Test
public void testUnsupportedOperations() throws Exception {
public void testUnsupportedOperations() {
if (!getClass().equals(TestBaseObjectPool.class)) {
return; // skip redundant tests
}
@@ -218,7 +218,7 @@ public boolean validateObject(final PooledObject<PooledTestObject> obj) {

@SuppressWarnings("deprecation")
@BeforeEach
public void setUp() throws Exception {
public void setUp() {
abandonedConfig = new AbandonedConfig();

// Uncomment the following line to enable logging:
@@ -20,8 +20,8 @@
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 void testInitialStateIdleDuration() throws InterruptedException {
}

@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.
@@ -851,7 +851,7 @@ public <T> void runTestThreads(final int numThreads, final int iterations, final
}

@BeforeEach
public void setUp() throws Exception {
public void setUp() {
simpleFactory = new SimpleFactory<>();
gkoPool = new GenericKeyedObjectPool<>(simpleFactory);
}
@@ -1884,7 +1884,7 @@ public void testMaxTotalPerKey() throws Exception {

@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 void testMaxTotalWithThreads() throws Exception {

@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
public void testMaxTotalZero() throws Exception {
public void testMaxTotalZero() {
gkoPool.setMaxTotal(0);
gkoPool.setBlockWhenExhausted(false);

0 comments on commit feb5f9d

Please sign in to comment.