Skip to content

Commit

Permalink
Update the dependencies and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
corcoja committed Jan 14, 2022
1 parent 12e181c commit 0126827
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 20 deletions.
10 changes: 5 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>io.boomerang</groupId>
<artifactId>lib-eventing</artifactId>
<version>0.2.3</version>
<version>0.2.4</version>
<name>Boomerang Lib Eventing</name>
<url>https://github.com/boomerang-io/lib.eventing</url>

Expand All @@ -25,7 +25,7 @@
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.16.0</version>
<version>2.17.1</version>
</dependency>
<dependency>
<groupId>org.jacoco</groupId>
Expand All @@ -35,19 +35,19 @@
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.8.1</version>
<version>5.8.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>berlin.yuna</groupId>
<artifactId>nats-server</artifactId>
<version>2.2.25</version>
<version>2.6.16</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.awaitility</groupId>
<artifactId>awaitility</artifactId>
<version>4.1.0</version>
<version>4.1.1</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ public void unsubscribe() {
}

// Unset the subscription
subHandlerRef = null;
subHandlerRef = new WeakReference<>(null);
jetstreamSubscription = null;
subscriptionActive.set(false);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ public class ConnectionPrimerTest {
@BeforeEach
void setupNatsServer() {
// @formatter:off
natsServer = new Nats()
.port(SERVER_PORT)
natsServer = new Nats(SERVER_PORT)
.config(NatsConfig.JETSTREAM, "true")
.config(NatsConfig.STORE_DIR, jetstreamStoreDir);
// @formatter:on
Expand All @@ -62,7 +61,7 @@ void cleanUpServer() {
}

@Test
public void testConnectToServer() throws IOException {
public void testConnectToServer() throws Exception {
natsServer.start();

final ConnectionPrimer connectionPrimer = new ConnectionPrimer(serverUrl);
Expand All @@ -76,7 +75,7 @@ public void testConnectToServer() throws IOException {
}

@Test
public void testConnectBeforeServerStarted() throws IOException, InterruptedException {
public void testConnectBeforeServerStarted() throws Exception {
final ConnectionPrimer connectionPrimer = new ConnectionPrimer(
new Options.Builder().server(serverUrl).reconnectWait(Duration.ofMillis(500)));

Expand Down Expand Up @@ -107,7 +106,7 @@ public void testNeverConnected() throws InterruptedException {
}

@Test
public void testListenerUpdates() throws IOException, InterruptedException {
public void testListenerUpdates() throws Exception {
final AtomicBoolean serverIsOnline = new AtomicBoolean(false);
final AtomicInteger fails = new AtomicInteger();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ public class PubSubTransceiverTest {
@BeforeEach
void setupNatsServer() {
// @formatter:off
natsServer = new Nats()
.port(SERVER_PORT)
natsServer = new Nats(SERVER_PORT)
.config(NatsConfig.JETSTREAM, "true")
.config(NatsConfig.STORE_DIR, jetstreamStoreDir);
// @formatter:on
Expand All @@ -65,7 +64,7 @@ void cleanUpServer() {
}

@Test
void testPubSubPushConsumer() throws IOException, InterruptedException {
void testPubSubPushConsumer() throws Exception {
List<String> testSubjects = List.of("test1", "test2", "test3", "test4", "test4");
String testMessage = "Test message!";

Expand Down Expand Up @@ -103,7 +102,7 @@ public void newMessageReceived(PubSubTunnel tunnel, String subject, String messa
}

@Test
void testPubSubPullConsumer() throws IOException, InterruptedException {
void testPubSubPullConsumer() throws Exception {
List<String> testSubjects = List.of("test1", "test2", "test3", "test4", "test4");
String testMessage = "Test message!";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ public class PubTransmitterTest {
@BeforeEach
void setupNatsServer() {
// @formatter:off
natsServer = new Nats()
.port(SERVER_PORT)
natsServer = new Nats(SERVER_PORT)
.config(NatsConfig.JETSTREAM, "true")
.config(NatsConfig.STORE_DIR, jetstreamStoreDir);
// @formatter:on
Expand All @@ -62,7 +61,7 @@ void cleanUpServer() {
}

@Test
void testSubjectMatch() throws IOException {
void testSubjectMatch() throws Exception {
natsServer.start();

final ConnectionPrimer connectionPrimer = new ConnectionPrimer(serverUrl);
Expand All @@ -79,7 +78,7 @@ void testSubjectMatch() throws IOException {
}

@Test
void testCreateStream() throws IOException {
void testCreateStream() throws Exception {
natsServer.start();

final ConnectionPrimer connectionPrimer = new ConnectionPrimer(serverUrl);
Expand All @@ -103,7 +102,7 @@ void testCreateStream() throws IOException {
}

@Test
void testServerConnection() throws IOException, InterruptedException {
void testServerConnection() throws Exception {
final ConnectionPrimer connectionPrimer = new ConnectionPrimer(
new Options.Builder().server(serverUrl).reconnectWait(Duration.ofMillis(500)));

Expand Down

0 comments on commit 0126827

Please sign in to comment.