You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openmeetings.apache.org by se...@apache.org on 2012/10/28 11:45:04 UTC
svn commit: r1402966 - in /incubator/openmeetings/trunk/singlewebapp:
build.xml src/org/apache/openmeetings/test/rtmp/SimulateLoadTest.java
Author: sebawagner
Date: Sun Oct 28 10:45:04 2012
New Revision: 1402966
URL: http://svn.apache.org/viewvc?rev=1402966&view=rev
Log:
OPENMEETINGS-455 load test optimized for ANT usage
Modified:
incubator/openmeetings/trunk/singlewebapp/build.xml
incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/test/rtmp/SimulateLoadTest.java
Modified: incubator/openmeetings/trunk/singlewebapp/build.xml
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/build.xml?rev=1402966&r1=1402965&r2=1402966&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/build.xml (original)
+++ incubator/openmeetings/trunk/singlewebapp/build.xml Sun Oct 28 10:45:04 2012
@@ -1117,23 +1117,15 @@
</path>
<property name="runTestHost" value="192.168.1.7" />
+ <property name="numberOfClient" value="50" />
<property name="runTestPort" value="1935" />
<property name="runTestContext" value="openmeetings/1" />
<target name="doRunClientTest">
<parallel>
- <java classname="org.apache.openmeetings.test.rtmp.SimulateLoad">
+ <java classname="org.apache.openmeetings.test.rtmp.SimulateLoadTest">
<arg value="${runTestHost}"/>
- <arg value="${runTestPort}"/>
- <arg value="${runTestContext}"/>
- <arg value="1" />
- <classpath refid="loadtest.classpath" />
- </java>
- <java classname="org.apache.openmeetings.test.rtmp.SimulateLoad">
- <arg value="${runTestHost}"/>
- <arg value="${runTestPort}"/>
- <arg value="${runTestContext}"/>
- <arg value="2" />
+ <arg value="${numberOfClient}"/>
<classpath refid="loadtest.classpath" />
</java>
</parallel>
Modified: incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/test/rtmp/SimulateLoadTest.java
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/test/rtmp/SimulateLoadTest.java?rev=1402966&r1=1402965&r2=1402966&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/test/rtmp/SimulateLoadTest.java (original)
+++ incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/test/rtmp/SimulateLoadTest.java Sun Oct 28 10:45:04 2012
@@ -7,13 +7,28 @@ import org.junit.Test;
public class SimulateLoadTest {
- private int numberOfClients = 10;
+ private int numberOfClients = 25;
private List<SimulateLoad> simulateLoadList = new ArrayList<SimulateLoad>();
- private final String host = "192.168.1.7";
+ private String host = "192.168.1.7";
private final int port = 1935;
private final String applicationContext = "openmeetings/1";
+ public SimulateLoadTest(String host, int numberOfClients) {
+ this.host = host;
+ this.numberOfClients = numberOfClients;
+ }
+
+ public static void main(String... args) {
+ if (args.length != 2) {
+ return;
+ }
+ SimulateLoadTest simulateLoadTest = new SimulateLoadTest(args[0],
+ Integer.valueOf(args[1]).intValue());
+ simulateLoadTest.test();
+ }
+
+
@Test
public void test() {
try {