Skip to content

Commit 7c9e38d

Browse files
Update SolaceSparkStreamingSinkIT.java
1 parent 9e58f30 commit 7c9e38d

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/test/java/com/solacecoe/connectors/spark/SolaceSparkStreamingSinkIT.java

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import com.solacecoe.connectors.spark.base.SempV2Api;
88
import com.solacecoe.connectors.spark.base.SolaceSession;
99
import com.solacecoe.connectors.spark.streaming.properties.SolaceSparkStreamingProperties;
10+
import com.solacecoe.connectors.spark.streaming.solace.SolaceConnectionManager;
1011
import com.solacesystems.jcsmp.*;
1112
import org.apache.spark.api.java.function.VoidFunction2;
1213
import org.apache.spark.sql.Dataset;
@@ -146,6 +147,8 @@ public void afterEach() throws IOException {
146147
if(Files.exists(path2)) {
147148
FileUtils.deleteDirectory(path2.toAbsolutePath().toFile());
148149
}
150+
151+
SolaceConnectionManager.closeAllConnections();
149152
}
150153

151154
@Test
@@ -806,7 +809,7 @@ public void onException(JCSMPException e) {
806809
}
807810

808811
@Test
809-
@Order(13)
812+
@Order(16)
810813
void Should_Not_ProcessData_When_QueueIsEmpty() throws TimeoutException, InterruptedException {
811814
Path path = Paths.get("src", "test", "resources", "spark-checkpoint-1");
812815
final long[] batchTriggerCount = {0};
@@ -866,7 +869,7 @@ public void onException(JCSMPException e) {
866869
}
867870

868871
@Test
869-
@Order(14)
872+
@Order(13)
870873
void Should_ProcessData_Publish_MicrosAs_SenderTimeStamp_To_Solace() throws TimeoutException, InterruptedException {
871874
Path path = Paths.get("src", "test", "resources", "spark-checkpoint-1");
872875
DataStreamReader reader = sparkSession.readStream()
@@ -920,7 +923,7 @@ public void onException(JCSMPException e) {
920923
}
921924

922925
@Test
923-
@Order(15)
926+
@Order(14)
924927
void Should_ProcessData_And_Publish_MillisAs_SenderTimeStamp_To_Solace() throws TimeoutException, InterruptedException {
925928
Path path = Paths.get("src", "test", "resources", "spark-checkpoint-1");
926929
DataStreamReader reader = sparkSession.readStream()
@@ -975,7 +978,7 @@ public void onException(JCSMPException e) {
975978
}
976979

977980
@Test
978-
@Order(16)
981+
@Order(15)
979982
void Should_ProcessData_And_Publish_SecondsAs_SenderTimeStamp_To_Solace() throws TimeoutException, InterruptedException {
980983
Path path = Paths.get("src", "test", "resources", "spark-checkpoint-1");
981984
DataStreamReader reader = sparkSession.readStream()

0 commit comments

Comments
 (0)