Skip to content

Commit 822e65b

Browse files
committed
Revert "1) Changed version of wiremock to 1.56 (latest build with Java7), 2) Added wireMockRule.resetScenarios(); wireMockRule.resetMappings(); in the after() method of test classes 3) Removed Unstable test from the excluded tests This refer to #RESTCOMM-1501"
This reverts commit 095ba85
1 parent 095ba85 commit 822e65b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+27
-106
lines changed

Jenkinsfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ node("cxs-ups-testsuites_large") {
6565
runTestsuite("org.restcomm.connect.commons.annotations.UnstableTests or org.restcomm.connect.commons.annotations.BrokenTests", "org.restcomm.connect.commons.annotations.ParallelClassTests", "16" , "parallel-testing")
6666
} else {
6767
//exclude alt and exp to make it lighter
68-
runTestsuite("org.restcomm.connect.commons.annotations.BrokenTests or org.restcomm.connect.commons.annotations.FeatureAltTests or org.restcomm.connect.commons.annotations.FeatureExpTests", "org.restcomm.connect.commons.annotations.ParallelClassTests", "16" , "parallel-testing")
68+
runTestsuite("org.restcomm.connect.commons.annotations.UnstableTests or org.restcomm.connect.commons.annotations.BrokenTests or org.restcomm.connect.commons.annotations.FeatureAltTests or org.restcomm.connect.commons.annotations.FeatureExpTests", "org.restcomm.connect.commons.annotations.ParallelClassTests", "16" , "parallel-testing")
6969
}
7070
}
7171

restcomm/restcomm.testsuite/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@
289289
<dependency>
290290
<groupId>com.github.tomakehurst</groupId>
291291
<artifactId>wiremock</artifactId>
292-
<version>1.56</version>
292+
<version>1.57</version>
293293
<!-- Include this if you have dependency conflicts for Guava, Jetty, Jackson
294294
or Apache HTTP Client -->
295295
<classifier>standalone</classifier>
@@ -505,7 +505,7 @@
505505
every forked JVM/test class-->
506506
<arquillian_http_port>${surefire.forkNumber}509</arquillian_http_port>
507507
<arquillian_sip_port>${surefire.forkNumber}508</arquillian_sip_port>
508-
</systemPropertyVariables>
508+
</systemPropertyVariables>
509509
</configuration>
510510
</plugin>
511511
</plugins>

restcomm/restcomm.testsuite/src/test/java/org/restcomm/connect/testsuite/http/GeolocationEndpointTest.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,6 @@ public class GeolocationEndpointTest {
9292
@After
9393
public void after() throws InterruptedException {
9494
wireMockRule.resetRequests();
95-
wireMockRule.resetScenarios();
96-
wireMockRule.resetMappings();
9795
Thread.sleep(1000);
9896
}
9997

restcomm/restcomm.testsuite/src/test/java/org/restcomm/connect/testsuite/http/LiveCallModificationAnswerDelayTest.java

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,6 @@ public void after() throws Exception {
130130
}
131131
Thread.sleep(1000);
132132
wireMockRule.resetRequests();
133-
wireMockRule.resetScenarios();
134-
wireMockRule.resetMappings();
135133
Thread.sleep(4000);
136134
}
137135

@@ -700,7 +698,7 @@ public void testTerminateDialForkCallWhileRinging_LCM_to_dial_branches() throws
700698
assertTrue(bobCall.waitOutgoingCallResponse(5 * 1000));
701699
assertEquals(Response.RINGING, bobCall.getLastReceivedResponse().getStatusCode());
702700
}
703-
701+
704702
String bobCallSid = bobCall.getLastReceivedResponse().getMessage().getHeader("X-RestComm-CallSid").toString().split(":")[1].trim();
705703

706704
assertTrue(georgeCall.waitForIncomingCall(30 * 1000));
@@ -741,12 +739,12 @@ public void testTerminateDialForkCallWhileRinging_LCM_to_dial_branches() throws
741739
JsonObject jsonObj = cdr.getAsJsonObject();
742740
logger.info("Status for call: "+aliceCallSid+" : "+jsonObj.get("status").getAsString());
743741
assertTrue(jsonObj.get("status").getAsString().equalsIgnoreCase("canceled"));
744-
742+
745743
cdr = RestcommCallsTool.getInstance().getCall(deploymentUrl.toString(), adminAccountSid, adminAuthToken, georgeCallSid);
746744
jsonObj = cdr.getAsJsonObject();
747745
logger.info("Status for call: "+georgeCallSid+" : "+jsonObj.get("status").getAsString());
748746
assertTrue(jsonObj.get("status").getAsString().equalsIgnoreCase("canceled"));
749-
747+
750748
cdr = RestcommCallsTool.getInstance().getCall(deploymentUrl.toString(), adminAccountSid, adminAuthToken, bobCallSid);
751749
jsonObj = cdr.getAsJsonObject();
752750
logger.info("Status for call: "+bobCallSid+" : "+jsonObj.get("status").getAsString());
@@ -795,7 +793,7 @@ public void testTerminateDialForkCallWhileRinging_LCM_to_initial_call() throws E
795793
assertTrue(bobCall.waitOutgoingCallResponse(5 * 1000));
796794
assertEquals(Response.RINGING, bobCall.getLastReceivedResponse().getStatusCode());
797795
}
798-
796+
799797
String bobCallSid = bobCall.getLastReceivedResponse().getMessage().getHeader("X-RestComm-CallSid").toString().split(":")[1].trim();
800798

801799
// assertTrue(bobCall.waitOutgoingCallResponse(5 * 1000));
@@ -839,12 +837,12 @@ public void testTerminateDialForkCallWhileRinging_LCM_to_initial_call() throws E
839837
JsonObject jsonObj = cdr.getAsJsonObject();
840838
logger.info("Status for call: "+aliceCallSid+" : "+jsonObj.get("status").getAsString());
841839
assertTrue(jsonObj.get("status").getAsString().equalsIgnoreCase("canceled"));
842-
840+
843841
cdr = RestcommCallsTool.getInstance().getCall(deploymentUrl.toString(), adminAccountSid, adminAuthToken, georgeCallSid);
844842
jsonObj = cdr.getAsJsonObject();
845843
logger.info("Status for call: "+georgeCallSid+" : "+jsonObj.get("status").getAsString());
846844
assertTrue(jsonObj.get("status").getAsString().equalsIgnoreCase("canceled"));
847-
845+
848846
cdr = RestcommCallsTool.getInstance().getCall(deploymentUrl.toString(), adminAccountSid, adminAuthToken, bobCallSid);
849847
jsonObj = cdr.getAsJsonObject();
850848
logger.info("Status for call: "+bobCallSid+" : "+jsonObj.get("status").getAsString());
@@ -901,7 +899,7 @@ public void testTerminateDialForkCallWhileRinging_LCM_to_move_initial_call_to_ha
901899
assertTrue(bobCall.waitOutgoingCallResponse(5 * 1000));
902900
assertEquals(Response.RINGING, bobCall.getLastReceivedResponse().getStatusCode());
903901
}
904-
902+
905903
String bobCallSid = bobCall.getLastReceivedResponse().getMessage().getHeader("X-RestComm-CallSid").toString().split(":")[1].trim();
906904

907905
// assertTrue(bobCall.waitOutgoingCallResponse(5 * 1000));
@@ -939,20 +937,20 @@ public void testTerminateDialForkCallWhileRinging_LCM_to_move_initial_call_to_ha
939937

940938
assertTrue(bobCall.waitOutgoingCallResponse(5 * 1000));
941939
assertEquals(Response.REQUEST_TERMINATED, bobCall.getLastReceivedResponse().getStatusCode());
942-
940+
943941
//Wait to cancel the other branches
944942
Thread.sleep(3000);
945943

946944
JsonObject cdr = RestcommCallsTool.getInstance().getCall(deploymentUrl.toString(), adminAccountSid, adminAuthToken, aliceCallSid);
947945
JsonObject jsonObj = cdr.getAsJsonObject();
948946
logger.info("Status for call: "+aliceCallSid+" : "+jsonObj.get("status").getAsString());
949947
assertTrue(jsonObj.get("status").getAsString().equalsIgnoreCase("canceled"));
950-
948+
951949
cdr = RestcommCallsTool.getInstance().getCall(deploymentUrl.toString(), adminAccountSid, adminAuthToken, georgeCallSid);
952950
jsonObj = cdr.getAsJsonObject();
953951
logger.info("Status for call: "+georgeCallSid+" : "+jsonObj.get("status").getAsString());
954952
assertTrue(jsonObj.get("status").getAsString().equalsIgnoreCase("canceled"));
955-
953+
956954
cdr = RestcommCallsTool.getInstance().getCall(deploymentUrl.toString(), adminAccountSid, adminAuthToken, bobCallSid);
957955
jsonObj = cdr.getAsJsonObject();
958956
logger.info("Status for call: "+bobCallSid+" : "+jsonObj.get("status").getAsString());

restcomm/restcomm.testsuite/src/test/java/org/restcomm/connect/testsuite/http/LiveCallModificationMuteUnMuteTest.java

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,6 @@ public void after() throws Exception {
119119
}
120120
Thread.sleep(1000);
121121
wireMockRule.resetRequests();
122-
wireMockRule.resetScenarios();
123-
wireMockRule.resetMappings();
124122
Thread.sleep(4000);
125123
}
126124

@@ -190,29 +188,29 @@ public void muteUnmuteInProgressConferenceParticipant() throws Exception {
190188
JsonArray callsArray = partObject.getAsJsonArray("calls");
191189
int size = callsArray.size();
192190
assertEquals(2, size);
193-
191+
194192
logger.info("callsArray: "+callsArray);
195-
193+
196194
//any call sid
197195
String firstCallSid = callsArray.get(0).getAsJsonObject().get("sid").getAsString();
198196

199-
//Going to mute :
197+
//Going to mute :
200198
JsonObject muteResponse = RestcommConferenceParticipantsTool.getInstance().modifyCall(deploymentUrl.toString(), adminAccountSid, conferenceSid, adminAuthToken, firstCallSid, true);
201-
assertNotNull(muteResponse);
199+
assertNotNull(muteResponse);
202200
JsonObject modifiedParticipant = RestcommConferenceParticipantsTool.getInstance().getParticipant(deploymentUrl.toString(), adminAccountSid, conferenceSid, adminAuthToken, firstCallSid);
203201
assertNotNull(modifiedParticipant);
204202
Boolean muted = modifiedParticipant.get("muted").getAsBoolean();
205203
assertTrue(muted);
206-
207-
//Going to unmute :
204+
205+
//Going to unmute :
208206
JsonObject unmuteResponse = RestcommConferenceParticipantsTool.getInstance().modifyCall(deploymentUrl.toString(), adminAccountSid, conferenceSid, adminAuthToken, firstCallSid, false);
209207
assertNotNull(muteResponse);
210208
modifiedParticipant = RestcommConferenceParticipantsTool.getInstance().getParticipant(deploymentUrl.toString(), adminAccountSid, conferenceSid, adminAuthToken, firstCallSid);
211209
assertNotNull(modifiedParticipant);
212210
muted = modifiedParticipant.get("muted").getAsBoolean();
213211
assertTrue(!muted);
214212
}
215-
213+
216214
@Deployment(name = "LiveCallModificationTest", managed = true, testable = false)
217215
public static WebArchive createWebArchiveNoGw() {
218216
logger.info("Packaging Test App");

restcomm/restcomm.testsuite/src/test/java/org/restcomm/connect/testsuite/http/LiveCallModificationTest.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,6 @@ public void after() throws Exception {
135135
}
136136
Thread.sleep(1000);
137137
wireMockRule.resetRequests();
138-
wireMockRule.resetScenarios();
139-
wireMockRule.resetMappings();
140138
Thread.sleep(4000);
141139
}
142140

restcomm/restcomm.testsuite/src/test/java/org/restcomm/connect/testsuite/telephony/CallLifecycleAnswerDelayTest.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,8 +212,6 @@ public void after() throws Exception {
212212
}
213213
Thread.sleep(1000);
214214
wireMockRule.resetRequests();
215-
wireMockRule.resetScenarios();
216-
wireMockRule.resetMappings();
217215
Thread.sleep(4000);
218216
}
219217

restcomm/restcomm.testsuite/src/test/java/org/restcomm/connect/testsuite/telephony/CallLifecycleTest.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,8 +235,6 @@ public void after() throws Exception {
235235
}
236236
Thread.sleep(1000);
237237
wireMockRule.resetRequests();
238-
wireMockRule.resetScenarios();
239-
wireMockRule.resetMappings();
240238
Thread.sleep(4000);
241239
}
242240

restcomm/restcomm.testsuite/src/test/java/org/restcomm/connect/testsuite/telephony/CallLifecycleTestLive.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,6 @@ public void after() throws Exception {
136136
}
137137
Thread.sleep(2000);
138138
wireMockRule.resetRequests();
139-
wireMockRule.resetScenarios();
140-
wireMockRule.resetMappings();
141139
Thread.sleep(2000);
142140
}
143141

restcomm/restcomm.testsuite/src/test/java/org/restcomm/connect/testsuite/telephony/CallRegexSingleTest.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,8 +225,6 @@ public void after() throws Exception {
225225
}
226226
Thread.sleep(1000);
227227
wireMockRule.resetRequests();
228-
wireMockRule.resetScenarios();
229-
wireMockRule.resetMappings();
230228
Thread.sleep(4000);
231229
}
232230

0 commit comments

Comments
 (0)