3 new revisions:
Revision: 3d2463b91608
Author: George Vagenas <[email protected]>
Date: Tue Jul 2 09:14:03 2013
Log: gitignore add logs/ and txt files
http://code.google.com/p/commscale/source/detail?r=3d2463b91608&repo=load-balancer
Revision: 8e3fed64722a
Author: George Vagenas <[email protected]>
Date: Tue Jul 2 09:19:28 2013
Log: Fixes for testsuite
http://code.google.com/p/commscale/source/detail?r=8e3fed64722a&repo=load-balancer
Revision: ea44a5939340
Author: George Vagenas <[email protected]>
Date: Tue Jul 2 10:01:42 2013
Log: Added classpath and project to the gitignore
http://code.google.com/p/commscale/source/detail?r=ea44a5939340&repo=load-balancer
==============================================================================
Revision: 3d2463b91608
Author: George Vagenas <[email protected]>
Date: Tue Jul 2 09:14:03 2013
Log: gitignore add logs/ and txt files
http://code.google.com/p/commscale/source/detail?r=3d2463b91608&repo=load-balancer
Modified:
/.gitignore
=======================================
--- /.gitignore Tue Apr 3 07:18:59 2012
+++ /.gitignore Tue Jul 2 09:14:03 2013
@@ -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: 8e3fed64722a
Author: George Vagenas <[email protected]>
Date: Tue Jul 2 09:19:28 2013
Log: Fixes for testsuite
http://code.google.com/p/commscale/source/detail?r=8e3fed64722a&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
Fri Jun 28 01:14:10 2013
+++
/jar/src/main/java/org/mobicents/tools/sip/balancer/UDPPacketForwarder.java
Tue Jul 2 09:19:28 2013
@@ -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,19 +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 = null;
+ fromSocket.close();
+ fromSocket = null;
} catch (Exception e) {
//e.printStackTrace();
}
-
+
}
}
=======================================
---
/jar/src/test/java/org/mobicents/tools/sip/balancer/BlackholeAppServer.java
Tue Apr 19 04:47:21 2011
+++
/jar/src/test/java/org/mobicents/tools/sip/balancer/BlackholeAppServer.java
Tue Jul 2 09:19:28 2013
@@ -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 09:31:51 2012
+++
/jar/src/test/java/org/mobicents/tools/sip/balancer/ClusterSubdomainAffinityAlgorithmTest.java
Tue Jul 2 09:19:28 2013
@@ -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 04:47:21 2011
+++
/jar/src/test/java/org/mobicents/tools/sip/balancer/performance/TcpForwardingPerformanceTest.java
Tue Jul 2 09:19:28 2013
@@ -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: ea44a5939340
Author: George Vagenas <[email protected]>
Date: Tue Jul 2 10:01:42 2013
Log: Added classpath and project to the gitignore
http://code.google.com/p/commscale/source/detail?r=ea44a5939340&repo=load-balancer
Modified:
/.gitignore
=======================================
--- /.gitignore Tue Jul 2 09:14:03 2013
+++ /.gitignore Tue Jul 2 10:01:42 2013
@@ -6,8 +6,8 @@
classes
*.zip
# ignore eclipse files
-#.project
-#.classpath
+.project
+.classpath
.settings
.metadata
# ignore IDEA files
--
---
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.