You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by ga...@apache.org on 2015/08/16 12:54:54 UTC

[2/2] stratos git commit: Adding tenents to the integration test

Adding tenents to the integration test


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

Branch: refs/heads/tenant-isolation
Commit: 01eafd733a66df76a0588877d099a77cbf1ea9ac
Parents: 9ff60fa
Author: Gayan Gunarathne <ga...@wso2.com>
Authored: Sun Aug 16 16:24:18 2015 +0530
Committer: Gayan Gunarathne <ga...@wso2.com>
Committed: Sun Aug 16 16:24:18 2015 +0530

----------------------------------------------------------------------
 .../integration/tests/StratosTestServerManager.java | 11 ++++++++---
 .../tests/application/ApplicationBurstingTest.java  | 10 +++++-----
 .../tests/application/ApplicationUpdateTest.java    | 14 +++++++-------
 .../tests/application/GroupStartupOrderTest.java    | 10 +++++-----
 .../PartitionOneAfterAnotherClusterTest.java        |  8 ++++----
 .../application/PartitionRoundRobinClusterTest.java | 16 ++++++++--------
 .../tests/application/SingleClusterScalingTest.java | 10 +++++-----
 .../src/test/resources/stratos-testing.xml          |  4 ++--
 8 files changed, 44 insertions(+), 39 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/01eafd73/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/StratosTestServerManager.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/StratosTestServerManager.java b/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/StratosTestServerManager.java
index 6e279cf..2a1d32a 100755
--- a/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/StratosTestServerManager.java
+++ b/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/StratosTestServerManager.java
@@ -31,6 +31,7 @@ import org.apache.stratos.integration.tests.rest.IntegrationMockClient;
 import org.apache.stratos.integration.tests.rest.RestClient;
 import org.apache.stratos.messaging.domain.tenant.Tenant;
 import org.testng.annotations.AfterSuite;
+import org.testng.annotations.BeforeClass;
 import org.testng.annotations.BeforeSuite;
 import org.wso2.carbon.integration.framework.TestServerManager;
 import org.wso2.carbon.integration.framework.utils.FrameworkSettings;
@@ -75,9 +76,10 @@ public class StratosTestServerManager extends TestServerManager {
         super(CARBON_ZIP, PORT_OFFSET);
         serverUtils = new ServerUtils();
         restClientAdmin=new RestClient(endpoint,"admin","admin");
-        restClientTenant1 = new RestClient(endpoint, "admin", "admin");
+        restClientTenant1 = new RestClient(endpoint, "admin@test1.com", "admin123");
         restClientTenant2 = new RestClient(endpoint, "admin@test2.com", "admin123");
         mockIaasApiClient = new IntegrationMockClient(endpoint + "/mock-iaas/api");
+
     }
 
     @Override
@@ -213,11 +215,14 @@ public class StratosTestServerManager extends TestServerManager {
         assertEquals(addedTenant1,true);
         boolean addedTenant2=restClientAdmin.addEntity(RestConstants.TENANT2_RESOURCE,RestConstants.TENANT_API,RestConstants.TENANTS_NAME);
         assertEquals(addedTenant2,true);
+
+    }
+
+    @BeforeClass
+    public void getTenantDetails(){
         Tenant tenant1=(Tenant)restClientAdmin.getEntity(RestConstants.TENANT_API,RestConstants.TENANT1_GET_RESOURCE,Tenant.class,RestConstants.TENANTS_NAME);
         tenant1Id=tenant1.getTenantId();
         Tenant tenant2=(Tenant)restClientAdmin.getEntity(RestConstants.TENANT_API,RestConstants.TENANT2_GET_RESOURCE,Tenant.class,RestConstants.TENANTS_NAME);
         tenant2Id=tenant2.getTenantId();
     }
-
-
 }

http://git-wip-us.apache.org/repos/asf/stratos/blob/01eafd73/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/application/ApplicationBurstingTest.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/application/ApplicationBurstingTest.java b/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/application/ApplicationBurstingTest.java
index d1758f1..4ff15ba 100644
--- a/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/application/ApplicationBurstingTest.java
+++ b/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/application/ApplicationBurstingTest.java
@@ -117,13 +117,13 @@ public class ApplicationBurstingTest extends StratosTestServerManager {
 
             //Application active handling
             TopologyHandler.getInstance().assertApplicationStatus(bean.getApplicationId(),
-                    ApplicationStatus.Active, -1234);
+                    ApplicationStatus.Active, tenant1Id);
 
             //Group active handling
-            TopologyHandler.getInstance().assertGroupActivation(bean.getApplicationId(), -1234);
+            TopologyHandler.getInstance().assertGroupActivation(bean.getApplicationId(), tenant1Id);
 
             //Cluster active handling
-            TopologyHandler.getInstance().assertClusterActivation(bean.getApplicationId(), -1234);
+            TopologyHandler.getInstance().assertClusterActivation(bean.getApplicationId(), tenant1Id);
 
             boolean removedGroup = restClientTenant1.removeEntity(RestConstants.CARTRIDGE_GROUPS, "esb-php-group-application-bursting-test",
                     RestConstants.CARTRIDGE_GROUPS_NAME);
@@ -151,7 +151,7 @@ public class ApplicationBurstingTest extends StratosTestServerManager {
                     RestConstants.APPLICATIONS_NAME);
             assertEquals(unDeployed, true);
 
-            boolean undeploy = TopologyHandler.getInstance().assertApplicationUndeploy("application-bursting-test", -1234);
+            boolean undeploy = TopologyHandler.getInstance().assertApplicationUndeploy("application-bursting-test", tenant1Id);
             if (!undeploy) {
                 //Need to forcefully undeploy the application
                 log.info("Force undeployment is going to start for the [application] " + "application-bursting-test");
@@ -159,7 +159,7 @@ public class ApplicationBurstingTest extends StratosTestServerManager {
                 restClientTenant1.undeployEntity(RestConstants.APPLICATIONS + "/" + "application-bursting-test" +
                         RestConstants.APPLICATIONS_UNDEPLOY + "?force=true", RestConstants.APPLICATIONS);
 
-                boolean forceUndeployed = TopologyHandler.getInstance().assertApplicationUndeploy("application-bursting-test", -1234);
+                boolean forceUndeployed = TopologyHandler.getInstance().assertApplicationUndeploy("application-bursting-test", tenant1Id);
                 assertEquals(String.format("Forceful undeployment failed for the application %s",
                         "application-bursting-test"), forceUndeployed, true);
 

http://git-wip-us.apache.org/repos/asf/stratos/blob/01eafd73/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/application/ApplicationUpdateTest.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/application/ApplicationUpdateTest.java b/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/application/ApplicationUpdateTest.java
index d75b78c..19a44bb 100644
--- a/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/application/ApplicationUpdateTest.java
+++ b/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/application/ApplicationUpdateTest.java
@@ -117,13 +117,13 @@ public class ApplicationUpdateTest extends StratosTestServerManager {
 
             //Application active handling
             TopologyHandler.getInstance().assertApplicationStatus(bean.getApplicationId(),
-                    ApplicationStatus.Active, -1234);
+                    ApplicationStatus.Active, tenant1Id);
 
             //Group active handling
-            TopologyHandler.getInstance().assertGroupActivation(bean.getApplicationId(), -1234);
+            TopologyHandler.getInstance().assertGroupActivation(bean.getApplicationId(), tenant1Id);
 
             //Cluster active handling
-            TopologyHandler.getInstance().assertClusterActivation(bean.getApplicationId(), -1234);
+            TopologyHandler.getInstance().assertClusterActivation(bean.getApplicationId(), tenant1Id);
 
             //Updating application
             boolean updated = restClientTenant1.updateEntity(RESOURCES_PATH + RestConstants.APPLICATIONS_PATH + "/" +
@@ -131,9 +131,9 @@ public class ApplicationUpdateTest extends StratosTestServerManager {
                     RestConstants.APPLICATIONS_NAME);
             assertEquals(updated, true);
 
-            TopologyHandler.getInstance().assertGroupInstanceCount(bean.getApplicationId(), "group3-application-update-test", 2, -1234);
+            TopologyHandler.getInstance().assertGroupInstanceCount(bean.getApplicationId(), "group3-application-update-test", 2, tenant1Id);
 
-            TopologyHandler.getInstance().assertClusterMinMemberCount(bean.getApplicationId(), 1, -1234);
+            TopologyHandler.getInstance().assertClusterMinMemberCount(bean.getApplicationId(), 1, tenant1Id);
 
             ApplicationBean updatedBean = (ApplicationBean) restClientTenant1.getEntity(RestConstants.APPLICATIONS,
                     "g-sc-G123-1-application-update-test", ApplicationBean.class, RestConstants.APPLICATIONS_NAME);
@@ -165,7 +165,7 @@ public class ApplicationUpdateTest extends StratosTestServerManager {
                     RestConstants.APPLICATIONS_NAME);
             assertEquals(unDeployed, true);
 
-            boolean undeploy = TopologyHandler.getInstance().assertApplicationUndeploy("g-sc-G123-1-application-update-test", -1234);
+            boolean undeploy = TopologyHandler.getInstance().assertApplicationUndeploy("g-sc-G123-1-application-update-test", tenant1Id);
             if (!undeploy) {
                 //Need to forcefully undeploy the application
                 log.info("Force undeployment is going to start for the [application] " + "g-sc-G123-1-application-update-test");
@@ -173,7 +173,7 @@ public class ApplicationUpdateTest extends StratosTestServerManager {
                 restClientTenant1.undeployEntity(RestConstants.APPLICATIONS + "/" + "g-sc-G123-1-application-update-test" +
                         RestConstants.APPLICATIONS_UNDEPLOY + "?force=true", RestConstants.APPLICATIONS);
 
-                boolean forceUndeployed = TopologyHandler.getInstance().assertApplicationUndeploy("g-sc-G123-1-application-update-test", -1234);
+                boolean forceUndeployed = TopologyHandler.getInstance().assertApplicationUndeploy("g-sc-G123-1-application-update-test", tenant1Id);
                 assertEquals(String.format("Forceful undeployment failed for the application %s",
                         "g-sc-G123-1-application-update-test"), forceUndeployed, true);
 

http://git-wip-us.apache.org/repos/asf/stratos/blob/01eafd73/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/application/GroupStartupOrderTest.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/application/GroupStartupOrderTest.java b/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/application/GroupStartupOrderTest.java
index 8ab96c3..ded0be7 100644
--- a/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/application/GroupStartupOrderTest.java
+++ b/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/application/GroupStartupOrderTest.java
@@ -116,13 +116,13 @@ public class GroupStartupOrderTest extends StratosTestServerManager {
 
             //Application active handling
             TopologyHandler.getInstance().assertApplicationStatus(bean.getApplicationId(),
-                    ApplicationStatus.Active, -1234);
+                    ApplicationStatus.Active, tenant1Id);
 
             //Group active handling
-            TopologyHandler.getInstance().assertGroupActivation(bean.getApplicationId(), -1234);
+            TopologyHandler.getInstance().assertGroupActivation(bean.getApplicationId(), tenant1Id);
 
             //Cluster active handling
-            TopologyHandler.getInstance().assertClusterActivation(bean.getApplicationId(), -1234);
+            TopologyHandler.getInstance().assertClusterActivation(bean.getApplicationId(), tenant1Id);
 
             boolean removedGroup = restClientTenant1.removeEntity(RestConstants.CARTRIDGE_GROUPS, "esb-php-group-application-bursting-test",
                     RestConstants.CARTRIDGE_GROUPS_NAME);
@@ -150,7 +150,7 @@ public class GroupStartupOrderTest extends StratosTestServerManager {
                     RestConstants.APPLICATIONS_NAME);
             assertEquals(unDeployed, true);
 
-            boolean undeploy = TopologyHandler.getInstance().assertApplicationUndeploy("application-bursting-test", -1234);
+            boolean undeploy = TopologyHandler.getInstance().assertApplicationUndeploy("application-bursting-test", tenant1Id);
             if (!undeploy) {
                 //Need to forcefully undeploy the application
                 log.info("Force undeployment is going to start for the [application] " + "application-bursting-test");
@@ -158,7 +158,7 @@ public class GroupStartupOrderTest extends StratosTestServerManager {
                 restClientTenant1.undeployEntity(RestConstants.APPLICATIONS + "/" + "application-bursting-test" +
                         RestConstants.APPLICATIONS_UNDEPLOY + "?force=true", RestConstants.APPLICATIONS);
 
-                boolean forceUndeployed = TopologyHandler.getInstance().assertApplicationUndeploy("application-bursting-test", -1234);
+                boolean forceUndeployed = TopologyHandler.getInstance().assertApplicationUndeploy("application-bursting-test", tenant1Id);
                 assertEquals(String.format("Forceful undeployment failed for the application %s",
                         "application-bursting-test"), forceUndeployed, true);
 

http://git-wip-us.apache.org/repos/asf/stratos/blob/01eafd73/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/application/PartitionOneAfterAnotherClusterTest.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/application/PartitionOneAfterAnotherClusterTest.java b/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/application/PartitionOneAfterAnotherClusterTest.java
index 225a300..427db7d 100644
--- a/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/application/PartitionOneAfterAnotherClusterTest.java
+++ b/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/application/PartitionOneAfterAnotherClusterTest.java
@@ -102,10 +102,10 @@ public class PartitionOneAfterAnotherClusterTest extends StratosTestServerManage
 
             //Application active handling
             TopologyHandler.getInstance().assertApplicationStatus(bean.getApplicationId(),
-                    ApplicationStatus.Active, -1234);
+                    ApplicationStatus.Active, tenant1Id);
 
             //Cluster active handling
-            TopologyHandler.getInstance().assertClusterActivation(bean.getApplicationId(), -1234);
+            TopologyHandler.getInstance().assertClusterActivation(bean.getApplicationId(), tenant1Id);
 
             //Verifying whether members got created using round robin algorithm
             assertClusterWithRoundRobinAlgorithm(bean.getApplicationId());
@@ -135,7 +135,7 @@ public class PartitionOneAfterAnotherClusterTest extends StratosTestServerManage
                     RestConstants.APPLICATIONS_NAME);
             assertEquals(unDeployed, true);
 
-            boolean undeploy = TopologyHandler.getInstance().assertApplicationUndeploy("single-cluster-scaling-test", -1234);
+            boolean undeploy = TopologyHandler.getInstance().assertApplicationUndeploy("single-cluster-scaling-test", tenant1Id);
             if (!undeploy) {
                 //Need to forcefully undeploy the application
                 log.info("Force undeployment is going to start for the [application] " + "single-cluster-scaling-test");
@@ -143,7 +143,7 @@ public class PartitionOneAfterAnotherClusterTest extends StratosTestServerManage
                 restClientTenant1.undeployEntity(RestConstants.APPLICATIONS + "/" + "single-cluster-scaling-test" +
                         RestConstants.APPLICATIONS_UNDEPLOY + "?force=true", RestConstants.APPLICATIONS);
 
-                boolean forceUndeployed = TopologyHandler.getInstance().assertApplicationUndeploy("single-cluster-scaling-test", -1234);
+                boolean forceUndeployed = TopologyHandler.getInstance().assertApplicationUndeploy("single-cluster-scaling-test", tenant1Id);
                 assertEquals(String.format("Forceful undeployment failed for the application %s",
                         "single-cluster-scaling-test"), forceUndeployed, true);
 

http://git-wip-us.apache.org/repos/asf/stratos/blob/01eafd73/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/application/PartitionRoundRobinClusterTest.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/application/PartitionRoundRobinClusterTest.java b/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/application/PartitionRoundRobinClusterTest.java
index 1d095c7..c09aba7 100644
--- a/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/application/PartitionRoundRobinClusterTest.java
+++ b/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/application/PartitionRoundRobinClusterTest.java
@@ -97,13 +97,13 @@ public class PartitionRoundRobinClusterTest extends StratosTestServerManager {
 
             //Application active handling
             TopologyHandler.getInstance().assertApplicationStatus(bean.getApplicationId(),
-                    ApplicationStatus.Active, -1234);
+                    ApplicationStatus.Active, tenant1Id);
 
             //Cluster active handling
-            TopologyHandler.getInstance().assertClusterActivation(bean.getApplicationId(), -1234);
+            TopologyHandler.getInstance().assertClusterActivation(bean.getApplicationId(), tenant1Id);
 
             //Verifying whether members got created using round robin algorithm
-          /*  assertClusterWithRoundRobinAlgorithm(bean.getApplicationId());        */
+           /* assertClusterWithRoundRobinAlgorithm(bean.getApplicationId());
 
             //Application in-active handling
             log.info("Waiting for the faulty member detection from " +
@@ -116,7 +116,7 @@ public class PartitionRoundRobinClusterTest extends StratosTestServerManager {
                     ApplicationStatus.Active,-1234);
 
             //Cluster active handling
-            TopologyHandler.getInstance().assertClusterActivation(bean.getApplicationId(),-1234);
+            TopologyHandler.getInstance().assertClusterActivation(bean.getApplicationId(),-1234);   */
 
             boolean removedAuto = restClientTenant1.removeEntity(RestConstants.AUTOSCALING_POLICIES,
                     autoscalingPolicyId, RestConstants.AUTOSCALING_POLICIES_NAME);
@@ -140,7 +140,7 @@ public class PartitionRoundRobinClusterTest extends StratosTestServerManager {
                     RestConstants.APPLICATIONS_NAME);
             assertEquals(unDeployed, true);
 
-            boolean undeploy = TopologyHandler.getInstance().assertApplicationUndeploy("partition-round-robin-test", -1234);
+            boolean undeploy = TopologyHandler.getInstance().assertApplicationUndeploy("partition-round-robin-test", tenant1Id);
             if (!undeploy) {
                 //Need to forcefully undeploy the application
                 log.info("Force undeployment is going to start for the [application] " + "partition-round-robin-test");
@@ -148,7 +148,7 @@ public class PartitionRoundRobinClusterTest extends StratosTestServerManager {
                 restClientTenant1.undeployEntity(RestConstants.APPLICATIONS + "/" + "partition-round-robin-test" +
                         RestConstants.APPLICATIONS_UNDEPLOY + "?force=true", RestConstants.APPLICATIONS);
 
-                boolean forceUndeployed = TopologyHandler.getInstance().assertApplicationUndeploy("partition-round-robin-test", -1234);
+                boolean forceUndeployed = TopologyHandler.getInstance().assertApplicationUndeploy("partition-round-robin-test", tenant1Id);
                 assertEquals(String.format("Forceful undeployment failed for the application %s",
                         "partition-round-robin-test"), forceUndeployed, true);
 
@@ -202,7 +202,7 @@ public class PartitionRoundRobinClusterTest extends StratosTestServerManager {
      * @param applicationName
      */
     private void assertClusterWithRoundRobinAlgorithm(String applicationName) {
-        Application application = ApplicationManager.getApplications().getApplicationByTenant(applicationName, -1234);
+        Application application = ApplicationManager.getApplications().getApplicationByTenant(applicationName, tenant1Id);
         assertNotNull(String.format("Application is not found: [application-id] %s",
                 applicationName), application);
 
@@ -271,7 +271,7 @@ public class PartitionRoundRobinClusterTest extends StratosTestServerManager {
                         p2Index++;
                         previousPartition = p2;
                         assertEquals("Partition-2 doesn't not contain correct values in current " +
-                                "iteration", allInitTime.get(i), p2InitTime.get(p2Index));
+                                "iteration", allInitTime.get(allInitTime.size()-1), p2InitTime.get(p2Index));
                         if (p1Index >= 0) {
                             assertEquals("Partition-1 doesn't not contain correct values in the " +
                                     "previous iteration", allInitTime.get(i - 1), p1InitTime.get(p1Index));

http://git-wip-us.apache.org/repos/asf/stratos/blob/01eafd73/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/application/SingleClusterScalingTest.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/application/SingleClusterScalingTest.java b/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/application/SingleClusterScalingTest.java
index 3bcb628..5f40baf 100644
--- a/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/application/SingleClusterScalingTest.java
+++ b/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/application/SingleClusterScalingTest.java
@@ -104,13 +104,13 @@ public class SingleClusterScalingTest extends StratosTestServerManager {
 
             //Application active handling
             TopologyHandler.getInstance().assertApplicationStatus(bean.getApplicationId()
-                    , ApplicationStatus.Active, -1234);
+                    , ApplicationStatus.Active, tenant1Id);
 
             //Cluster active handling
-            TopologyHandler.getInstance().assertClusterActivation(bean.getApplicationId(), -1234);
+            TopologyHandler.getInstance().assertClusterActivation(bean.getApplicationId(), tenant1Id);
 
             //Verifying whether members got created using round robin algorithm
-            assertClusterWithScalingup(bean.getApplicationId(), -1234);
+            assertClusterWithScalingup(bean.getApplicationId(), tenant1Id);
 
             boolean removedAuto = restClientTenant1.removeEntity(RestConstants.AUTOSCALING_POLICIES,
                     autoscalingPolicyId, RestConstants.AUTOSCALING_POLICIES_NAME);
@@ -134,7 +134,7 @@ public class SingleClusterScalingTest extends StratosTestServerManager {
                     RestConstants.APPLICATIONS_NAME);
             assertEquals(unDeployed, true);
 
-            boolean undeploy = TopologyHandler.getInstance().assertApplicationUndeploy("single-cluster-scaling-test", -1234);
+            boolean undeploy = TopologyHandler.getInstance().assertApplicationUndeploy("single-cluster-scaling-test", tenant1Id);
             if (!undeploy) {
                 //Need to forcefully undeploy the application
                 log.info("Force undeployment is going to start for the [application] " + "single-cluster-scaling-test");
@@ -142,7 +142,7 @@ public class SingleClusterScalingTest extends StratosTestServerManager {
                 restClientTenant1.undeployEntity(RestConstants.APPLICATIONS + "/" + "single-cluster-scaling-test" +
                         RestConstants.APPLICATIONS_UNDEPLOY + "?force=true", RestConstants.APPLICATIONS);
 
-                boolean forceUndeployed = TopologyHandler.getInstance().assertApplicationUndeploy("single-cluster-scaling-test", -1234);
+                boolean forceUndeployed = TopologyHandler.getInstance().assertApplicationUndeploy("single-cluster-scaling-test", tenant1Id);
                 assertEquals(String.format("Forceful undeployment failed for the application %s",
                         "single-cluster-scaling-test"), forceUndeployed, true);
 

http://git-wip-us.apache.org/repos/asf/stratos/blob/01eafd73/products/stratos/modules/integration/src/test/resources/stratos-testing.xml
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/stratos-testing.xml b/products/stratos/modules/integration/src/test/resources/stratos-testing.xml
index cc59cd6..cd65ade 100644
--- a/products/stratos/modules/integration/src/test/resources/stratos-testing.xml
+++ b/products/stratos/modules/integration/src/test/resources/stratos-testing.xml
@@ -21,7 +21,7 @@
 <!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
 
 <suite name="StratosIntegrationSuite">
-<!--
+
    <test name="CartridgeTest">
        <classes>
            <class name="org.apache.stratos.integration.tests.group.CartridgeTest" />
@@ -73,7 +73,7 @@
        <classes>
            <class name="org.apache.stratos.integration.tests.application.SingleClusterScalingTest" />
        </classes>
-   </test>             -->
+   </test>
    <test name="PartitionRoundRobinClusterTest">
        <classes>
            <class name="org.apache.stratos.integration.tests.application.PartitionRoundRobinClusterTest" />