Extracts PTCP into separate test suite. Adds debug PTCP sample target.
This commit is contained in:
parent
afd937ee54
commit
9964e3f296
15
build.xml
15
build.xml
@ -139,6 +139,7 @@
|
||||
<formatter type="xml"/>
|
||||
<formatter type="brief" usefile="false"/>
|
||||
<test name="org.ice4j.StunTestSuite" todir="${junit.reports}"/>
|
||||
<test name="org.ice4j.PseudoTcpTestSuite" todir="${junit.reports}"/>
|
||||
<classpath refid="project.class.path"/>
|
||||
</junit>
|
||||
|
||||
@ -179,6 +180,20 @@
|
||||
value="lib/logging.properties"/>
|
||||
</java>
|
||||
</target>
|
||||
<!-- Debug pseudotcp example on port 5005 -->
|
||||
<target name="debug-pseudotcp" depends="compile">
|
||||
<java fork="true"
|
||||
classname="test.IcePseudoTcp"
|
||||
classpathref="project.class.path">
|
||||
|
||||
<!-- Tell java.util.logging about our logging preferences -->
|
||||
<sysproperty key="java.util.logging.config.file"
|
||||
value="lib/logging.properties"/>
|
||||
<jvmarg value="-Xdebug" />
|
||||
<jvmarg value="-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005" />
|
||||
</java>
|
||||
</target>
|
||||
|
||||
<!-- Debug pseudotcp example with netbeans -->
|
||||
<target name="nb-debug-pseudotcp" depends="compile">
|
||||
<nbjpdastart addressproperty="jpda.address" name="ice4j" transport="dt_socket">
|
||||
|
||||
51
test/org/ice4j/PseudoTcpTestSuite.java
Normal file
51
test/org/ice4j/PseudoTcpTestSuite.java
Normal file
@ -0,0 +1,51 @@
|
||||
/*
|
||||
* ice4j, the OpenSource Java Solution for NAT and Firewall Traversal.
|
||||
* Maintained by the SIP Communicator community (http://sip-communicator.org).
|
||||
*
|
||||
* Distributable under LGPL license. See terms of license at gnu.org.
|
||||
*/
|
||||
package org.ice4j;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
/**
|
||||
* Contains pseudo TCP tests.
|
||||
*
|
||||
* @author Pawel Domas
|
||||
*/
|
||||
public class PseudoTcpTestSuite
|
||||
extends TestCase
|
||||
{
|
||||
|
||||
/**
|
||||
* Creates a new instance of the suite
|
||||
*
|
||||
* @param s test name
|
||||
*/
|
||||
public PseudoTcpTestSuite(String s)
|
||||
{
|
||||
super(s);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the suite of tests to run.
|
||||
* @return the suite of tests to run.
|
||||
*/
|
||||
public static Test suite()
|
||||
{
|
||||
TestSuite suite = new TestSuite();
|
||||
|
||||
// byte fifo buffer
|
||||
suite.addTestSuite(org.ice4j.pseudotcp.util.ByteFifoBufferTest.class);
|
||||
// transfer
|
||||
suite.addTestSuite(org.ice4j.pseudotcp.PseudoTcpTestTransfer.class);
|
||||
// ping pong
|
||||
suite.addTestSuite(org.ice4j.pseudotcp.PseudoTcpTestPingPong.class);
|
||||
// receive window
|
||||
suite.addTestSuite(org.ice4j.pseudotcp.PseudoTcpTestRecvWindow.class);
|
||||
// stream
|
||||
suite.addTestSuite(org.ice4j.pseudotcp.PseudoTcpStreamTest.class);
|
||||
|
||||
return suite;
|
||||
}
|
||||
}
|
||||
@ -74,13 +74,6 @@ public class StunTestSuite
|
||||
suite.addTestSuite(org.ice4j.stunclient.StunAddressDiscovererTest_v6.class);
|
||||
suite.addTestSuite(org.ice4j.stunclient.StunAddressDiscovererTest_v4v6.class);
|
||||
|
||||
//pseudotcp
|
||||
suite.addTestSuite(org.ice4j.pseudotcp.PseudoTcpTestTransfer.class);
|
||||
suite.addTestSuite(org.ice4j.pseudotcp.PseudoTcpTestPingPong.class);
|
||||
suite.addTestSuite(org.ice4j.pseudotcp.PseudoTcpTestRecvWindow.class);
|
||||
suite.addTestSuite(org.ice4j.pseudotcp.PseudoTcpStreamTest.class);
|
||||
suite.addTestSuite(org.ice4j.pseudotcp.util.ByteFifoBufferTest.class);
|
||||
|
||||
return suite;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user