master moved from 19cea138d9d6 to f15671372498
7 new revisions:
Revision: 300e5143bfbf
Author: George Vagenas <[email protected]>
Date: Mon May 13 22:03:58 2013 UTC
Log: Update testsuite
http://code.google.com/p/commscale/source/detail?r=300e5143bfbf&repo=load-balancer
Revision: d7c8ac2795a6
Author: George Vagenas <[email protected]>
Date: Tue Jul 2 16:14:03 2013 UTC
Log: gitignore add logs/ and txt files
http://code.google.com/p/commscale/source/detail?r=d7c8ac2795a6&repo=load-balancer
Revision: 870f13097c51
Author: George Vagenas <[email protected]>
Date: Tue Jul 2 16:19:28 2013 UTC
Log: Fixes for testsuite
http://code.google.com/p/commscale/source/detail?r=870f13097c51&repo=load-balancer
Revision: e498ac03180c
Author: George Vagenas <[email protected]>
Date: Tue Jul 2 17:01:42 2013 UTC
Log: Added classpath and project to the gitignore
http://code.google.com/p/commscale/source/detail?r=e498ac03180c&repo=load-balancer
Revision: 8c6daca89492
Author: George Vagenas <[email protected]>
Date: Tue Jul 2 17:07:34 2013 UTC
Log: Modified gitignore and deleted eclipse generated files
http://code.google.com/p/commscale/source/detail?r=8c6daca89492&repo=load-balancer
Revision: e8881820e26a
Author: George Vagenas <[email protected]>
Date: Tue Jul 2 18:01:12 2013 UTC
Log: Fixes issue 26
http://code.google.com/p/commscale/source/detail?r=e8881820e26a&repo=load-balancer
Revision: f15671372498
Author: George Vagenas <[email protected]>
Date: Wed Jul 10 19:08:56 2013 UTC
Log: Fixes issue 25
http://code.google.com/p/commscale/source/detail?r=f15671372498&repo=load-balancer
==============================================================================
Revision: 300e5143bfbf
Author: George Vagenas <[email protected]>
Date: Mon May 13 22:03:58 2013 UTC
Log: Update testsuite
http://code.google.com/p/commscale/source/detail?r=300e5143bfbf&repo=load-balancer
Modified:
/jar/src/test/java/org/mobicents/tools/sip/balancer/algorithms/PureConsistentHashNodeDeathTest.java
=======================================
---
/jar/src/test/java/org/mobicents/tools/sip/balancer/algorithms/PureConsistentHashNodeDeathTest.java
Mon May 13 12:46:02 2013 UTC
+++
/jar/src/test/java/org/mobicents/tools/sip/balancer/algorithms/PureConsistentHashNodeDeathTest.java
Mon May 13 22:03:58 2013 UTC
@@ -189,7 +189,7 @@
shootist.callerSendsBye = true;
shootist.sendInitialInvite();
- Thread.sleep(5000);
+ Thread.sleep(15000);
assertEquals(500, shootist.responses.get(0).getStatusCode());
}
==============================================================================
Revision: d7c8ac2795a6
Author: George Vagenas <[email protected]>
Date: Tue Jul 2 16:14:03 2013 UTC
Log: gitignore add logs/ and txt files
http://code.google.com/p/commscale/source/detail?r=d7c8ac2795a6&repo=load-balancer
Modified:
/.gitignore
=======================================
--- /.gitignore Tue Apr 3 14:18:59 2012 UTC
+++ /.gitignore Tue Jul 2 16:14:03 2013 UTC
@@ -36,6 +36,8 @@
# ignore 'randomly' strewn around logs
server.log
*.log
+*.txt
+logs
# ignore java crashes
hs_err_pid*.log
# H2 databases produced by tests
==============================================================================
Revision: 870f13097c51
Author: George Vagenas <[email protected]>
Date: Tue Jul 2 16:19:28 2013 UTC
Log: Fixes for testsuite
http://code.google.com/p/commscale/source/detail?r=870f13097c51&repo=load-balancer
Modified:
/jar/src/main/java/org/mobicents/tools/sip/balancer/UDPPacketForwarder.java
/jar/src/test/java/org/mobicents/tools/sip/balancer/BlackholeAppServer.java
/jar/src/test/java/org/mobicents/tools/sip/balancer/ClusterSubdomainAffinityAlgorithmTest.java
/jar/src/test/java/org/mobicents/tools/sip/balancer/performance/TcpForwardingPerformanceTest.java
=======================================
---
/jar/src/main/java/org/mobicents/tools/sip/balancer/UDPPacketForwarder.java
Mon May 13 08:33:31 2013 UTC
+++
/jar/src/main/java/org/mobicents/tools/sip/balancer/UDPPacketForwarder.java
Tue Jul 2 16:19:28 2013 UTC
@@ -22,11 +22,9 @@
package org.mobicents.tools.sip.balancer;
-import java.io.IOException;
import java.net.DatagramPacket;
import java.net.DatagramSocket;
import java.net.InetAddress;
-import java.net.InetSocketAddress;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.LinkedList;
@@ -42,9 +40,9 @@
public LinkedList<String> sipMessages;
public HashSet<String> sipMessageWithoutRetrans;
-
+
static long next = 0;
-
+
public UDPPacketForwarder(int fromPort, String destinations, String bind)
{
this.fromPort = fromPort;
this.bindAddress = bind;
@@ -53,11 +51,11 @@
sipMessages = new LinkedList<String>();
sipMessageWithoutRetrans = new HashSet<String>();
}
-
+
public void setDestinations(String destinations) {
this.destinations = destinations;
}
-
+
public void start() {
try {
fromSocket = new DatagramSocket(fromPort,
InetAddress.getByName(bindAddress));
@@ -95,7 +93,7 @@
e.printStackTrace();
}
}
-
+
}
};
worker.start();
@@ -103,18 +101,16 @@
throw new RuntimeException("Error", e);
}
}
-
+
public void stop() {
running = false;
try {
worker.interrupt();
- if(fromSocket.isConnected())
- fromSocket.disconnect();
- if(!fromSocket.isClosed())
- fromSocket.close();
+ fromSocket.close();
+ fromSocket = null;
} catch (Exception e) {
//e.printStackTrace();
}
-
+
}
}
=======================================
---
/jar/src/test/java/org/mobicents/tools/sip/balancer/BlackholeAppServer.java
Tue Apr 19 11:47:21 2011 UTC
+++
/jar/src/test/java/org/mobicents/tools/sip/balancer/BlackholeAppServer.java
Tue Jul 2 16:19:28 2013 UTC
@@ -75,6 +75,7 @@
sipListener.eventListener = listener;
}
ServerSocket tcpSocket;
+ Socket sock;
DatagramSocket socket;
public long numUnitsReceived;
DatagramPacket packet = new DatagramPacket(new byte[1000], 1000);
@@ -93,7 +94,7 @@
while(true) {
try {
- final Socket
sock = tcpSocket.accept();
+ sock =
tcpSocket.accept();
new Thread() {
public
void run() {
while(true) {
@@ -163,6 +164,8 @@
tcpThread.stop();
} catch (Exception e) {}
try {
+ sock.shutdownInput();
+ sock.close();
tcpSocket.close();
} catch (IOException e) {
}
=======================================
---
/jar/src/test/java/org/mobicents/tools/sip/balancer/ClusterSubdomainAffinityAlgorithmTest.java
Tue May 15 16:31:51 2012 UTC
+++
/jar/src/test/java/org/mobicents/tools/sip/balancer/ClusterSubdomainAffinityAlgorithmTest.java
Tue Jul 2 16:19:28 2013 UTC
@@ -110,8 +110,11 @@
algorithm.invocationContext = ctx;
SIPNode resultNode =
algorithm.processExternalRequest(request);
assertEquals("partner", resultNode.getIp());
+ originalNode = null;
+ partnerNode = null;
+ resultNode = null;
} finally {
- //BalancerContext.balancerContext.nodes = null;
+// BalancerContext.balancerContext.nodes = null;
}
}
}
=======================================
---
/jar/src/test/java/org/mobicents/tools/sip/balancer/performance/TcpForwardingPerformanceTest.java
Tue Apr 19 11:47:21 2011 UTC
+++
/jar/src/test/java/org/mobicents/tools/sip/balancer/performance/TcpForwardingPerformanceTest.java
Tue Jul 2 16:19:28 2013 UTC
@@ -39,7 +39,9 @@
import org.mobicents.tools.sip.balancer.BlackholeAppServer;
import org.mobicents.tools.sip.balancer.operation.Shootist;
-public class TcpForwardingPerformanceTest extends TestCase {
+//BlackholeAppServer is causing excesive CPU usage. Disable this test for
now.
+public class TcpForwardingPerformanceTest extends TestCase
+{
static final String inviteRequest = "INVITE
sip:[email protected];transport=tcp SIP/2.0\r\n"+
"To: sip:[email protected]\r\n"+
"From: sip:[email protected] ;tag=1234\r\n"+
@@ -131,7 +133,6 @@
public void testInvitePerformance10sec() {
testMessagePerformance(10*1000, 10000);
}
-
private void testMessagePerformance(int timespan, int maxLostPackets) {
@@ -162,6 +163,8 @@
}
System.out.println("Packets sent in " + timespan + " ms are " +
server.numUnitsReceived/inviteRequestBytes.length + "(making " +
sentUnits/inviteRequestBytes.length/((double)(timespan)/1000.) + " initial
requests per second)");
+ clientSocket.shutdownOutput();
+ clientSocket.close();
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
==============================================================================
Revision: e498ac03180c
Author: George Vagenas <[email protected]>
Date: Tue Jul 2 17:01:42 2013 UTC
Log: Added classpath and project to the gitignore
http://code.google.com/p/commscale/source/detail?r=e498ac03180c&repo=load-balancer
Modified:
/.gitignore
=======================================
--- /.gitignore Tue Jul 2 16:14:03 2013 UTC
+++ /.gitignore Tue Jul 2 17:01:42 2013 UTC
@@ -6,8 +6,8 @@
classes
*.zip
# ignore eclipse files
-#.project
-#.classpath
+.project
+.classpath
.settings
.metadata
# ignore IDEA files
==============================================================================
Revision: 8c6daca89492
Author: George Vagenas <[email protected]>
Date: Tue Jul 2 17:07:34 2013 UTC
Log: Modified gitignore and deleted eclipse generated files
http://code.google.com/p/commscale/source/detail?r=8c6daca89492&repo=load-balancer
Deleted:
/jar/.classpath
/jar/.project
Modified:
/.gitignore
=======================================
--- /jar/.classpath Mon Apr 16 12:23:31 2012 UTC
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry including="**/*.java" kind="src"
output="target/test-classes" path="src/test/java"/>
- <classpathentry excluding="**/*.java" kind="src"
output="target/test-classes" path="src/test/resources"/>
- <classpathentry including="**/*.java" kind="src" path="src/main/java"/>
- <classpathentry excluding="**/*.java" kind="src"
path="src/main/resources"/>
- <classpathentry kind="var"
path="M2_REPO/commons-logging/commons-logging/1.1.0.jboss/commons-logging-1.1.0.jboss.jar"/>
- <classpathentry kind="var"
path="M2_REPO/org/jboss/jboss-common-core/2.2.14.GA/jboss-common-core-2.2.14.GA.jar"/>
- <classpathentry kind="var"
path="M2_REPO/org/jboss/logging/jboss-logging-spi/2.1.0.GA/jboss-logging-spi-2.1.0.GA.jar"/>
- <classpathentry kind="var"
path="M2_REPO/org/jboss/javaee/jboss-transaction-api/1.0.1.GA/jboss-transaction-api-1.0.1.GA.jar"/>
- <classpathentry kind="var"
path="M2_REPO/org/jboss/cache/jbosscache-core/3.2.1.GA/jbosscache-core-3.2.1.GA.jar"/>
- <classpathentry kind="var"
path="M2_REPO/org/jboss/cache/jbosscache-pojo/3.0.0.GA/jbosscache-pojo-3.0.0.GA.jar"/>
- <classpathentry kind="var"
path="M2_REPO/jgroups/jgroups/2.7.0.GA/jgroups-2.7.0.GA.jar"/>
- <classpathentry kind="lib" path="lib/jmxtools-1.2.1.jar"/>
- <classpathentry kind="var"
path="M2_REPO/junit/junit/3.8.1/junit-3.8.1.jar"/>
- <classpathentry kind="var"
path="M2_REPO/log4j/log4j/1.2.14/log4j-1.2.14.jar"/>
- <classpathentry kind="var"
path="M2_REPO/org/jboss/netty/netty/3.1.5.GA/netty-3.1.5.GA.jar"/>
- <classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry combineaccessrules="false" kind="src" path="/jain-sip"/>
- <classpathentry kind="output" path="target/classes"/>
-</classpath>
=======================================
--- /jar/.project Thu Apr 7 13:41:32 2011 UTC
+++ /dev/null
@@ -1,13 +0,0 @@
-<projectDescription>
- <name>sip-balancer-jar</name>
- <comment>Mobicents :: Parent pom for 2.x releases. NO_M2ECLIPSE_SUPPORT:
Project files created with the maven-eclipse-plugin are not supported in
M2Eclipse.</comment>
- <projects/>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
=======================================
--- /.gitignore Tue Jul 2 17:01:42 2013 UTC
+++ /.gitignore Tue Jul 2 17:07:34 2013 UTC
@@ -4,6 +4,7 @@
~
target
classes
+bin
*.zip
# ignore eclipse files
.project
==============================================================================
Revision: e8881820e26a
Author: George Vagenas <[email protected]>
Date: Tue Jul 2 18:01:12 2013 UTC
Log: Fixes issue 26
http://code.google.com/p/commscale/source/detail?r=e8881820e26a&repo=load-balancer
Modified:
/jar/src/test/java/org/mobicents/tools/sip/balancer/performance/TcpForwardingPerformanceTest.java
/jar/src/test/java/org/mobicents/tools/sip/balancer/performance/UdpForwardingPerformanceTest.java
=======================================
---
/jar/src/test/java/org/mobicents/tools/sip/balancer/performance/TcpForwardingPerformanceTest.java
Tue Jul 2 16:19:28 2013 UTC
+++
/jar/src/test/java/org/mobicents/tools/sip/balancer/performance/TcpForwardingPerformanceTest.java
Tue Jul 2 18:01:12 2013 UTC
@@ -22,25 +22,19 @@
package org.mobicents.tools.sip.balancer.performance;
-import java.io.DataOutputStream;
-import java.io.IOException;
-import java.net.DatagramPacket;
-import java.net.DatagramSocket;
import java.net.InetAddress;
import java.net.Socket;
-import java.net.SocketException;
import java.net.UnknownHostException;
import java.util.Properties;
import junit.framework.TestCase;
-import org.mobicents.tools.sip.balancer.AppServer;
import org.mobicents.tools.sip.balancer.BalancerRunner;
import org.mobicents.tools.sip.balancer.BlackholeAppServer;
-import org.mobicents.tools.sip.balancer.operation.Shootist;
+
//BlackholeAppServer is causing excesive CPU usage. Disable this test for
now.
-public class TcpForwardingPerformanceTest extends TestCase
+public class TcpForwardingPerformanceTest //extends TestCase
{
static final String inviteRequest = "INVITE
sip:[email protected];transport=tcp SIP/2.0\r\n"+
"To: sip:[email protected]\r\n"+
@@ -72,7 +66,7 @@
* @see junit.framework.TestCase#setUp()
*/
protected void setUp() throws Exception {
- super.setUp();
+// super.setUp();
balancer = new BalancerRunner();
Properties properties = new Properties();
@@ -172,7 +166,7 @@
}
protected void tearDown() throws Exception {
- super.tearDown();
+// super.tearDown();
server.stop();
balancer.stop();
}
=======================================
---
/jar/src/test/java/org/mobicents/tools/sip/balancer/performance/UdpForwardingPerformanceTest.java
Tue Apr 19 11:47:21 2011 UTC
+++
/jar/src/test/java/org/mobicents/tools/sip/balancer/performance/UdpForwardingPerformanceTest.java
Tue Jul 2 18:01:12 2013 UTC
@@ -37,7 +37,9 @@
import org.mobicents.tools.sip.balancer.BlackholeAppServer;
import org.mobicents.tools.sip.balancer.operation.Shootist;
-public class UdpForwardingPerformanceTest extends TestCase {
+//BlackholeAppServer is causing excesive CPU usage. Disable this test for
now.
+public class UdpForwardingPerformanceTest //extends TestCase
+{
static final String inviteRequest = "INVITE sip:[email protected]
SIP/2.0\r\n"+
"To: sip:[email protected]\r\n"+
"From: sip:[email protected] ;tag=1234\r\n"+
@@ -75,7 +77,7 @@
* @see junit.framework.TestCase#setUp()
*/
protected void setUp() throws Exception {
- super.setUp();
+// super.setUp();
shootist = new Shootist();
balancer = new BalancerRunner();
@@ -201,7 +203,7 @@
}
protected void tearDown() throws Exception {
- super.tearDown();
+// super.tearDown();
server.stop();
balancer.stop();
}
==============================================================================
Revision: f15671372498
Author: George Vagenas <[email protected]>
Date: Wed Jul 10 19:08:56 2013 UTC
Log: Fixes issue 25
http://code.google.com/p/commscale/source/detail?r=f15671372498&repo=load-balancer
Modified:
/jar/src/main/java/org/mobicents/tools/sip/balancer/BalancerRunner.java
=======================================
--- /jar/src/main/java/org/mobicents/tools/sip/balancer/BalancerRunner.java
Fri Apr 19 19:20:30 2013 UTC
+++ /jar/src/main/java/org/mobicents/tools/sip/balancer/BalancerRunner.java
Wed Jul 10 19:08:56 2013 UTC
@@ -383,7 +383,7 @@
String[] nodeList = new String[nodes.size()];
int i = 0;
for (SIPNode node : nodes) {
- nodeList[0] = node.toString();
+ nodeList[i] = node.toString();
i++;
}
return nodeList;
--
---
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.