|
7 | 7 | import com.solacecoe.connectors.spark.base.SempV2Api; |
8 | 8 | import com.solacecoe.connectors.spark.base.SolaceSession; |
9 | 9 | import com.solacecoe.connectors.spark.streaming.properties.SolaceSparkStreamingProperties; |
| 10 | +import com.solacecoe.connectors.spark.streaming.solace.SolaceConnectionManager; |
10 | 11 | import com.solacesystems.jcsmp.*; |
11 | 12 | import org.apache.spark.api.java.function.VoidFunction2; |
12 | 13 | import org.apache.spark.sql.Dataset; |
@@ -146,6 +147,8 @@ public void afterEach() throws IOException { |
146 | 147 | if(Files.exists(path2)) { |
147 | 148 | FileUtils.deleteDirectory(path2.toAbsolutePath().toFile()); |
148 | 149 | } |
| 150 | + |
| 151 | + SolaceConnectionManager.closeAllConnections(); |
149 | 152 | } |
150 | 153 |
|
151 | 154 | @Test |
@@ -806,7 +809,7 @@ public void onException(JCSMPException e) { |
806 | 809 | } |
807 | 810 |
|
808 | 811 | @Test |
809 | | - @Order(13) |
| 812 | + @Order(16) |
810 | 813 | void Should_Not_ProcessData_When_QueueIsEmpty() throws TimeoutException, InterruptedException { |
811 | 814 | Path path = Paths.get("src", "test", "resources", "spark-checkpoint-1"); |
812 | 815 | final long[] batchTriggerCount = {0}; |
@@ -866,7 +869,7 @@ public void onException(JCSMPException e) { |
866 | 869 | } |
867 | 870 |
|
868 | 871 | @Test |
869 | | - @Order(14) |
| 872 | + @Order(13) |
870 | 873 | void Should_ProcessData_Publish_MicrosAs_SenderTimeStamp_To_Solace() throws TimeoutException, InterruptedException { |
871 | 874 | Path path = Paths.get("src", "test", "resources", "spark-checkpoint-1"); |
872 | 875 | DataStreamReader reader = sparkSession.readStream() |
@@ -920,7 +923,7 @@ public void onException(JCSMPException e) { |
920 | 923 | } |
921 | 924 |
|
922 | 925 | @Test |
923 | | - @Order(15) |
| 926 | + @Order(14) |
924 | 927 | void Should_ProcessData_And_Publish_MillisAs_SenderTimeStamp_To_Solace() throws TimeoutException, InterruptedException { |
925 | 928 | Path path = Paths.get("src", "test", "resources", "spark-checkpoint-1"); |
926 | 929 | DataStreamReader reader = sparkSession.readStream() |
@@ -975,7 +978,7 @@ public void onException(JCSMPException e) { |
975 | 978 | } |
976 | 979 |
|
977 | 980 | @Test |
978 | | - @Order(16) |
| 981 | + @Order(15) |
979 | 982 | void Should_ProcessData_And_Publish_SecondsAs_SenderTimeStamp_To_Solace() throws TimeoutException, InterruptedException { |
980 | 983 | Path path = Paths.get("src", "test", "resources", "spark-checkpoint-1"); |
981 | 984 | DataStreamReader reader = sparkSession.readStream() |
|
0 commit comments