This is an automated email from the ASF dual-hosted git repository.
ctubbsii pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/fluo.git
The following commit(s) were added to refs/heads/main by this push:
new e02d5bf0 Remove use of deprecated ExpectedException.none() in
TransactorIT (#1127)
e02d5bf0 is described below
commit e02d5bf03775af5731819a923171563319c9aafb
Author: Dom G <[email protected]>
AuthorDate: Thu Dec 1 16:16:03 2022 -0500
Remove use of deprecated ExpectedException.none() in TransactorIT (#1127)
* Remove use of deprecated ExpectedException.none() in TransactorIT
* Limit scope of code in assertThrows
---
.../main/java/org/apache/fluo/integration/impl/TransactorIT.java | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git
a/modules/integration-tests/src/main/java/org/apache/fluo/integration/impl/TransactorIT.java
b/modules/integration-tests/src/main/java/org/apache/fluo/integration/impl/TransactorIT.java
index 61229d57..bf26936e 100644
---
a/modules/integration-tests/src/main/java/org/apache/fluo/integration/impl/TransactorIT.java
+++
b/modules/integration-tests/src/main/java/org/apache/fluo/integration/impl/TransactorIT.java
@@ -23,7 +23,6 @@ import org.apache.fluo.integration.ITBaseImpl;
import org.junit.Assert;
import org.junit.Rule;
import org.junit.Test;
-import org.junit.rules.ExpectedException;
import org.junit.rules.Timeout;
/**
@@ -37,9 +36,6 @@ public class TransactorIT extends ITBaseImpl {
public static final Long id2 = Long.valueOf(3);
public static final long NUM_OPEN_TIMEOUT_MS = 1000;
- @Rule
- public ExpectedException exception = ExpectedException.none();
-
@Test
public void testTransactorAndCache() throws Exception {
@@ -111,9 +107,7 @@ public class TransactorIT extends ITBaseImpl {
assertNumOpen(0);
Assert.assertFalse(checkExists(t1));
- // Test for exception to be called
- exception.expect(IllegalStateException.class);
- t1.getTransactorID().getLongID();
+ Assert.assertThrows(IllegalStateException.class, () ->
t1.getTransactorID());
}
@Test(timeout = 30000)