Revision: 9c4285ece239
Author: [email protected] <[email protected]>
Date: Mon May 13 05:46:02 2013
Log: Update testsuite
http://code.google.com/p/commscale/source/detail?r=9c4285ece239&repo=load-balancer
Modified:
/jar/src/test/java/org/mobicents/tools/sip/balancer/algorithms/EarlyDialogWorstCaseAffinityTest.java
/jar/src/test/java/org/mobicents/tools/sip/balancer/algorithms/HeaderConsistentHashAlgorithmTest.java
/jar/src/test/java/org/mobicents/tools/sip/balancer/algorithms/PureConsistentHashNodeDeathTest.java
/jar/src/test/java/org/mobicents/tools/sip/balancer/scalability/RollingUpgradeTest.java
/jar/src/test/java/org/mobicents/tools/sip/balancer/scalability/SprayTwoPureConsistentHashTest.java
/jar/src/test/java/org/mobicents/tools/sip/balancer/scalability/SprayingLoadBalancersWithNoInternalPortTest.java
/jar/src/test/java/org/mobicents/tools/sip/balancer/scalability/SprayingTwoLoadBalancersTest.java
=======================================
---
/jar/src/test/java/org/mobicents/tools/sip/balancer/algorithms/EarlyDialogWorstCaseAffinityTest.java
Tue Apr 19 04:47:21 2011
+++
/jar/src/test/java/org/mobicents/tools/sip/balancer/algorithms/EarlyDialogWorstCaseAffinityTest.java
Mon May 13 05:46:02 2013
@@ -130,7 +130,7 @@
shootist.callerSendsBye = true;
shootist.sendInitialInvite();
- Thread.sleep(11000);
+ Thread.sleep(15000);
if(invite == null) TestCase.fail("INVITE not seen");
if(ack == null) TestCase.fail("BYE not seen");
assertNotSame(ack, bye);
=======================================
---
/jar/src/test/java/org/mobicents/tools/sip/balancer/algorithms/HeaderConsistentHashAlgorithmTest.java
Tue Apr 19 04:47:21 2011
+++
/jar/src/test/java/org/mobicents/tools/sip/balancer/algorithms/HeaderConsistentHashAlgorithmTest.java
Mon May 13 05:46:02 2013
@@ -213,7 +213,7 @@
shootist.start();
//servers[0].sipListener.sendSipRequest("INVITE", fromAddress,
toAddress, null, null, false);
servers[0].sipListener.sendSipRequest("INVITE", fromAddress, toAddress,
null, route, false, null, null, ruri);
- Thread.sleep(16000);
+ Thread.sleep(20000);
assertTrue(shootist.inviteRequest.getHeader(RecordRouteHeader.NAME).toString().contains("node_host"));
assertNotSame(ringingAppServer, okAppServer);
assertNotNull(ringingAppServer);
=======================================
---
/jar/src/test/java/org/mobicents/tools/sip/balancer/algorithms/PureConsistentHashNodeDeathTest.java
Mon May 13 01:33:31 2013
+++
/jar/src/test/java/org/mobicents/tools/sip/balancer/algorithms/PureConsistentHashNodeDeathTest.java
Mon May 13 05:46:02 2013
@@ -184,11 +184,12 @@
as.sendCleanShutdownToBalancers();
as.sendHeartbeat=false;
}
- Thread.sleep(1000);
+ Thread.sleep(3000);
+ assertTrue(balancer.getNodes().isEmpty());
shootist.callerSendsBye = true;
shootist.sendInitialInvite();
- Thread.sleep(7000);
+ Thread.sleep(5000);
assertEquals(500, shootist.responses.get(0).getStatusCode());
}
@@ -251,7 +252,7 @@
shootist.start();
//servers[0].sipListener.sendSipRequest("INVITE", fromAddress,
toAddress, null, null, false);
servers[0].sipListener.sendSipRequest("INVITE", fromAddress, toAddress,
null, route, false, null, null, ruri);
- Thread.sleep(16000);
+ Thread.sleep(20000);
assertTrue(shootist.inviteRequest.getHeader(RecordRouteHeader.NAME).toString().contains("node_host"));
assertNotSame(ringingAppServer, okAppServer);
assertNotNull(ringingAppServer);
=======================================
---
/jar/src/test/java/org/mobicents/tools/sip/balancer/scalability/RollingUpgradeTest.java
Mon Apr 22 05:50:26 2013
+++
/jar/src/test/java/org/mobicents/tools/sip/balancer/scalability/RollingUpgradeTest.java
Mon May 13 05:46:02 2013
@@ -173,7 +173,7 @@
shootist.sendInitialInvite();
//servers[0].sendHeartbeat = false;
//Sleep in order for the old version nodes to be removed and then send
BYE
- Thread.sleep(18000);
+ Thread.sleep(20000);
shootist.sendBye();
Thread.sleep(2000);
@@ -234,6 +234,9 @@
}
};
for(AppServer as:servers)
as.setEventListener(failureEventListener);
+ for(BalancerRunner balancer: balancers){
+ balancer.setNodeExpiration(15000);
+ }
shootist.peerHostPort="127.0.0.1:9988";
shootist.callerSendsBye=true;
shootist.sendInitialInvite();
@@ -252,13 +255,17 @@
assertNotNull(ackServer);
}
public void testSprayingMultipleIndialogMessages() throws Exception {
+ Thread.sleep(1000);
+ for(BalancerRunner balancer: balancers){
+ balancer.setNodeExpiration(15000);
+ }
shootist.callerSendsBye=true;
shootist.sendInitialInvite();
- Thread.sleep(8000);
+ Thread.sleep(10000);
for(int q=0;q<10;q++){
shootist.sendMessage();Thread.sleep(600);
}
- Thread.sleep(600);
+ Thread.sleep(2000);
assertTrue(shootist.responses.size()>10);
}
=======================================
---
/jar/src/test/java/org/mobicents/tools/sip/balancer/scalability/SprayTwoPureConsistentHashTest.java
Mon Jul 25 05:32:47 2011
+++
/jar/src/test/java/org/mobicents/tools/sip/balancer/scalability/SprayTwoPureConsistentHashTest.java
Mon May 13 05:46:02 2013
@@ -153,11 +153,15 @@
}
};
for(AppServer as:servers)
as.setEventListener(failureEventListener);
+ for(BalancerRunner balancer: balancers){
+ balancer.setNodeExpiration(15000);
+ }
+ Thread.sleep(1000);
shootist.peerHostPort="127.0.0.1:9988";
shootist.callerSendsBye=true;
shootist.sendInitialInvite();
//servers[0].sendHeartbeat = false;
- Thread.sleep(12000);
+ Thread.sleep(15000);
shootist.sendBye();
Thread.sleep(2000);
@@ -168,13 +172,17 @@
assertNotNull(ackServer);
}
public void testSprayingMultipleIndialogMessages() throws Exception {
+ Thread.sleep(1000);
+ for(BalancerRunner balancer: balancers){
+ balancer.setNodeExpiration(15000);
+ }
shootist.callerSendsBye=true;
shootist.sendInitialInvite();
- Thread.sleep(8000);
+ Thread.sleep(10000);
for(int q=0;q<10;q++){
shootist.sendMessage();Thread.sleep(600);
}
- Thread.sleep(600);
+ Thread.sleep(2000);
assertTrue(shootist.responses.size()>10);
}
=======================================
---
/jar/src/test/java/org/mobicents/tools/sip/balancer/scalability/SprayingLoadBalancersWithNoInternalPortTest.java
Tue Apr 19 04:47:21 2011
+++
/jar/src/test/java/org/mobicents/tools/sip/balancer/scalability/SprayingLoadBalancersWithNoInternalPortTest.java
Mon May 13 05:46:02 2013
@@ -151,7 +151,7 @@
shootist.callerSendsBye=true;
shootist.sendInitialInvite();
//servers[0].sendHeartbeat = false;
- Thread.sleep(12000);
+ Thread.sleep(16000);
shootist.sendBye();
Thread.sleep(2200);
@@ -162,13 +162,17 @@
assertNotNull(ackServer);
}
public void testSprayingMultipleIndialogMessages() throws Exception {
+ Thread.sleep(1000);
+ for(BalancerRunner balancer: balancers){
+ balancer.setNodeExpiration(15000);
+ }
shootist.callerSendsBye=true;
shootist.sendInitialInvite();
- Thread.sleep(8000);
+ Thread.sleep(10000);
for(int q=0;q<10;q++){
shootist.sendMessage();Thread.sleep(600);
}
- Thread.sleep(600);
+ Thread.sleep(2000);
assertTrue(shootist.responses.size()>10);
}
=======================================
---
/jar/src/test/java/org/mobicents/tools/sip/balancer/scalability/SprayingTwoLoadBalancersTest.java
Mon May 13 01:33:31 2013
+++
/jar/src/test/java/org/mobicents/tools/sip/balancer/scalability/SprayingTwoLoadBalancersTest.java
Mon May 13 05:46:02 2013
@@ -44,7 +44,7 @@
UDPPacketForwarder externalIpLoadBalancer;
UDPPacketForwarder internalIpLoadBalancer;
-
+
private BalancerRunner prepBalancer(String id) {
BalancerRunner balancer = new BalancerRunner();
Properties properties = new Properties();
@@ -60,7 +60,7 @@
properties.setProperty("gov.nist.javax.sip.THREAD_POOL_SIZE",
"2");
properties.setProperty("gov.nist.javax.sip.REENTRANT_LISTENER",
"true");
properties.setProperty("gov.nist.javax.sip.CANCEL_CLIENT_TRANSACTION_CHECKED", "false");
-
+
properties.setProperty("host", "127.0.0.1");
properties.setProperty("externalHost", "127.0.0.1");
properties.setProperty("internalHost", "127.0.0.1");
@@ -77,7 +77,7 @@
balancer.start(properties);
return balancer;
}
-
+
protected void setUp() throws Exception {
super.setUp();
shootist = new Shootist();
@@ -95,7 +95,7 @@
servers[q].start();
servers[q].setBalancers(balancerString);
}
-
+
externalIpLoadBalancer = new UDPPacketForwarder(9988,
externalIpLBString, "127.0.0.1");
externalIpLoadBalancer.start();
internalIpLoadBalancer = new UDPPacketForwarder(9922,
internalIpLBString, "127.0.0.1");
@@ -117,18 +117,18 @@
balancers[q].stop();
}
}
-
+
AppServer inviteServer,ackServer,byeServer;
public void testSprayingRoundRobinSIPLBsUASCallConsistentHash() throws
Exception {
EventListener failureEventListener = new EventListener() {
-
+
@Override
public void uasAfterResponse(int statusCode, AppServer
source) {
-
-
+
+
}
-
+
@Override
public void uasAfterRequestReceived(String method,
AppServer source) {
if(method.equals("INVITE")) {
@@ -143,12 +143,12 @@
@Override
public void uacAfterRequestSent(String method,
AppServer source) {
// TODO Auto-generated method stub
-
+
}
@Override
public void uacAfterResponse(int statusCode, AppServer
source) {
-
+
}
};
for(AppServer as:servers)
as.setEventListener(failureEventListener);
@@ -166,14 +166,18 @@
assertNotNull(byeServer);
assertNotNull(ackServer);
}
- public void testSprayingMultipleIndialogMessages() throws Exception {
+ public void testSprayingMultipleIndialogMessages() throws Exception {
+ Thread.sleep(1000);
+ for(BalancerRunner balancer: balancers){
+ balancer.setNodeExpiration(15000);
+ }
shootist.callerSendsBye=true;
shootist.sendInitialInvite();
Thread.sleep(10000);
for(int q=0;q<10;q++){
- shootist.sendMessage();Thread.sleep(600);
+ shootist.sendMessage();Thread.sleep(600);
}
- Thread.sleep(600);
+ Thread.sleep(2000);
assertTrue(shootist.responses.size()>10);
}
--
---
You received this message because you are subscribed to the Google Groups "mobicents-commits" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.