stratos-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From im...@apache.org
Subject stratos git commit: Automated integration test to verify single-cartridge sample application
Date Mon, 02 Feb 2015 18:06:52 GMT
Repository: stratos
Updated Branches:
  refs/heads/master 925aa02f2 -> c2a9131ba


Automated integration test to verify single-cartridge sample application


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

Branch: refs/heads/master
Commit: c2a9131ba64f6b31b0fd9a83ba84b1b052f38bc1
Parents: 925aa02
Author: Imesh Gunaratne <imesh@apache.org>
Authored: Mon Feb 2 23:36:41 2015 +0530
Committer: Imesh Gunaratne <imesh@apache.org>
Committed: Mon Feb 2 23:36:41 2015 +0530

----------------------------------------------------------------------
 .../AutoscalerTopologyEventReceiver.java        |   7 +-
 .../stratos/common/test/TestLogAppender.java    |  52 ++++++++
 .../stratos/common/test/TestLogAppender.java    |  52 --------
 products/stratos/modules/integration/pom.xml    |  23 +++-
 .../integration/tests/LoginLogoutTestCase.java  |  49 ++++++++
 .../tests/SampleApplicationTests.java           | 124 +++++++++++++++++++
 .../tests/SecurityVerificationTestCase.java     |  27 ++++
 .../tests/StratosTestServerManager.java         | 120 ++++++++++++++++++
 .../integration/tests/TenantMgtTestCase.java    |  92 ++++++++++++++
 .../integration/tests/LoginLogoutTestCase.java  |  49 --------
 .../tests/SampleApplicationTests.java           |  48 -------
 .../tests/SecurityVerificationTestCase.java     |  27 ----
 .../tests/StratosTestServerManager.java         | 122 ------------------
 .../integration/tests/TenantMgtTestCase.java    |  92 --------------
 .../src/test/resources/jndi.properties          |  22 ++++
 .../src/test/resources/mock-iaas.xml            |  43 +++++++
 .../integration/src/test/resources/testing.xml  |   4 +-
 products/stratos/pom.xml                        |   2 +-
 18 files changed, 556 insertions(+), 399 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/c2a9131b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/event/receiver/topology/AutoscalerTopologyEventReceiver.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/event/receiver/topology/AutoscalerTopologyEventReceiver.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/event/receiver/topology/AutoscalerTopologyEventReceiver.java
index 0ce3f1a..d30f54b 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/event/receiver/topology/AutoscalerTopologyEventReceiver.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/event/receiver/topology/AutoscalerTopologyEventReceiver.java
@@ -137,10 +137,8 @@ public class AutoscalerTopologyEventReceiver {
                         //acquire read lock
                         ApplicationHolder.acquireReadLock();
                         //start the application monitor if the policy exists
-                        DeploymentPolicy policy = PolicyManager.getInstance().
-                                getDeploymentPolicyByApplication(appId);
-                        if (policy != null && !AutoscalerContext.getInstance().
-                                containsPendingMonitor(appId)) {
+                        DeploymentPolicy policy = PolicyManager.getInstance().getDeploymentPolicyByApplication(appId);
+                        if (policy != null && !AutoscalerContext.getInstance().containsPendingMonitor(appId)) {
                             AutoscalerUtil.getInstance().startApplicationMonitor(appId);
                         }
                     } catch (Exception e) {
@@ -149,7 +147,6 @@ public class AutoscalerTopologyEventReceiver {
                     } finally {
                         //release read lock
                         ApplicationHolder.releaseReadLock();
-
                     }
                 } catch (ClassCastException e) {
                     String msg = "Error while casting the event " + e.getLocalizedMessage();

http://git-wip-us.apache.org/repos/asf/stratos/blob/c2a9131b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/test/TestLogAppender.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/test/TestLogAppender.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/test/TestLogAppender.java
new file mode 100644
index 0000000..4d74826
--- /dev/null
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/test/TestLogAppender.java
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.stratos.common.test;
+
+import org.apache.log4j.AppenderSkeleton;
+import org.apache.log4j.spi.LoggingEvent;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class TestLogAppender extends AppenderSkeleton {
+
+    private List<String> messages;
+
+    public TestLogAppender() {
+        messages = new ArrayList<String>();
+    }
+
+    public List<String> getMessages() {
+        return new ArrayList<String>(messages);
+    }
+
+    public void close() {}
+
+    public boolean requiresLayout() {
+        return false;
+    }
+
+    @Override
+    protected void append(LoggingEvent event) {
+        if(event.getMessage() != null) {
+            messages.add(event.getMessage().toString());
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c2a9131b/components/org.apache.stratos.common/src/test/java/org/apache/stratos/common/test/TestLogAppender.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/test/java/org/apache/stratos/common/test/TestLogAppender.java b/components/org.apache.stratos.common/src/test/java/org/apache/stratos/common/test/TestLogAppender.java
deleted file mode 100644
index 4d74826..0000000
--- a/components/org.apache.stratos.common/src/test/java/org/apache/stratos/common/test/TestLogAppender.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.stratos.common.test;
-
-import org.apache.log4j.AppenderSkeleton;
-import org.apache.log4j.spi.LoggingEvent;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class TestLogAppender extends AppenderSkeleton {
-
-    private List<String> messages;
-
-    public TestLogAppender() {
-        messages = new ArrayList<String>();
-    }
-
-    public List<String> getMessages() {
-        return new ArrayList<String>(messages);
-    }
-
-    public void close() {}
-
-    public boolean requiresLayout() {
-        return false;
-    }
-
-    @Override
-    protected void append(LoggingEvent event) {
-        if(event.getMessage() != null) {
-            messages.add(event.getMessage().toString());
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c2a9131b/products/stratos/modules/integration/pom.xml
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/pom.xml b/products/stratos/modules/integration/pom.xml
index 4d9b1a0..6437003 100755
--- a/products/stratos/modules/integration/pom.xml
+++ b/products/stratos/modules/integration/pom.xml
@@ -35,6 +35,16 @@
 
     <dependencies>
         <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-exec</artifactId>
+            <version>1.0.1</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.stratos</groupId>
+            <artifactId>org.apache.stratos.common</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
             <groupId>org.wso2.carbon</groupId>
             <artifactId>org.wso2.carbon.integration.framework</artifactId>
             <version>${carbon.kernel.version}</version>
@@ -72,6 +82,17 @@
             <artifactId>activemq-all</artifactId>
             <version>5.10.0</version>
         </dependency>
+        <dependency>
+            <groupId>org.apache.stratos</groupId>
+            <artifactId>org.apache.stratos.messaging</artifactId>
+            <version>4.1.0-SNAPSHOT</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.wso2.andes.wso2</groupId>
+            <artifactId>andes-client</artifactId>
+            <version>0.13.wso2v8</version>
+        </dependency>
     </dependencies>
 
     <build>
@@ -93,7 +114,7 @@
                 <inherited>false</inherited>
                 <configuration>
                     <suiteXmlFiles>
-                        <suiteXmlFile>src/test/resources/testng.xml</suiteXmlFile>
+                        <suiteXmlFile>src/test/resources/testing.xml</suiteXmlFile>
                     </suiteXmlFiles>
                     <!--includes>
                         <include>**/*TestServerManager.java</include>

http://git-wip-us.apache.org/repos/asf/stratos/blob/c2a9131b/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/LoginLogoutTestCase.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/LoginLogoutTestCase.java b/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/LoginLogoutTestCase.java
new file mode 100755
index 0000000..9ca01a4
--- /dev/null
+++ b/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/LoginLogoutTestCase.java
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+//package org.apache.stratos.manager.integration.tests;
+
+//import org.apache.commons.logging.Log;
+//import org.apache.commons.logging.LogFactory;
+//import org.testng.annotations.Test;
+//import org.wso2.carbon.integration.framework.ClientConnectionUtil;
+//import org.wso2.carbon.integration.framework.LoginLogoutUtil;
+
+/**
+ * A test case which tests logging in & logging out of a Carbon core server
+ */
+//public class LoginLogoutTestCase {
+//
+//    private LoginLogoutUtil util = new LoginLogoutUtil();
+//    public static final Log log = LogFactory.getLog(LoginLogoutTestCase.class);
+//
+//    @Test(groups = {"stratos.manager"})
+//    public void login() throws Exception {
+//        log.info("****************************** LoginLogoutTestCase Start ******************************");
+//        ClientConnectionUtil.waitForPort(9763);
+//        util.login();
+//    }
+//
+//    @Test(groups = {"stratos.manager"})
+//    public void logout() throws Exception {
+//        ClientConnectionUtil.waitForPort(9763);
+//        util.logout();
+//        log.info("****************************** LoginLogoutTestCase End ******************************");
+//    }
+//}
+

http://git-wip-us.apache.org/repos/asf/stratos/blob/c2a9131b/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/SampleApplicationTests.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/SampleApplicationTests.java b/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/SampleApplicationTests.java
new file mode 100644
index 0000000..6a2ffba
--- /dev/null
+++ b/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/SampleApplicationTests.java
@@ -0,0 +1,124 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.stratos.integration.tests;
+
+import org.apache.commons.exec.CommandLine;
+import org.apache.commons.exec.DefaultExecutor;
+import org.apache.commons.exec.PumpStreamHandler;
+import org.apache.commons.lang.StringUtils;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.log4j.Level;
+import org.apache.log4j.Logger;
+import org.apache.stratos.common.test.TestLogAppender;
+import org.apache.stratos.common.threading.StratosThreadPool;
+import org.apache.stratos.messaging.domain.application.Application;
+import org.apache.stratos.messaging.domain.application.ApplicationStatus;
+import org.apache.stratos.messaging.message.receiver.application.ApplicationManager;
+import org.apache.stratos.messaging.message.receiver.application.ApplicationsEventReceiver;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.util.concurrent.ExecutorService;
+
+import static junit.framework.Assert.assertEquals;
+import static junit.framework.Assert.assertNotNull;
+import static junit.framework.Assert.assertTrue;
+
+/**
+ * Sample application tests.
+ */
+public class SampleApplicationTests extends StratosTestServerManager {
+
+    private static final Log log = LogFactory.getLog(StratosTestServerManager.class);
+
+    private final static String SAMPLES_FOLDER_PATH = SampleApplicationTests.class.getResource("/").getPath() +
+            "./../../../../../../samples";
+    private TestLogAppender testLogAppender;
+
+    @BeforeClass
+    public void setUp(){
+        String path = getClass().getResource("/").getPath();
+        path = StringUtils.removeEnd(path, File.separator);
+        System.setProperty("jndi.properties.dir", path);
+
+        testLogAppender = new TestLogAppender();
+        Logger.getRootLogger().addAppender(testLogAppender);
+        Logger.getRootLogger().setLevel(Level.INFO);
+    }
+
+    @Test
+    public void testSingleCartridgeApplication() {
+        try {
+            ApplicationsEventReceiver applicationsEventReceiver = new ApplicationsEventReceiver();
+            ExecutorService executorService = StratosThreadPool.getExecutorService("STRATOS_TEST_SERVER", 1);
+            applicationsEventReceiver.setExecutorService(executorService);
+            applicationsEventReceiver.execute();
+
+            while (!serverStarted(testLogAppender)) {
+                log.info("Waiting for stratos server to be started...");
+                Thread.sleep(2000);
+            }
+            String scriptPath = SAMPLES_FOLDER_PATH + "/applications/single-cartridge/scripts/mock/deploy.sh";
+            executeCommand(scriptPath);
+
+            long startTime = System.currentTimeMillis();
+            Application application = ApplicationManager.getApplications().getApplication("single-cartridge-app");
+            while(!((application != null) && (application.getStatus() == ApplicationStatus.Active))) {
+                application = ApplicationManager.getApplications().getApplication("single-cartridge-app");
+                if((System.currentTimeMillis() - startTime) > 240000) {
+                    break;
+                }
+            }
+
+            assertNotNull("Application is not found", application);
+            assertEquals(String.format("Application status did not change to active", application.getStatus()), ApplicationStatus.Active, application.getStatus());
+        } catch (Exception e) {
+            log.error(e);
+            assertTrue("An error occurred", false);
+        }
+    }
+
+    private boolean serverStarted(TestLogAppender testLogAppender) {
+        for(String message : testLogAppender.getMessages()) {
+            if(message.contains("Topology initialized")) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    private void executeCommand(String commandText) {
+        ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
+        try {
+            CommandLine commandline = CommandLine.parse(commandText);
+            DefaultExecutor exec = new DefaultExecutor();
+            PumpStreamHandler streamHandler = new PumpStreamHandler(outputStream);
+            exec.setStreamHandler(streamHandler);
+            exec.execute(commandline);
+            log.info(outputStream.toString());
+        } catch (Exception e) {
+            log.error(outputStream.toString(), e);
+            throw new RuntimeException(e);
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c2a9131b/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/SecurityVerificationTestCase.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/SecurityVerificationTestCase.java b/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/SecurityVerificationTestCase.java
new file mode 100755
index 0000000..3ec500f
--- /dev/null
+++ b/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/SecurityVerificationTestCase.java
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+//package org.apache.stratos.manager.integration.tests;
+
+//import org.wso2.carbon.integration.framework.SecurityVerificationTest;
+
+/**
+ * Test to ensure that the WSO2 Stratos Manager is properly secured
+ */
+//public class SecurityVerificationTestCase extends SecurityVerificationTest {
+//}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c2a9131b/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
new file mode 100755
index 0000000..2c20449
--- /dev/null
+++ b/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/StratosTestServerManager.java
@@ -0,0 +1,120 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.stratos.integration.tests;
+
+import org.apache.activemq.broker.BrokerService;
+import org.apache.commons.io.FileUtils;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.testng.annotations.AfterSuite;
+import org.testng.annotations.BeforeSuite;
+import org.wso2.carbon.integration.framework.TestServerManager;
+import org.wso2.carbon.integration.framework.utils.FrameworkSettings;
+import org.wso2.carbon.integration.framework.utils.ServerUtils;
+import org.wso2.carbon.integration.framework.utils.TestUtil;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URL;
+
+import static org.testng.Assert.assertNotNull;
+
+/**
+ * Prepare activemq, stratos server for tests, enables mock iaas, starts servers and stop them after the tests.
+ */
+public class StratosTestServerManager extends TestServerManager {
+
+    private static final Log log = LogFactory.getLog(StratosTestServerManager.class);
+
+    private final static String CARBON_ZIP = SampleApplicationTests.class.getResource("/").getPath() +
+            "/../../../distribution/target/apache-stratos-4.1.0-SNAPSHOT.zip";
+    private final static int PORT_OFFSET = 0;
+    private static final String ACTIVEMQ_BIND_ADDRESS1 = "tcp://localhost:61616";
+    private static final String MOCK_IAAS_XML = "mock-iaas.xml";
+
+    private ServerUtils serverUtils;
+    private String carbonHome;
+
+    public StratosTestServerManager() {
+        super(CARBON_ZIP, PORT_OFFSET);
+        serverUtils = new ServerUtils();
+    }
+
+    @Override
+    @BeforeSuite
+    public String startServer() throws IOException {
+        try {
+            // Start ActiveMQ
+            long time1 = System.currentTimeMillis();
+            log.info("Starting ActiveMQ...");
+            BrokerService broker = new BrokerService();
+            broker.setBrokerName("testBroker");
+            broker.addConnector(ACTIVEMQ_BIND_ADDRESS1);
+            broker.start();
+            long time2 = System.currentTimeMillis();
+            log.info(String.format("ActiveMQ started in %d sec", (time2 - time1)/1000));
+        } catch (Exception e) {
+            throw new RuntimeException("Could not start ActiveMQ", e);
+        }
+
+        try {
+            log.info("Setting up stratos server...");
+            long time3 = System.currentTimeMillis();
+            String carbonZip = getCarbonZip();
+            if (carbonZip == null) {
+                carbonZip = System.getProperty("carbon.zip");
+            }
+
+            if (carbonZip == null) {
+                throw new IllegalArgumentException("carbon zip file is null");
+            } else {
+                carbonHome = this.serverUtils.setUpCarbonHome(carbonZip);
+                TestUtil.copySecurityVerificationService(carbonHome);
+                this.copyArtifacts(carbonHome);
+                log.info("Stratos server setup completed");
+
+                log.info("Starting stratos server...");
+                this.serverUtils.startServerUsingCarbonHome(carbonHome, carbonHome, "stratos", PORT_OFFSET, null);
+                FrameworkSettings.init();
+                long time4 = System.currentTimeMillis();
+                log.info(String.format("Stratos server started in %d sec", (time4 - time3)/1000));
+                return carbonHome;
+            }
+        } catch (Exception e) {
+            throw new RuntimeException("Could not stratos server", e);
+        }
+    }
+
+    @Override
+    @AfterSuite
+    public void stopServer() throws Exception {
+        super.stopServer();
+    }
+
+    protected void copyArtifacts(String carbonHome) throws IOException {
+        log.info("Copying " + MOCK_IAAS_XML + " configuration file...");
+        URL mockIaasUrl = getClass().getResource("/" + MOCK_IAAS_XML);
+        assertNotNull(mockIaasUrl);
+        File srcFile = new File(mockIaasUrl.getFile());
+        File destFile = new File(carbonHome + "/repository/conf/" + MOCK_IAAS_XML);
+        FileUtils.copyFile(srcFile, destFile);
+        log.info(MOCK_IAAS_XML + " configuration file copied");
+    }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c2a9131b/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/TenantMgtTestCase.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/TenantMgtTestCase.java b/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/TenantMgtTestCase.java
new file mode 100755
index 0000000..daf149a
--- /dev/null
+++ b/products/stratos/modules/integration/src/test/java/org/apache/stratos/integration/tests/TenantMgtTestCase.java
@@ -0,0 +1,92 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+//package org.apache.stratos.manager.integration.tests;
+
+//import org.apache.axis2.client.ServiceClient;
+//import org.apache.commons.logging.Log;
+//import org.apache.commons.logging.LogFactory;
+//import org.testng.Assert;
+//import org.testng.annotations.AfterClass;
+//import org.testng.annotations.BeforeClass;
+//import org.testng.annotations.Test;
+//import org.wso2.carbon.integration.framework.utils.FrameworkSettings;
+//import org.apache.stratos.tenant.mgt.stub.TenantMgtAdminServiceStub;
+//import org.apache.stratos.tenant.mgt.stub.beans.xsd.TenantInfoBean;
+//import org.wso2.carbon.utils.CarbonUtils;
+//
+//import java.util.Calendar;
+//import java.util.Date;
+//import java.util.GregorianCalendar;
+
+//public class TenantMgtTestCase {
+//
+//    private static String TenantMgtAdminServiceURL;
+//    private static String TestTenantDomain;
+//    public static final Log log = LogFactory.getLog(TenantMgtTestCase.class);
+//
+//    @BeforeClass
+//    public void init() {
+//        log.info("****************************** TenantMgtTestCase Start ******************************");
+//        TestTenantDomain = "testcase.org";
+//        TenantMgtAdminServiceURL = "https://" + FrameworkSettings.HOST_NAME + ":" +
+//                                 FrameworkSettings.HTTPS_PORT + "/services/TenantMgtAdminService";
+//    }
+//
+//    @Test(groups = {"stratos.manager"})
+//    public void addTenantTest() throws Exception {
+//        Calendar calender = new GregorianCalendar();
+//        calender.setTime(new Date());
+//
+//        TenantInfoBean tenantInfoBean = new TenantInfoBean();
+//        tenantInfoBean.setActive(true);
+//        tenantInfoBean.setEmail("manager-test@wso2.com");
+//        tenantInfoBean.setAdmin("admin");
+//        tenantInfoBean.setAdminPassword("admin123");
+//        tenantInfoBean.setTenantDomain(TestTenantDomain);
+//        tenantInfoBean.setCreatedDate(calender);
+//        tenantInfoBean.setFirstname("Fname");
+//        tenantInfoBean.setLastname("Lname");
+//        tenantInfoBean.setSuccessKey("true");
+//        tenantInfoBean.setUsagePlan("Demo");
+//
+//        TenantMgtAdminServiceStub stub = new TenantMgtAdminServiceStub(TenantMgtAdminServiceURL);
+//        ServiceClient client = stub._getServiceClient();
+//        CarbonUtils.setBasicAccessSecurityHeaders(FrameworkSettings.USER_NAME, FrameworkSettings.PASSWORD, client);
+//
+//        String result = stub.addTenant(tenantInfoBean);
+//        Assert.assertTrue(stub.retrieveTenants()[0].getTenantDomain().equals(TestTenantDomain));
+//
+//    }
+//
+//    @Test(groups = {"stratos.manager"})
+//    public void activateTenantTest() throws Exception {
+//        TenantMgtAdminServiceStub stub = new TenantMgtAdminServiceStub(TenantMgtAdminServiceURL);
+//        ServiceClient client = stub._getServiceClient();
+//        CarbonUtils.setBasicAccessSecurityHeaders(FrameworkSettings.USER_NAME, FrameworkSettings.PASSWORD, client);
+//        stub.activateTenant(TestTenantDomain);
+//        Assert.assertTrue(stub.retrieveTenants()[0].getActive());
+//    }
+//
+//    @AfterClass
+//    public void end(){
+//        log.info("****************************** TenantMgtTestCase End ******************************");
+//    }
+//
+//}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c2a9131b/products/stratos/modules/integration/src/test/java/org/apache/stratos/manager/integration/tests/LoginLogoutTestCase.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/java/org/apache/stratos/manager/integration/tests/LoginLogoutTestCase.java b/products/stratos/modules/integration/src/test/java/org/apache/stratos/manager/integration/tests/LoginLogoutTestCase.java
deleted file mode 100755
index 9ca01a4..0000000
--- a/products/stratos/modules/integration/src/test/java/org/apache/stratos/manager/integration/tests/LoginLogoutTestCase.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-//package org.apache.stratos.manager.integration.tests;
-
-//import org.apache.commons.logging.Log;
-//import org.apache.commons.logging.LogFactory;
-//import org.testng.annotations.Test;
-//import org.wso2.carbon.integration.framework.ClientConnectionUtil;
-//import org.wso2.carbon.integration.framework.LoginLogoutUtil;
-
-/**
- * A test case which tests logging in & logging out of a Carbon core server
- */
-//public class LoginLogoutTestCase {
-//
-//    private LoginLogoutUtil util = new LoginLogoutUtil();
-//    public static final Log log = LogFactory.getLog(LoginLogoutTestCase.class);
-//
-//    @Test(groups = {"stratos.manager"})
-//    public void login() throws Exception {
-//        log.info("****************************** LoginLogoutTestCase Start ******************************");
-//        ClientConnectionUtil.waitForPort(9763);
-//        util.login();
-//    }
-//
-//    @Test(groups = {"stratos.manager"})
-//    public void logout() throws Exception {
-//        ClientConnectionUtil.waitForPort(9763);
-//        util.logout();
-//        log.info("****************************** LoginLogoutTestCase End ******************************");
-//    }
-//}
-

http://git-wip-us.apache.org/repos/asf/stratos/blob/c2a9131b/products/stratos/modules/integration/src/test/java/org/apache/stratos/manager/integration/tests/SampleApplicationTests.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/java/org/apache/stratos/manager/integration/tests/SampleApplicationTests.java b/products/stratos/modules/integration/src/test/java/org/apache/stratos/manager/integration/tests/SampleApplicationTests.java
deleted file mode 100644
index 7cca354..0000000
--- a/products/stratos/modules/integration/src/test/java/org/apache/stratos/manager/integration/tests/SampleApplicationTests.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.stratos.manager.integration.tests;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.testng.annotations.Test;
-
-import java.io.File;
-
-/**
- * Sample application tests.
- */
-public class SampleApplicationTests extends StratosTestServerManager {
-
-    private static final Log log = LogFactory.getLog(StratosTestServerManager.class);
-
-    private final static String SAMPLES_FOLDER_PATH = SampleApplicationTests.class.getResource("/").getPath() +
-            "/../../../../../../samples";
-
-    @Test
-    public void testComplexApplication() {
-        try {
-            startServer();
-            File deployFilePath = new File(SAMPLES_FOLDER_PATH + "/applications/complex-app/scripts/mock/deploy.sh");
-            deployFilePath.exists();
-        } catch (Exception e) {
-            log.error(e);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c2a9131b/products/stratos/modules/integration/src/test/java/org/apache/stratos/manager/integration/tests/SecurityVerificationTestCase.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/java/org/apache/stratos/manager/integration/tests/SecurityVerificationTestCase.java b/products/stratos/modules/integration/src/test/java/org/apache/stratos/manager/integration/tests/SecurityVerificationTestCase.java
deleted file mode 100755
index 3ec500f..0000000
--- a/products/stratos/modules/integration/src/test/java/org/apache/stratos/manager/integration/tests/SecurityVerificationTestCase.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-//package org.apache.stratos.manager.integration.tests;
-
-//import org.wso2.carbon.integration.framework.SecurityVerificationTest;
-
-/**
- * Test to ensure that the WSO2 Stratos Manager is properly secured
- */
-//public class SecurityVerificationTestCase extends SecurityVerificationTest {
-//}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c2a9131b/products/stratos/modules/integration/src/test/java/org/apache/stratos/manager/integration/tests/StratosTestServerManager.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/java/org/apache/stratos/manager/integration/tests/StratosTestServerManager.java b/products/stratos/modules/integration/src/test/java/org/apache/stratos/manager/integration/tests/StratosTestServerManager.java
deleted file mode 100755
index d3fb0d9..0000000
--- a/products/stratos/modules/integration/src/test/java/org/apache/stratos/manager/integration/tests/StratosTestServerManager.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.stratos.manager.integration.tests;
-
-import org.apache.activemq.broker.BrokerService;
-import org.apache.commons.io.FileUtils;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.testng.annotations.AfterSuite;
-import org.testng.annotations.BeforeSuite;
-import org.wso2.carbon.integration.framework.TestServerManager;
-import org.wso2.carbon.integration.framework.utils.FrameworkSettings;
-import org.wso2.carbon.integration.framework.utils.ServerUtils;
-import org.wso2.carbon.integration.framework.utils.TestUtil;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URL;
-
-import static org.testng.Assert.assertNotNull;
-
-/**
- * Prepare activemq, stratos server for tests, enables mock iaas, starts servers and stop them after the tests.
- */
-public class StratosTestServerManager extends TestServerManager {
-
-    private static final Log log = LogFactory.getLog(StratosTestServerManager.class);
-
-    private final static String CARBON_ZIP = SampleApplicationTests.class.getResource("/").getPath() +
-            "/../../../distribution/target/apache-stratos-4.1.0-SNAPSHOT.zip";
-    private final static int PORT_OFFSET = 0;
-    private static final String ACTIVEMQ_BIND_ADDRESS1 = "tcp://localhost:61616";
-    private static final String ACTIVEMQ_BIND_ADDRESS2 = "tcp://localhost:5672";
-    private static final String MOCK_IAAS_XML = "mock-iaas.xml";
-    public static final String MQTT_URI = "mqtt://0.0.0.0:1883?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600";
-
-    private ServerUtils serverUtils;
-    private String carbonHome;
-
-    public StratosTestServerManager() {
-        super(CARBON_ZIP, PORT_OFFSET);
-        serverUtils = new ServerUtils();
-    }
-
-    @Override
-    @BeforeSuite(timeOut = 300000)
-    public String startServer() throws IOException {
-        try {
-            // Start ActiveMQ
-            long time1 = System.currentTimeMillis();
-            log.info("Starting ActiveMQ...");
-            BrokerService broker = new BrokerService();
-            broker.setBrokerName("testBroker");
-            broker.addConnector(ACTIVEMQ_BIND_ADDRESS1);
-            broker.start();
-            long time2 = System.currentTimeMillis();
-            log.info(String.format("ActiveMQ started in %d sec", (time2 - time1)/1000));
-        } catch (Exception e) {
-            throw new RuntimeException("Could not start ActiveMQ", e);
-        }
-
-        try {
-            log.info("Setting up stratos server...");
-            long time3 = System.currentTimeMillis();
-            String carbonZip = getCarbonZip();
-            if (carbonZip == null) {
-                carbonZip = System.getProperty("carbon.zip");
-            }
-
-            if (carbonZip == null) {
-                throw new IllegalArgumentException("carbon zip file is null");
-            } else {
-                carbonHome = this.serverUtils.setUpCarbonHome(carbonZip);
-                TestUtil.copySecurityVerificationService(carbonHome);
-                this.copyArtifacts(carbonHome);
-                log.info("Stratos server setup completed");
-
-                log.info("Starting stratos server...");
-                this.serverUtils.startServerUsingCarbonHome(carbonHome, carbonHome, "stratos", PORT_OFFSET, null);
-                FrameworkSettings.init();
-                long time4 = System.currentTimeMillis();
-                log.info(String.format("Stratos server started in %d sec", (time4 - time3)/1000));
-                return carbonHome;
-            }
-        } catch (Exception e) {
-            throw new RuntimeException("Could not stratos server", e);
-        }
-    }
-
-    @Override
-    @AfterSuite(timeOut = 60000)
-    public void stopServer() throws Exception {
-        super.stopServer();
-    }
-
-    protected void copyArtifacts(String carbonHome) throws IOException {
-        log.info("Copying " + MOCK_IAAS_XML + " configuration file...");
-        URL mockIaasUrl = getClass().getResource("/" + MOCK_IAAS_XML);
-        assertNotNull(mockIaasUrl);
-        File srcFile = new File(mockIaasUrl.getFile());
-        File destFile = new File(carbonHome + "/repository/conf/" + MOCK_IAAS_XML);
-        FileUtils.copyFile(srcFile, destFile);
-        log.info(MOCK_IAAS_XML + " configuration file copied");
-    }
-}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c2a9131b/products/stratos/modules/integration/src/test/java/org/apache/stratos/manager/integration/tests/TenantMgtTestCase.java
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/java/org/apache/stratos/manager/integration/tests/TenantMgtTestCase.java b/products/stratos/modules/integration/src/test/java/org/apache/stratos/manager/integration/tests/TenantMgtTestCase.java
deleted file mode 100755
index daf149a..0000000
--- a/products/stratos/modules/integration/src/test/java/org/apache/stratos/manager/integration/tests/TenantMgtTestCase.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-//package org.apache.stratos.manager.integration.tests;
-
-//import org.apache.axis2.client.ServiceClient;
-//import org.apache.commons.logging.Log;
-//import org.apache.commons.logging.LogFactory;
-//import org.testng.Assert;
-//import org.testng.annotations.AfterClass;
-//import org.testng.annotations.BeforeClass;
-//import org.testng.annotations.Test;
-//import org.wso2.carbon.integration.framework.utils.FrameworkSettings;
-//import org.apache.stratos.tenant.mgt.stub.TenantMgtAdminServiceStub;
-//import org.apache.stratos.tenant.mgt.stub.beans.xsd.TenantInfoBean;
-//import org.wso2.carbon.utils.CarbonUtils;
-//
-//import java.util.Calendar;
-//import java.util.Date;
-//import java.util.GregorianCalendar;
-
-//public class TenantMgtTestCase {
-//
-//    private static String TenantMgtAdminServiceURL;
-//    private static String TestTenantDomain;
-//    public static final Log log = LogFactory.getLog(TenantMgtTestCase.class);
-//
-//    @BeforeClass
-//    public void init() {
-//        log.info("****************************** TenantMgtTestCase Start ******************************");
-//        TestTenantDomain = "testcase.org";
-//        TenantMgtAdminServiceURL = "https://" + FrameworkSettings.HOST_NAME + ":" +
-//                                 FrameworkSettings.HTTPS_PORT + "/services/TenantMgtAdminService";
-//    }
-//
-//    @Test(groups = {"stratos.manager"})
-//    public void addTenantTest() throws Exception {
-//        Calendar calender = new GregorianCalendar();
-//        calender.setTime(new Date());
-//
-//        TenantInfoBean tenantInfoBean = new TenantInfoBean();
-//        tenantInfoBean.setActive(true);
-//        tenantInfoBean.setEmail("manager-test@wso2.com");
-//        tenantInfoBean.setAdmin("admin");
-//        tenantInfoBean.setAdminPassword("admin123");
-//        tenantInfoBean.setTenantDomain(TestTenantDomain);
-//        tenantInfoBean.setCreatedDate(calender);
-//        tenantInfoBean.setFirstname("Fname");
-//        tenantInfoBean.setLastname("Lname");
-//        tenantInfoBean.setSuccessKey("true");
-//        tenantInfoBean.setUsagePlan("Demo");
-//
-//        TenantMgtAdminServiceStub stub = new TenantMgtAdminServiceStub(TenantMgtAdminServiceURL);
-//        ServiceClient client = stub._getServiceClient();
-//        CarbonUtils.setBasicAccessSecurityHeaders(FrameworkSettings.USER_NAME, FrameworkSettings.PASSWORD, client);
-//
-//        String result = stub.addTenant(tenantInfoBean);
-//        Assert.assertTrue(stub.retrieveTenants()[0].getTenantDomain().equals(TestTenantDomain));
-//
-//    }
-//
-//    @Test(groups = {"stratos.manager"})
-//    public void activateTenantTest() throws Exception {
-//        TenantMgtAdminServiceStub stub = new TenantMgtAdminServiceStub(TenantMgtAdminServiceURL);
-//        ServiceClient client = stub._getServiceClient();
-//        CarbonUtils.setBasicAccessSecurityHeaders(FrameworkSettings.USER_NAME, FrameworkSettings.PASSWORD, client);
-//        stub.activateTenant(TestTenantDomain);
-//        Assert.assertTrue(stub.retrieveTenants()[0].getActive());
-//    }
-//
-//    @AfterClass
-//    public void end(){
-//        log.info("****************************** TenantMgtTestCase End ******************************");
-//    }
-//
-//}

http://git-wip-us.apache.org/repos/asf/stratos/blob/c2a9131b/products/stratos/modules/integration/src/test/resources/jndi.properties
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/jndi.properties b/products/stratos/modules/integration/src/test/resources/jndi.properties
new file mode 100644
index 0000000..21d7420
--- /dev/null
+++ b/products/stratos/modules/integration/src/test/resources/jndi.properties
@@ -0,0 +1,22 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#  http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+connectionfactoryName=TopicConnectionFactory
+java.naming.provider.url=tcp://localhost:61616
+java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory

http://git-wip-us.apache.org/repos/asf/stratos/blob/c2a9131b/products/stratos/modules/integration/src/test/resources/mock-iaas.xml
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/mock-iaas.xml b/products/stratos/modules/integration/src/test/resources/mock-iaas.xml
new file mode 100644
index 0000000..944a0d8
--- /dev/null
+++ b/products/stratos/modules/integration/src/test/resources/mock-iaas.xml
@@ -0,0 +1,43 @@
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~  http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<mock-iaas enabled="true">
+    <health-statistics>
+        <cartridge type="tomcat">
+            <!-- factor:memory-consumption|load-average|request-in-flight-->
+            <!-- mode:loop|continue|stop -->
+            <!-- Mode defines the action needs to be taken after the last sample value:
+                 loop: start from beginning
+                 continue: continue the last sample value
+                 stop: stop publishing statistics -->
+            <pattern factor="memory-consumption" mode="continue">
+                <!-- Sample values -->
+                <sampleValues>20,30,40,50,60,70,50,40,30,20</sampleValues>
+                <!-- Duration of each sample value in seconds -->
+                <sampleDuration>60</sampleDuration>
+            </pattern>
+            <pattern factor="load-average" mode="continue">
+                <!-- Sample values -->
+                <sampleValues>20</sampleValues>
+                <!-- Duration of each sample value in seconds -->
+                <sampleDuration>60</sampleDuration>
+            </pattern>
+        </cartridge>
+    </health-statistics>
+</mock-iaas>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/c2a9131b/products/stratos/modules/integration/src/test/resources/testing.xml
----------------------------------------------------------------------
diff --git a/products/stratos/modules/integration/src/test/resources/testing.xml b/products/stratos/modules/integration/src/test/resources/testing.xml
index 5f32fe9..6160b11 100644
--- a/products/stratos/modules/integration/src/test/resources/testing.xml
+++ b/products/stratos/modules/integration/src/test/resources/testing.xml
@@ -21,10 +21,10 @@
 -->
 
 <!DOCTYPE suite SYSTEM "http://beust.com/testng/testng-1.0.dtd" >
-<suite name="Apache Stratos Manager Test Suite">
+<suite name="Apache Stratos Test Suite">
     <test name="testing" preserve-order="true">
         <classes>
-            <class name="org.apache.stratos.manager.integration.tests.SampleApplicationTests"/>
+            <class name="org.apache.stratos.integration.tests.SampleApplicationTests"/>
             <!-- class name="org.apache.stratos.manager.integration.tests.LoginLogoutTestCase"/>
             <class name="org.apache.stratos.manager.integration.tests.SecurityVerificationTestCase"/>
             <class name="org.apache.stratos.manager.integration.tests.TenantMgtTestCase">

http://git-wip-us.apache.org/repos/asf/stratos/blob/c2a9131b/products/stratos/pom.xml
----------------------------------------------------------------------
diff --git a/products/stratos/pom.xml b/products/stratos/pom.xml
index 4c1404f..3c7d621 100755
--- a/products/stratos/pom.xml
+++ b/products/stratos/pom.xml
@@ -34,7 +34,7 @@
     <modules>
         <module>modules/p2-profile-gen</module>
         <module>modules/distribution</module>
-        <!--module>modules/integration</module-->
+        <module>modules/integration</module>
     </modules>
 
     <dependencyManagement>


Mime
View raw message