summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/testing/itest
diff options
context:
space:
mode:
authorslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2012-03-22 15:53:41 +0000
committerslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2012-03-22 15:53:41 +0000
commit73da1fdb893118d67777a2e8962965d2336ca6e2 (patch)
tree9bf7b022e9596480521f05f49638fbe3e679a2a1 /sca-java-2.x/trunk/testing/itest
parenta16f36a53eaefe3e6f60df7537baecb2ab6f9a11 (diff)
TUSCANY-4034 - plug a few more potential memory leaks
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1303855 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/testing/itest')
-rw-r--r--sca-java-2.x/trunk/testing/itest/performance/performance-test/src/test/java/org/apache/tuscany/sca/test/performance/PerformanceTestCase.java47
1 files changed, 46 insertions, 1 deletions
diff --git a/sca-java-2.x/trunk/testing/itest/performance/performance-test/src/test/java/org/apache/tuscany/sca/test/performance/PerformanceTestCase.java b/sca-java-2.x/trunk/testing/itest/performance/performance-test/src/test/java/org/apache/tuscany/sca/test/performance/PerformanceTestCase.java
index 329eea6a3d..d05ed1fd74 100644
--- a/sca-java-2.x/trunk/testing/itest/performance/performance-test/src/test/java/org/apache/tuscany/sca/test/performance/PerformanceTestCase.java
+++ b/sca-java-2.x/trunk/testing/itest/performance/performance-test/src/test/java/org/apache/tuscany/sca/test/performance/PerformanceTestCase.java
@@ -78,6 +78,33 @@ public class PerformanceTestCase {
resultsFile.flush();
resultsFile.close();
}
+
+ @Test
+ public void testNodeStartStop() {
+ dumpHeapStart("testInstallUninstall");
+
+ printRuntimeStats("createRuntime");
+
+ createRuntime();
+
+ callNodeStartStopRepeatedly(100);
+
+ waitForInput();
+
+ dumpHeapEnd("testInstallUninstall_postNodeStop");
+
+ printRuntimeStats("stopRuntime");
+
+ stopRuntime();
+
+ printRuntimeStats("destroyRuntime");
+
+ destroyRuntime();
+
+ printRuntimeStats("End");
+
+ dumpHeapEnd("testInstallUninstall_postStop");
+ }
@Test
public void testInstallUninstall() {
@@ -91,7 +118,7 @@ public class PerformanceTestCase {
createNode();
- callInstallUninstallRepeatedly(10);
+ callInstallUninstallRepeatedly(100);
dumpHeapEnd("testInstallUninstall_postUninstall");
@@ -187,6 +214,24 @@ public class PerformanceTestCase {
// ============================================================
+ public void callNodeStartStopRepeatedly(int repeatCount) {
+ for (int i =0; i < repeatCount; i++){
+ printRuntimeStats("createNode");
+
+ createNode();
+
+ callInstallUninstallRepeatedly(1);
+
+ printRuntimeStats("stopNode");
+
+ stopNode();
+
+ printRuntimeStats("destroyNode");
+
+ destroyNode();
+ }
+ }
+
public void callInstallUninstallRepeatedly(int repeatCount) {
for (int i =0; i < repeatCount; i++){
printRuntimeStats("install/unistall contribution");