stratos-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From isu...@apache.org
Subject git commit: running messaging threads concurrently
Date Wed, 08 Oct 2014 15:49:24 GMT
Repository: stratos
Updated Branches:
  refs/heads/4.0.0-grouping d100cd0ee -> e8465eb0c


running messaging threads concurrently


Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/e8465eb0
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/e8465eb0
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/e8465eb0

Branch: refs/heads/4.0.0-grouping
Commit: e8465eb0c15e868f80af7c40e0625e4df35fd08a
Parents: d100cd0
Author: Isuru Haththotuwa <isuruh@apache.org>
Authored: Wed Oct 8 21:19:06 2014 +0530
Committer: Isuru Haththotuwa <isuruh@apache.org>
Committed: Wed Oct 8 21:19:06 2014 +0530

----------------------------------------------------------------------
 components/org.apache.stratos.messaging/pom.xml        | 13 ++++++++-----
 .../topology/locking/TopologyLockingTest.java          | 10 ++++------
 2 files changed, 12 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/e8465eb0/components/org.apache.stratos.messaging/pom.xml
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/pom.xml b/components/org.apache.stratos.messaging/pom.xml
index b2d851b..4ff4cb8 100644
--- a/components/org.apache.stratos.messaging/pom.xml
+++ b/components/org.apache.stratos.messaging/pom.xml
@@ -78,15 +78,18 @@
 
     <build>
         <plugins>
-            <!--plugin>
+            <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-surefire-plugin</artifactId>
+                <version>2.17</version>
                 <configuration>
-                  <suiteXmlFiles>
-                    <suiteXmlFile>src/test/resources/testng.xml</suiteXmlFile>
-                  </suiteXmlFiles>
+                    <!--includes>
+                        <include>**/TopologyLockingTest.java</include>
+                    </includes-->
+                    <parallel>methods</parallel>
+                    <threadCount>15</threadCount>
                 </configuration>
-              </plugin-->
+            </plugin>
             <plugin>
                 <groupId>org.apache.felix</groupId>
                 <artifactId>maven-scr-plugin</artifactId>

http://git-wip-us.apache.org/repos/asf/stratos/blob/e8465eb0/components/org.apache.stratos.messaging/src/test/java/org/apache/stratos/messaging/topology/locking/TopologyLockingTest.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/test/java/org/apache/stratos/messaging/topology/locking/TopologyLockingTest.java
b/components/org.apache.stratos.messaging/src/test/java/org/apache/stratos/messaging/topology/locking/TopologyLockingTest.java
index 5d33904..e82699c 100644
--- a/components/org.apache.stratos.messaging/src/test/java/org/apache/stratos/messaging/topology/locking/TopologyLockingTest.java
+++ b/components/org.apache.stratos.messaging/src/test/java/org/apache/stratos/messaging/topology/locking/TopologyLockingTest.java
@@ -26,8 +26,6 @@ import org.junit.*;
 import java.util.HashMap;
 import java.util.Map;
 
-//@RunWith(ConcurrentRunner.class)
-//@Concurrent(threads = 12)
 public class TopologyLockingTest {
 
     private static Topology topology;
@@ -159,8 +157,8 @@ public class TopologyLockingTest {
         TopologyManager.acquireWriteLockForCluster("service1", "service1.cluster1.domain");
         TopologyManager.acquireWriteLockForCluster("service1", "service1.cluster2.domain");
 
-        TopologyManager.acquireWriteLockForCluster("service1", "service1.cluster1.domain");
-        TopologyManager.acquireWriteLockForCluster("service1", "service1.cluster2.domain");
+        TopologyManager.releaseWriteLockForCluster("service1", "service1.cluster1.domain");
+        TopologyManager.releaseWriteLockForCluster("service1", "service1.cluster2.domain");
     }
 
     @Test
@@ -169,8 +167,8 @@ public class TopologyLockingTest {
         TopologyManager.acquireWriteLockForCluster("service2", "service2.cluster1.domain");
         TopologyManager.acquireWriteLockForCluster("service2", "service2.cluster2.domain");
 
-        TopologyManager.acquireWriteLockForCluster("service2", "service2.cluster1.domain");
-        TopologyManager.acquireWriteLockForCluster("service2", "service2.cluster2.domain");
+        TopologyManager.releaseWriteLockForCluster("service2", "service2.cluster1.domain");
+        TopologyManager.releaseWriteLockForCluster("service2", "service2.cluster2.domain");
     }
 
     @Test


Mime
View raw message