You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by ra...@apache.org on 2015/08/28 15:08:40 UTC
[1/3] stratos git commit: Fixing health stat publisher in PCA,
adding MT app integration test to PCA
Repository: stratos
Updated Branches:
refs/heads/stratos-4.1.x 6ed9bf662 -> 643683259
http://git-wip-us.apache.org/repos/asf/stratos/blob/64368325/products/python-cartridge-agent/integration/pom.xml
----------------------------------------------------------------------
diff --git a/products/python-cartridge-agent/integration/pom.xml b/products/python-cartridge-agent/integration/pom.xml
index a359615..52cc286 100755
--- a/products/python-cartridge-agent/integration/pom.xml
+++ b/products/python-cartridge-agent/integration/pom.xml
@@ -72,8 +72,13 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <excludes>
+ <exclude>**/*</exclude>
+ </excludes>
+ </configuration>
<executions>
- <execution>
+ <!--execution>
<id>default-test</id>
<goals>
<goal>test</goal>
@@ -98,6 +103,19 @@
</suiteXmlFiles>
<workingDirectory>${basedir}/target</workingDirectory>
</configuration>
+ </execution-->
+ <execution>
+ <id>adc-mt-test</id>
+ <goals>
+ <goal>test</goal>
+ </goals>
+ <inherited>false</inherited>
+ <configuration>
+ <suiteXmlFiles>
+ <suiteXmlFile>src/test/resources/pca-testing3.xml</suiteXmlFile>
+ </suiteXmlFiles>
+ <workingDirectory>${basedir}/target</workingDirectory>
+ </configuration>
</execution>
</executions>
</plugin>
http://git-wip-us.apache.org/repos/asf/stratos/blob/64368325/products/python-cartridge-agent/integration/src/test/java/org/apache/stratos/python.cartridge.agent/test/ADCMTAppTest.java
----------------------------------------------------------------------
diff --git a/products/python-cartridge-agent/integration/src/test/java/org/apache/stratos/python.cartridge.agent/test/ADCMTAppTest.java b/products/python-cartridge-agent/integration/src/test/java/org/apache/stratos/python.cartridge.agent/test/ADCMTAppTest.java
new file mode 100644
index 0000000..3104281
--- /dev/null
+++ b/products/python-cartridge-agent/integration/src/test/java/org/apache/stratos/python.cartridge.agent/test/ADCMTAppTest.java
@@ -0,0 +1,213 @@
+package org.apache.stratos.python.cartridge.agent.test;/*
+ * 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.
+ */
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.stratos.common.domain.LoadBalancingIPType;
+import org.apache.stratos.messaging.domain.topology.*;
+import org.apache.stratos.messaging.event.instance.notifier.ArtifactUpdatedEvent;
+import org.apache.stratos.messaging.event.topology.CompleteTopologyEvent;
+import org.apache.stratos.messaging.event.topology.MemberInitializedEvent;
+import org.testng.annotations.AfterSuite;
+import org.testng.annotations.BeforeSuite;
+import org.testng.annotations.Test;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Properties;
+
+import static junit.framework.Assert.assertTrue;
+
+public class ADCMTAppTest extends PythonAgentTestManager {
+ private static final Log log = LogFactory.getLog(ADCMTAppTest.class);
+ private static final int ADC_TIMEOUT = 180000;
+ private static final String RESOURCES_PATH = "/suite-3";
+ private static final String APPLICATION_PATH = "/tmp/pca-test-suite-3";
+ private static final String CLUSTER_ID = "tomcat.domain";
+ private static final String DEPLOYMENT_POLICY_NAME = "deployment-policy-3";
+ private static final String AUTOSCALING_POLICY_NAME = "autoscaling-policy-3";
+ private static final String APP_ID = "application-3";
+ private static final String MEMBER_ID = "tomcat.member-1";
+ private static final String CLUSTER_INSTANCE_ID = "cluster-1-instance-1";
+ private static final String NETWORK_PARTITION_ID = "network-partition-1";
+ private static final String PARTITION_ID = "partition-1";
+ private static final String TENANT_ID = "-1234";
+ private static final String SERVICE_NAME = "tomcat-mt";
+
+ private static boolean hasADCTestCompleted = false;
+
+ @BeforeSuite
+ public void setupADCMTAppTest() {
+ // Set jndi.properties.dir system property for initializing event publishers and receivers
+ System.setProperty("jndi.properties.dir", getResourcesPath(RESOURCES_PATH));
+
+ // start Python agent with configurations provided in resource path
+ setup(RESOURCES_PATH);
+
+ // Simulate server socket
+ startServerSocket(8080);
+ }
+
+ /**
+ * TearDown method for test method testPythonCartridgeAgent
+ */
+ @AfterSuite
+ public void tearDownADCMTAppTest() {
+ // TODO: app path is duplicated in Java test and payload
+ tearDown(APPLICATION_PATH);
+ }
+
+ @Test(timeOut = ADC_TIMEOUT)
+ public void testADCForMTApps() {
+ startCommunicatorThread();
+ assertAgentActivation();
+ Thread adcTestThread = new Thread(new Runnable() {
+ @Override
+ public void run() {
+ log.info("Running ADC MT Test thread...");
+ // Send artifact updated event
+ publishEvent(getArtifactUpdatedEventForPublicRepo());
+ log.info("Publishing artifact updated event for repo: " +
+ getArtifactUpdatedEventForPublicRepo().getRepoURL());
+
+ List<String> outputLines = new ArrayList<String>();
+ while (!outputStream.isClosed() && !hasADCTestCompleted) {
+ List<String> newLines = getNewLines(outputLines, outputStream.toString());
+ if (newLines.size() > 0) {
+ for (String line : newLines) {
+ if (line.contains("Git clone executed")) {
+ log.info("Agent has completed git clone. Asserting the operation...");
+ assertRepoClone(getArtifactUpdatedEventForPublicRepo());
+ //hasADCTestCompleted = true;
+ }
+ }
+ }
+ sleep(1000);
+ }
+ }
+ });
+ adcTestThread.start();
+
+ while (!hasADCTestCompleted) {
+ // wait until the instance activated event is received.
+ sleep(1000);
+ }
+ }
+
+ private void assertAgentActivation() {
+ Thread startupTestThread = new Thread(new Runnable() {
+ @Override
+ public void run() {
+ while (!eventReceiverInitiated) {
+ sleep(1000);
+ }
+ List<String> outputLines = new ArrayList<String>();
+ while (!outputStream.isClosed()) {
+ List<String> newLines = getNewLines(outputLines, outputStream.toString());
+ if (newLines.size() > 0) {
+ for (String line : newLines) {
+ if (line.contains("Subscribed to 'topology/#'")) {
+ sleep(2000);
+ // Send complete topology event
+ log.info("Publishing complete topology event...");
+ Topology topology = createTestTopology();
+ CompleteTopologyEvent completeTopologyEvent = new CompleteTopologyEvent(topology);
+ publishEvent(completeTopologyEvent);
+ log.info("Complete topology event published");
+
+ // Publish member initialized event
+ log.info("Publishing member initialized event...");
+ MemberInitializedEvent memberInitializedEvent = new MemberInitializedEvent(
+ SERVICE_NAME, CLUSTER_ID, CLUSTER_INSTANCE_ID, MEMBER_ID, NETWORK_PARTITION_ID,
+ PARTITION_ID
+ );
+ publishEvent(memberInitializedEvent);
+ log.info("Member initialized event published");
+ }
+
+ // Send artifact updated event to activate the instance first
+ if (line.contains("Artifact repository found")) {
+ publishEvent(getArtifactUpdatedEventForPublicRepo());
+ log.info("Artifact updated event published");
+ }
+ log.info(line);
+ }
+ }
+ sleep(1000);
+ }
+ }
+ });
+ startupTestThread.start();
+
+ while (!instanceStarted || !instanceActivated) {
+ // wait until the instance activated event is received.
+ // this will assert whether instance got activated within timeout period; no need for explicit assertions
+ sleep(2000);
+ }
+ }
+
+ private ArtifactUpdatedEvent getArtifactUpdatedEventForPublicRepo() {
+ ArtifactUpdatedEvent publicRepoEvent = createTestArtifactUpdatedEvent();
+ publicRepoEvent.setRepoURL("https://bitbucket.org/testapache2211/opentestrepo1.git");
+ return publicRepoEvent;
+ }
+
+ private void assertRepoClone(ArtifactUpdatedEvent artifactUpdatedEvent) {
+ File file = new File(APPLICATION_PATH + "/repository/deployment/server/test1.txt");
+ assertTrue("Git clone failed for repo [url] " + artifactUpdatedEvent.getRepoURL(),
+ file.exists());
+ }
+
+ private static ArtifactUpdatedEvent createTestArtifactUpdatedEvent() {
+ ArtifactUpdatedEvent artifactUpdatedEvent = new ArtifactUpdatedEvent();
+ artifactUpdatedEvent.setClusterId(CLUSTER_ID);
+ artifactUpdatedEvent.setTenantId(TENANT_ID);
+ return artifactUpdatedEvent;
+ }
+
+ /**
+ * Create test topology
+ *
+ * @return
+ */
+ private Topology createTestTopology() {
+ Topology topology = new Topology();
+ Service service = new Service(SERVICE_NAME, ServiceType.SingleTenant);
+ topology.addService(service);
+
+ Cluster cluster = new Cluster(service.getServiceName(), CLUSTER_ID, DEPLOYMENT_POLICY_NAME,
+ AUTOSCALING_POLICY_NAME, APP_ID);
+ service.addCluster(cluster);
+
+ Member member = new Member(service.getServiceName(), cluster.getClusterId(), MEMBER_ID,
+ CLUSTER_INSTANCE_ID, NETWORK_PARTITION_ID, PARTITION_ID, LoadBalancingIPType.Private,
+ System.currentTimeMillis());
+
+ member.setDefaultPrivateIP("10.0.0.1");
+ member.setDefaultPublicIP("20.0.0.1");
+ Properties properties = new Properties();
+ properties.setProperty("prop1", "value1");
+ member.setProperties(properties);
+ member.setStatus(MemberStatus.Created);
+ cluster.addMember(member);
+
+ return topology;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/stratos/blob/64368325/products/python-cartridge-agent/integration/src/test/java/org/apache/stratos/python.cartridge.agent/test/ADCTest.java
----------------------------------------------------------------------
diff --git a/products/python-cartridge-agent/integration/src/test/java/org/apache/stratos/python.cartridge.agent/test/ADCTest.java b/products/python-cartridge-agent/integration/src/test/java/org/apache/stratos/python.cartridge.agent/test/ADCTest.java
index e657ecc..99dc217 100755
--- a/products/python-cartridge-agent/integration/src/test/java/org/apache/stratos/python.cartridge.agent/test/ADCTest.java
+++ b/products/python-cartridge-agent/integration/src/test/java/org/apache/stratos/python.cartridge.agent/test/ADCTest.java
@@ -37,7 +37,7 @@ import java.util.UUID;
import static junit.framework.Assert.assertTrue;
-public class ADCTest extends PythonTestManager {
+public class ADCTest extends PythonAgentTestManager {
private static final Log log = LogFactory.getLog(ADCTest.class);
private static final int ADC_TIMEOUT = 180000;
private static final String RESOURCES_PATH = "/suite-2";
@@ -52,12 +52,11 @@ public class ADCTest extends PythonTestManager {
private static final String PARTITION_ID = "partition-1";
private static final String TENANT_ID = "-1234";
private static final String SERVICE_NAME = "tomcat";
- private static final String SOURCE_PATH = "/tmp/stratos-pca-adc-test-app-path/";
private static boolean hasADCTestCompleted = false;
@BeforeSuite
- public void setupStartUpTest() {
+ public void setupADCTest() {
// Set jndi.properties.dir system property for initializing event publishers and receivers
System.setProperty("jndi.properties.dir", getResourcesPath(RESOURCES_PATH));
@@ -72,33 +71,72 @@ public class ADCTest extends PythonTestManager {
* TearDown method for test method testPythonCartridgeAgent
*/
@AfterSuite
- public void tearDownStartUpTest() {
+ public void tearDownADCTest() {
// TODO: app path is duplicated in Java test and payload
tearDown(APPLICATION_PATH);
}
@Test(timeOut = ADC_TIMEOUT)
- public void testPythonCartridgeAgent() {
- Thread communicatorThread = new Thread(new Runnable() {
+ public void testADC() {
+ startCommunicatorThread();
+ assertAgentActivation();
+ Thread adcTestThread = new Thread(new Runnable() {
@Override
public void run() {
- while (!eventReceiverInitiated) {
- sleep(1000);
- }
+ log.info("Running ADC Test thread...");
+ // Send artifact updated event
+ publishEvent(getArtifactUpdatedEventForPrivateRepo());
+ log.info("Publishing artifact updated event for repo: " +
+ getArtifactUpdatedEventForPrivateRepo().getRepoURL());
+
List<String> outputLines = new ArrayList<String>();
- while (!outputStream.isClosed()) {
+ while (!outputStream.isClosed() && !hasADCTestCompleted) {
List<String> newLines = getNewLines(outputLines, outputStream.toString());
if (newLines.size() > 0) {
for (String line : newLines) {
- if (line.contains("Exception in thread") || line.contains("ERROR")) {
+ if (line.contains("Git clone executed")) {
+ log.info("Agent has completed git clone. Asserting the operation...");
+ assertRepoClone(getArtifactUpdatedEventForPrivateRepo());
+ File file = new File(APPLICATION_PATH + "/pca-live-" + UUID.randomUUID());
try {
- throw new RuntimeException(line);
+ file.createNewFile();
}
- catch (Exception e) {
- log.error("ERROR found in PCA log", e);
+ catch (IOException e) {
+ log.error("Could not create file", e);
}
}
+ if (line.contains("Pushed artifacts for tenant")) {
+ // TODO: Get rid of static var
+ log.info("ADC Test completed");
+ hasADCTestCompleted = true;
+ }
+ }
+ }
+ sleep(1000);
+ }
+ }
+ });
+ adcTestThread.start();
+
+ while (!hasADCTestCompleted) {
+ // wait until the instance activated event is received.
+ sleep(1000);
+ }
+ }
+
+ private void assertAgentActivation() {
+ Thread startupTestThread = new Thread(new Runnable() {
+ @Override
+ public void run() {
+ while (!eventReceiverInitiated) {
+ sleep(1000);
+ }
+ List<String> outputLines = new ArrayList<String>();
+ while (!outputStream.isClosed()) {
+ List<String> newLines = getNewLines(outputLines, outputStream.toString());
+ if (newLines.size() > 0) {
+ for (String line : newLines) {
if (line.contains("Subscribed to 'topology/#'")) {
sleep(2000);
// Send complete topology event
@@ -126,62 +164,17 @@ public class ADCTest extends PythonTestManager {
log.info(line);
}
}
- sleep(100);
- }
- }
- });
- communicatorThread.start();
-
- while (!instanceActivated) {
- // wait until the instance activated event is received.
- sleep(1000);
- }
- assertTrue("Instance started event was not received", instanceStarted);
- assertTrue("Instance activated event was not received", instanceActivated);
-
- Thread adcTestThread = new Thread(new Runnable() {
- @Override
- public void run() {
- log.info("Running ADC Test thread...");
- // Send artifact updated event
- publishEvent(getArtifactUpdatedEventForPrivateRepo());
- log.info("Publishing artifact updated event for repo: " +
- getArtifactUpdatedEventForPrivateRepo().getRepoURL());
-
- List<String> outputLines = new ArrayList<String>();
- while (!outputStream.isClosed() && !hasADCTestCompleted) {
- List<String> newLines = getNewLines(outputLines, outputStream.toString());
- if (newLines.size() > 0) {
- for (String line : newLines) {
- if (line.contains("Git clone executed")) {
- log.info("Agent has completed git clone. Asserting the operation...");
- assertRepoClone(getArtifactUpdatedEventForPrivateRepo());
- File file = new File(APPLICATION_PATH + "/pca-live-" + UUID.randomUUID());
- try {
- file.createNewFile();
- }
- catch (IOException e) {
- log.error("Could not create file", e);
- }
- }
- if (line.contains("Pushed artifacts for tenant")) {
- // TODO: Get rid of static var
- log.info("ADC Test completed");
- hasADCTestCompleted = true;
- }
- }
- }
- sleep(100);
+ sleep(1000);
}
}
});
- adcTestThread.start();
+ startupTestThread.start();
- while (!hasADCTestCompleted) {
+ while (!instanceStarted || !instanceActivated) {
// wait until the instance activated event is received.
- sleep(1000);
+ // this will assert whether instance got activated within timeout period; no need for explicit assertions
+ sleep(2000);
}
- assertTrue("ADC Test failed", hasADCTestCompleted);
}
private void assertRepoClone(ArtifactUpdatedEvent artifactUpdatedEvent) {
@@ -190,18 +183,7 @@ public class ADCTest extends PythonTestManager {
file.exists());
}
- private void assertRepoPush(ArtifactUpdatedEvent artifactUpdatedEvent) {
- File file = new File(APPLICATION_PATH + "/test1.txt");
- assertTrue("Git clone failed for repo [url] " + artifactUpdatedEvent.getRepoURL(), file.exists());
-
- }
- /**
- * This method returns a collection of {@link org.apache.stratos.messaging.event.instance.notifier.ArtifactUpdatedEvent}
- * objects as parameters to the test
- *
- * @return
- */
public static ArtifactUpdatedEvent getArtifactUpdatedEventForPublicRepo() {
ArtifactUpdatedEvent publicRepoEvent = createTestArtifactUpdatedEvent();
publicRepoEvent.setRepoURL("https://bitbucket.org/testapache2211/opentestrepo1.git");
@@ -216,12 +198,6 @@ public class ADCTest extends PythonTestManager {
return privateRepoEvent;
}
- /**
- * Creates an {@link org.apache.stratos.messaging.event.instance.notifier.ArtifactUpdatedEvent} object with a public
- * repository URL
- *
- * @return
- */
private static ArtifactUpdatedEvent createTestArtifactUpdatedEvent() {
ArtifactUpdatedEvent artifactUpdatedEvent = new ArtifactUpdatedEvent();
artifactUpdatedEvent.setClusterId(CLUSTER_ID);
http://git-wip-us.apache.org/repos/asf/stratos/blob/64368325/products/python-cartridge-agent/integration/src/test/java/org/apache/stratos/python.cartridge.agent/test/AgentStartupTest.java
----------------------------------------------------------------------
diff --git a/products/python-cartridge-agent/integration/src/test/java/org/apache/stratos/python.cartridge.agent/test/AgentStartupTest.java b/products/python-cartridge-agent/integration/src/test/java/org/apache/stratos/python.cartridge.agent/test/AgentStartupTest.java
new file mode 100755
index 0000000..83fc227
--- /dev/null
+++ b/products/python-cartridge-agent/integration/src/test/java/org/apache/stratos/python.cartridge.agent/test/AgentStartupTest.java
@@ -0,0 +1,149 @@
+/*
+ * 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.python.cartridge.agent.test;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.stratos.common.domain.LoadBalancingIPType;
+import org.apache.stratos.messaging.domain.topology.*;
+import org.apache.stratos.messaging.event.topology.CompleteTopologyEvent;
+import org.apache.stratos.messaging.event.topology.MemberInitializedEvent;
+import org.testng.annotations.AfterSuite;
+import org.testng.annotations.BeforeSuite;
+import org.testng.annotations.Test;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Properties;
+
+public class AgentStartupTest extends PythonAgentTestManager {
+ private static final Log log = LogFactory.getLog(AgentStartupTest.class);
+ private static final int STARTUP_TIMEOUT = 30000;
+ private static final String RESOURCES_PATH = "/suite-1";
+ private static final String CLUSTER_ID = "php.php.domain";
+ private static final String DEPLOYMENT_POLICY_NAME = "deployment-policy-1";
+ private static final String AUTOSCALING_POLICY_NAME = "autoscaling-policy-1";
+ private static final String APP_ID = "application-1";
+ private static final String MEMBER_ID = "php.member-1";
+ private static final String CLUSTER_INSTANCE_ID = "cluster-1-instance-1";
+ private static final String NETWORK_PARTITION_ID = "network-partition-1";
+ private static final String PARTITION_ID = "partition-1";
+ private static final String TENANT_ID = "-1234";
+ private static final String SERVICE_NAME = "php";
+
+ @BeforeSuite
+ public void setupAgentStartupTest() {
+ // Set jndi.properties.dir system property for initializing event publishers and receivers
+ System.setProperty("jndi.properties.dir", getResourcesPath(RESOURCES_PATH));
+
+ // start Python agent with configurations provided in resource path
+ setup(RESOURCES_PATH);
+
+ // Simulate server socket
+ startServerSocket(8080);
+ }
+
+
+ /**
+ * TearDown method for test method testPythonCartridgeAgent
+ */
+ @AfterSuite
+ public void tearDownAgentStartupTest() {
+ tearDown();
+ }
+
+ @Test(timeOut = STARTUP_TIMEOUT)
+ public void testPythonCartridgeAgent() {
+ startCommunicatorThread();
+ Thread startupTestThread = new Thread(new Runnable() {
+ @Override
+ public void run() {
+ while (!eventReceiverInitiated) {
+ sleep(2000);
+ }
+ List<String> outputLines = new ArrayList<String>();
+ while (!outputStream.isClosed()) {
+ List<String> newLines = getNewLines(outputLines, outputStream.toString());
+ if (newLines.size() > 0) {
+ for (String line : newLines) {
+ if (line.contains("Subscribed to 'topology/#'")) {
+ sleep(2000);
+ // Send complete topology event
+ log.info("Publishing complete topology event...");
+ Topology topology = createTestTopology();
+ CompleteTopologyEvent completeTopologyEvent = new CompleteTopologyEvent(topology);
+ publishEvent(completeTopologyEvent);
+ log.info("Complete topology event published");
+
+ // Publish member initialized event
+ log.info("Publishing member initialized event...");
+ MemberInitializedEvent memberInitializedEvent = new MemberInitializedEvent(
+ SERVICE_NAME, CLUSTER_ID, CLUSTER_INSTANCE_ID, MEMBER_ID, NETWORK_PARTITION_ID,
+ PARTITION_ID
+ );
+ publishEvent(memberInitializedEvent);
+ log.info("Member initialized event published");
+ }
+ }
+ }
+ sleep(1000);
+ }
+ }
+ });
+
+ startupTestThread.start();
+
+ while (!instanceStarted || !instanceActivated) {
+ // wait until the instance activated event is received.
+ // this will assert whether instance got activated within timeout period; no need for explicit assertions
+ sleep(2000);
+ }
+ }
+
+
+ /**
+ * Create test topology
+ *
+ * @return
+ */
+ private Topology createTestTopology() {
+ Topology topology = new Topology();
+ Service service = new Service(SERVICE_NAME, ServiceType.SingleTenant);
+ topology.addService(service);
+
+ Cluster cluster = new Cluster(service.getServiceName(), CLUSTER_ID, DEPLOYMENT_POLICY_NAME,
+ AUTOSCALING_POLICY_NAME, APP_ID);
+ service.addCluster(cluster);
+
+ Member member = new Member(service.getServiceName(), cluster.getClusterId(), MEMBER_ID,
+ CLUSTER_INSTANCE_ID, NETWORK_PARTITION_ID, PARTITION_ID, LoadBalancingIPType.Private,
+ System.currentTimeMillis());
+
+ member.setDefaultPrivateIP("10.0.0.1");
+ member.setDefaultPublicIP("20.0.0.1");
+ Properties properties = new Properties();
+ properties.setProperty("prop1", "value1");
+ member.setProperties(properties);
+ member.setStatus(MemberStatus.Created);
+ cluster.addMember(member);
+
+ return topology;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/stratos/blob/64368325/products/python-cartridge-agent/integration/src/test/java/org/apache/stratos/python.cartridge.agent/test/PythonAgentTestManager.java
----------------------------------------------------------------------
diff --git a/products/python-cartridge-agent/integration/src/test/java/org/apache/stratos/python.cartridge.agent/test/PythonAgentTestManager.java b/products/python-cartridge-agent/integration/src/test/java/org/apache/stratos/python.cartridge.agent/test/PythonAgentTestManager.java
new file mode 100644
index 0000000..6ed4bb3
--- /dev/null
+++ b/products/python-cartridge-agent/integration/src/test/java/org/apache/stratos/python.cartridge.agent/test/PythonAgentTestManager.java
@@ -0,0 +1,455 @@
+package org.apache.stratos.python.cartridge.agent.test;/*
+ * 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.
+ */
+
+import org.apache.activemq.broker.BrokerService;
+import org.apache.commons.exec.*;
+import org.apache.commons.io.FileUtils;
+import org.apache.commons.lang.StringUtils;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.stratos.common.threading.StratosThreadPool;
+import org.apache.stratos.messaging.broker.publish.EventPublisher;
+import org.apache.stratos.messaging.broker.publish.EventPublisherPool;
+import org.apache.stratos.messaging.event.Event;
+import org.apache.stratos.messaging.listener.instance.status.InstanceActivatedEventListener;
+import org.apache.stratos.messaging.listener.instance.status.InstanceStartedEventListener;
+import org.apache.stratos.messaging.message.receiver.instance.status.InstanceStatusEventReceiver;
+import org.apache.stratos.messaging.message.receiver.topology.TopologyEventReceiver;
+import org.apache.stratos.messaging.util.MessagingUtil;
+
+import java.io.*;
+import java.net.ServerSocket;
+import java.net.Socket;
+import java.util.*;
+import java.util.concurrent.ExecutorService;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipInputStream;
+
+public class PythonAgentTestManager {
+ protected final Properties integrationProperties = new Properties();
+ private static final Log log = LogFactory.getLog(PythonAgentTestManager.class);
+ protected BrokerService broker = new BrokerService();
+
+ public final long TIMEOUT = 180000;
+ public static final String NEW_LINE = System.getProperty("line.separator");
+ public static final String ACTIVEMQ_AMQP_BIND_ADDRESS = "activemq.amqp.bind.address";
+ public static final String ACTIVEMQ_MQTT_BIND_ADDRESS = "activemq.mqtt.bind.address";
+ public static final String CEP_PORT = "cep.port";
+ public static final String DISTRIBUTION_NAME = "distribution.name";
+ protected final UUID PYTHON_AGENT_DIR_NAME = UUID.randomUUID();
+
+ protected Map<Integer, ServerSocket> serverSocketMap = new HashMap<>();
+ protected Map<String, Executor> executorList = new HashMap<String, Executor>();
+
+ protected int cepPort;
+ protected String amqpBindAddress;
+ protected String mqttBindAddress;
+ protected String distributionName;
+
+ protected boolean eventReceiverInitiated = false;
+ protected TopologyEventReceiver topologyEventReceiver;
+ protected InstanceStatusEventReceiver instanceStatusEventReceiver;
+ protected boolean instanceStarted;
+ protected boolean instanceActivated;
+ protected ByteArrayOutputStreamLocal outputStream;
+
+ /**
+ * Setup method for test method testPythonCartridgeAgent
+ */
+ protected void setup(String resourcePath) {
+ try {
+ startBroker();
+ }
+ catch (Exception e) {
+ log.error("Error while starting MB", e);
+ return;
+ }
+ if (!this.eventReceiverInitiated) {
+ ExecutorService executorService = StratosThreadPool.getExecutorService("TEST_THREAD_POOL", 15);
+ topologyEventReceiver = new TopologyEventReceiver();
+ topologyEventReceiver.setExecutorService(executorService);
+ topologyEventReceiver.execute();
+
+ instanceStatusEventReceiver = new InstanceStatusEventReceiver();
+ instanceStatusEventReceiver.setExecutorService(executorService);
+ instanceStatusEventReceiver.execute();
+
+ this.instanceStarted = false;
+ instanceStatusEventReceiver.addEventListener(new InstanceStartedEventListener() {
+ @Override
+ protected void onEvent(Event event) {
+ log.info("Instance started event received");
+ instanceStarted = true;
+ }
+ });
+
+ this.instanceActivated = false;
+ instanceStatusEventReceiver.addEventListener(new InstanceActivatedEventListener() {
+ @Override
+ protected void onEvent(Event event) {
+ log.info("Instance activated event received");
+ instanceActivated = true;
+ }
+ });
+
+ this.eventReceiverInitiated = true;
+ }
+ // Simulate CEP server socket
+ startServerSocket(cepPort);
+ String agentPath = setupPythonAgent(resourcePath);
+ log.info("Python agent working directory name: " + PYTHON_AGENT_DIR_NAME);
+ log.info("Starting python cartridge agent...");
+ this.outputStream = executeCommand("python " + agentPath + "/agent.py > " +
+ PythonAgentTestManager.class.getResource(File.separator).getPath() + "/../" + PYTHON_AGENT_DIR_NAME +
+ "/cartridge-agent-console.log");
+ }
+
+ protected void tearDown() {
+ tearDown(null);
+ }
+
+ /**
+ * TearDown method for test method testPythonCartridgeAgent
+ */
+ protected void tearDown(String sourcePath) {
+ for (Map.Entry<String, Executor> entry : executorList.entrySet()) {
+ try {
+ String commandText = entry.getKey();
+ Executor executor = entry.getValue();
+ log.info("Terminating process: " + commandText);
+ executor.setExitValue(0);
+ executor.getWatchdog().destroyProcess();
+ }
+ catch (Exception ignore) {
+ }
+ }
+ // wait until everything cleans up to avoid connection errors
+ sleep(1000);
+ for (ServerSocket serverSocket : serverSocketMap.values()) {
+ try {
+ log.info("Stopping socket server: " + serverSocket.getLocalSocketAddress());
+ serverSocket.close();
+ }
+ catch (IOException ignore) {
+ }
+ }
+
+ try {
+ log.info("Deleting source checkout folder...");
+ FileUtils.deleteDirectory(new File(sourcePath));
+ }
+ catch (Exception ignore) {
+ }
+ this.instanceStatusEventReceiver.terminate();
+ this.topologyEventReceiver.terminate();
+
+ this.instanceActivated = false;
+ this.instanceStarted = false;
+ try {
+ broker.stop();
+ }
+ catch (Exception e) {
+ log.error("Error while stopping the broker service", e);
+ }
+ }
+
+ public PythonAgentTestManager() {
+ try {
+ integrationProperties
+ .load(PythonAgentTestManager.class.getResourceAsStream("/integration-test.properties"));
+ distributionName = integrationProperties.getProperty(DISTRIBUTION_NAME);
+ amqpBindAddress = integrationProperties.getProperty(ACTIVEMQ_AMQP_BIND_ADDRESS);
+ mqttBindAddress = integrationProperties.getProperty(ACTIVEMQ_MQTT_BIND_ADDRESS);
+ cepPort = Integer.parseInt(integrationProperties.getProperty(CEP_PORT));
+ log.info("PCA integration properties: " + integrationProperties.toString());
+ }
+ catch (IOException e) {
+ log.error("Error loading integration-test.properties file from classpath. Please make sure that file " +
+ "exists in classpath.", e);
+ }
+ }
+
+ protected void startBroker() throws Exception {
+ broker.addConnector(amqpBindAddress);
+ broker.addConnector(mqttBindAddress);
+ broker.setBrokerName("testBroker");
+ broker.setDataDirectory(
+ PythonAgentTestManager.class.getResource("/").getPath() + "/../" + PYTHON_AGENT_DIR_NAME +
+ "/activemq-data");
+ broker.start();
+ log.info("Broker service started!");
+ }
+
+ protected void startCommunicatorThread() {
+ Thread communicatorThread = new Thread(new Runnable() {
+ @Override
+ public void run() {
+ List<String> outputLines = new ArrayList<String>();
+ while (!outputStream.isClosed()) {
+ List<String> newLines = getNewLines(outputLines, outputStream.toString());
+ if (newLines.size() > 0) {
+ for (String line : newLines) {
+ if (line.contains("Exception in thread") || line.contains("ERROR")) {
+ try {
+ throw new RuntimeException(line);
+ }
+ catch (Exception e) {
+ log.error("ERROR found in PCA log", e);
+ }
+ }
+ log.info(line);
+ }
+ }
+ sleep(100);
+ }
+ }
+ });
+ communicatorThread.start();
+ }
+
+ /**
+ * Start server socket
+ *
+ * @param port
+ */
+ protected void startServerSocket(final int port) {
+ Thread socketThread = new Thread(new Runnable() {
+ @Override
+ public void run() {
+ while (true) { // do this infinitely until test is complete
+ try {
+ ServerSocket serverSocket = new ServerSocket(port);
+ serverSocketMap.put(port, serverSocket);
+ log.info("Server socket started on port: " + port);
+ Socket socket = serverSocket.accept();
+ log.info("Client connected to [port] " + port);
+
+ InputStream is = socket.getInputStream();
+ byte[] buffer = new byte[1024];
+ int read;
+ while (true) {
+ if (socket.isClosed()) {
+ log.info("Socket for [port] " + port + " has been closed.");
+ break;
+ }
+ if ((read = is.read(buffer)) != -1) {
+ String output = new String(buffer, 0, read);
+ log.info("Message received for [port] " + port + ", [message] " + output);
+ }
+ }
+ }
+ catch (IOException e) {
+ String message = "Could not start server socket: [port] " + port;
+ log.error(message, e);
+ throw new RuntimeException(message, e);
+ }
+ }
+ }
+ });
+ socketThread.start();
+ }
+
+
+ protected static String getResourcesPath(String resourcesPath) {
+ return PythonAgentTestManager.class.getResource("/").getPath() + "/../../src/test/resources" + resourcesPath;
+ }
+
+ /**
+ * Copy python agent distribution to a new folder, extract it and copy sample configuration files
+ *
+ * @return
+ */
+ protected String setupPythonAgent(String resourcesPath) {
+ try {
+ log.info("Setting up python cartridge agent...");
+
+
+ String srcAgentPath = PythonAgentTestManager.class.getResource("/").getPath() +
+ "/../../../distribution/target/" + distributionName + ".zip";
+ String unzipDestPath =
+ PythonAgentTestManager.class.getResource("/").getPath() + "/../" + PYTHON_AGENT_DIR_NAME + "/";
+ //FileUtils.copyFile(new File(srcAgentPath), new File(destAgentPath));
+ unzip(srcAgentPath, unzipDestPath);
+ String destAgentPath = PythonAgentTestManager.class.getResource("/").getPath() + "/../" +
+ PYTHON_AGENT_DIR_NAME + "/" + distributionName;
+
+ String srcAgentConfPath = getResourcesPath(resourcesPath) + "/agent.conf";
+ String destAgentConfPath = destAgentPath + "/agent.conf";
+ FileUtils.copyFile(new File(srcAgentConfPath), new File(destAgentConfPath));
+
+ String srcLoggingIniPath = getResourcesPath(resourcesPath) + "/logging.ini";
+ String destLoggingIniPath = destAgentPath + "/logging.ini";
+ FileUtils.copyFile(new File(srcLoggingIniPath), new File(destLoggingIniPath));
+
+ String srcPayloadPath = getResourcesPath(resourcesPath) + "/payload";
+ String destPayloadPath = destAgentPath + "/payload";
+ FileUtils.copyDirectory(new File(srcPayloadPath), new File(destPayloadPath));
+
+ log.info("Changing extension scripts permissions");
+ File extensionsPath = new File(destAgentPath + "/extensions/bash");
+ File[] extensions = extensionsPath.listFiles();
+ for (File extension : extensions) {
+ extension.setExecutable(true);
+ }
+
+ log.info("Python cartridge agent setup completed");
+
+ return destAgentPath;
+ }
+ catch (Exception e) {
+ String message = "Could not copy cartridge agent distribution";
+ log.error(message, e);
+ throw new RuntimeException(message, e);
+ }
+ }
+
+ private void unzip(String zipFilePath, String destDirectory) throws IOException {
+ File destDir = new File(destDirectory);
+ if (!destDir.exists()) {
+ destDir.mkdir();
+ }
+ ZipInputStream zipIn = new ZipInputStream(new FileInputStream(zipFilePath));
+ ZipEntry entry = zipIn.getNextEntry();
+ // iterates over entries in the zip file
+ while (entry != null) {
+ String filePath = destDirectory + File.separator + entry.getName();
+ if (!entry.isDirectory()) {
+ // if the entry is a file, extracts it
+ extractFile(zipIn, filePath);
+ } else {
+ // if the entry is a directory, make the directory
+ File dir = new File(filePath);
+ dir.mkdir();
+ }
+ zipIn.closeEntry();
+ entry = zipIn.getNextEntry();
+ }
+ zipIn.close();
+ }
+
+ private void extractFile(ZipInputStream zipIn, String filePath) throws IOException {
+ BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(filePath));
+ byte[] bytesIn = new byte[4096];
+ int read = 0;
+ while ((read = zipIn.read(bytesIn)) != -1) {
+ bos.write(bytesIn, 0, read);
+ }
+ bos.close();
+ }
+
+ /**
+ * Execute shell command
+ *
+ * @param commandText
+ */
+ protected ByteArrayOutputStreamLocal executeCommand(final String commandText) {
+ final ByteArrayOutputStreamLocal outputStream = new ByteArrayOutputStreamLocal();
+ try {
+ CommandLine commandline = CommandLine.parse(commandText);
+ DefaultExecutor exec = new DefaultExecutor();
+ PumpStreamHandler streamHandler = new PumpStreamHandler(outputStream);
+ exec.setWorkingDirectory(new File(
+ PythonAgentTestManager.class.getResource("/").getPath() + "/../" + PYTHON_AGENT_DIR_NAME));
+ exec.setStreamHandler(streamHandler);
+ ExecuteWatchdog watchdog = new ExecuteWatchdog(TIMEOUT);
+ exec.setWatchdog(watchdog);
+ exec.execute(commandline, new ExecuteResultHandler() {
+ @Override
+ public void onProcessComplete(int i) {
+ log.info(commandText + " process completed");
+ }
+
+ @Override
+ public void onProcessFailed(ExecuteException e) {
+ log.error(commandText + " process failed", e);
+ }
+ });
+ executorList.put(commandText, exec);
+ return outputStream;
+ }
+ catch (Exception e) {
+ log.error(outputStream.toString(), e);
+ throw new RuntimeException(e);
+ }
+ }
+
+ /**
+ * Sleep current thread
+ *
+ * @param time
+ */
+ protected void sleep(long time) {
+ try {
+ Thread.sleep(time);
+ }
+ catch (InterruptedException ignore) {
+ }
+ }
+
+ /**
+ * Return new lines found in the output
+ *
+ * @param currentOutputLines current output lines
+ * @param output output
+ * @return
+ */
+ protected List<String> getNewLines(List<String> currentOutputLines, String output) {
+ List<String> newLines = new ArrayList<String>();
+
+ if (StringUtils.isNotBlank(output)) {
+ String[] lines = output.split(NEW_LINE);
+ for (String line : lines) {
+ if (!currentOutputLines.contains(line)) {
+ currentOutputLines.add(line);
+ newLines.add(line);
+ }
+ }
+ }
+ return newLines;
+ }
+
+ /**
+ * Publish messaging event
+ *
+ * @param event
+ */
+ protected void publishEvent(Event event) {
+ String topicName = MessagingUtil.getMessageTopicName(event);
+ EventPublisher eventPublisher = EventPublisherPool.getPublisher(topicName);
+ eventPublisher.publish(event);
+ }
+
+
+ /**
+ * Implements ByteArrayOutputStream.isClosed() method
+ */
+ protected class ByteArrayOutputStreamLocal extends org.apache.commons.io.output.ByteArrayOutputStream {
+ private boolean closed;
+
+ @Override
+ public void close() throws IOException {
+ super.close();
+ closed = true;
+ }
+
+ public boolean isClosed() {
+ return closed;
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/stratos/blob/64368325/products/python-cartridge-agent/integration/src/test/java/org/apache/stratos/python.cartridge.agent/test/PythonTestManager.java
----------------------------------------------------------------------
diff --git a/products/python-cartridge-agent/integration/src/test/java/org/apache/stratos/python.cartridge.agent/test/PythonTestManager.java b/products/python-cartridge-agent/integration/src/test/java/org/apache/stratos/python.cartridge.agent/test/PythonTestManager.java
deleted file mode 100644
index 68cca0c..0000000
--- a/products/python-cartridge-agent/integration/src/test/java/org/apache/stratos/python.cartridge.agent/test/PythonTestManager.java
+++ /dev/null
@@ -1,411 +0,0 @@
-package org.apache.stratos.python.cartridge.agent.test;/*
- * 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.
- */
-
-import org.apache.activemq.broker.BrokerService;
-import org.apache.commons.exec.*;
-import org.apache.commons.io.FileUtils;
-import org.apache.commons.lang.StringUtils;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.common.threading.StratosThreadPool;
-import org.apache.stratos.messaging.broker.publish.EventPublisher;
-import org.apache.stratos.messaging.broker.publish.EventPublisherPool;
-import org.apache.stratos.messaging.event.Event;
-import org.apache.stratos.messaging.listener.instance.status.InstanceActivatedEventListener;
-import org.apache.stratos.messaging.listener.instance.status.InstanceStartedEventListener;
-import org.apache.stratos.messaging.message.receiver.instance.status.InstanceStatusEventReceiver;
-import org.apache.stratos.messaging.message.receiver.topology.TopologyEventReceiver;
-import org.apache.stratos.messaging.util.MessagingUtil;
-
-import java.io.*;
-import java.net.ServerSocket;
-import java.util.*;
-import java.util.concurrent.ExecutorService;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipInputStream;
-
-public class PythonTestManager {
- protected final Properties integrationProperties = new Properties();
- private static final Log log = LogFactory.getLog(PythonTestManager.class);
- protected BrokerService broker = new BrokerService();
-
- public final long TIMEOUT = 180000;
- public static final String NEW_LINE = System.getProperty("line.separator");
- public static final String ACTIVEMQ_AMQP_BIND_ADDRESS = "activemq.amqp.bind.address";
- public static final String ACTIVEMQ_MQTT_BIND_ADDRESS = "activemq.mqtt.bind.address";
- public static final String CEP_PORT = "cep.port";
- public static final String DISTRIBUTION_NAME = "distribution.name";
- protected final UUID PYTHON_AGENT_DIR_NAME = UUID.randomUUID();
-
- protected List<ServerSocket> serverSocketList = new ArrayList<ServerSocket>();
- protected Map<String, Executor> executorList = new HashMap<String, Executor>();
-
- protected int cepPort;
- protected String amqpBindAddress;
- protected String mqttBindAddress;
- protected String distributionName;
-
- protected boolean eventReceiverInitiated = false;
- protected TopologyEventReceiver topologyEventReceiver;
- protected InstanceStatusEventReceiver instanceStatusEventReceiver;
- protected boolean instanceStarted;
- protected boolean instanceActivated;
- protected ByteArrayOutputStreamLocal outputStream;
-
- /**
- * Setup method for test method testPythonCartridgeAgent
- */
- protected void setup(String resourcePath) {
- try {
- startBroker();
- }
- catch (Exception e) {
- log.error("Error while starting MB", e);
- return;
- }
- if (!this.eventReceiverInitiated) {
- ExecutorService executorService = StratosThreadPool.getExecutorService("TEST_THREAD_POOL", 15);
- topologyEventReceiver = new TopologyEventReceiver();
- topologyEventReceiver.setExecutorService(executorService);
- topologyEventReceiver.execute();
-
- instanceStatusEventReceiver = new InstanceStatusEventReceiver();
- instanceStatusEventReceiver.setExecutorService(executorService);
- instanceStatusEventReceiver.execute();
-
- this.instanceStarted = false;
- instanceStatusEventReceiver.addEventListener(new InstanceStartedEventListener() {
- @Override
- protected void onEvent(Event event) {
- log.info("Instance started event received");
- instanceStarted = true;
- }
- });
-
- this.instanceActivated = false;
- instanceStatusEventReceiver.addEventListener(new InstanceActivatedEventListener() {
- @Override
- protected void onEvent(Event event) {
- log.info("Instance activated event received");
- instanceActivated = true;
- }
- });
-
- this.eventReceiverInitiated = true;
- }
- // Simulate CEP server socket
- startServerSocket(cepPort);
- String agentPath = setupPythonAgent(resourcePath);
- log.info("Python agent working directory name: " + PYTHON_AGENT_DIR_NAME);
- log.info("Starting python cartridge agent...");
- this.outputStream = executeCommand("python " + agentPath + "/agent.py > " +
- PythonTestManager.class.getResource(File.separator).getPath() + "/../" + PYTHON_AGENT_DIR_NAME +
- "/cartridge-agent-console.log");
- }
-
- protected void tearDown() {
- tearDown(null);
- }
-
- /**
- * TearDown method for test method testPythonCartridgeAgent
- */
- protected void tearDown(String sourcePath) {
- for (Map.Entry<String, Executor> entry : executorList.entrySet()) {
- try {
- String commandText = entry.getKey();
- Executor executor = entry.getValue();
- log.info("Terminating process: " + commandText);
- executor.setExitValue(0);
- executor.getWatchdog().destroyProcess();
- }
- catch (Exception ignore) {
- }
- }
- for (ServerSocket serverSocket : serverSocketList) {
- try {
- log.info("Stopping socket server: " + serverSocket.getLocalSocketAddress());
- serverSocket.close();
- }
- catch (IOException ignore) {
- }
- }
-
- try {
- log.info("Deleting source checkout folder...");
- FileUtils.deleteDirectory(new File(sourcePath));
- }
- catch (Exception ignore) {
- }
-
- this.instanceStatusEventReceiver.terminate();
- this.topologyEventReceiver.terminate();
-
- this.instanceActivated = false;
- this.instanceStarted = false;
- // wait until everything cleans up to avoid connection errors
- sleep(1000);
- try {
- broker.stop();
- }
- catch (Exception e) {
- log.error("Error while stopping the broker service", e);
- }
- }
-
- public PythonTestManager() {
- try {
- integrationProperties
- .load(PythonTestManager.class.getResourceAsStream("/integration-test.properties"));
- distributionName = integrationProperties.getProperty(DISTRIBUTION_NAME);
- amqpBindAddress = integrationProperties.getProperty(ACTIVEMQ_AMQP_BIND_ADDRESS);
- mqttBindAddress = integrationProperties.getProperty(ACTIVEMQ_MQTT_BIND_ADDRESS);
- cepPort = Integer.parseInt(integrationProperties.getProperty(CEP_PORT));
- log.info("PCA integration properties: " + integrationProperties.toString());
- }
- catch (IOException e) {
- log.error("Error loading integration-test.properties file from classpath. Please make sure that file " +
- "exists in classpath.", e);
- }
- }
-
- protected void startBroker() throws Exception {
- broker.addConnector(amqpBindAddress);
- broker.addConnector(mqttBindAddress);
- broker.setBrokerName("testBroker");
- broker.setDataDirectory(
- PythonTestManager.class.getResource("/").getPath() + "/../" + PYTHON_AGENT_DIR_NAME +
- "/activemq-data");
- broker.start();
- log.info("Broker service started!");
- }
-
- /**
- * Start server socket
- *
- * @param port
- */
- protected void startServerSocket(final int port) {
- Thread socketThread = new Thread(new Runnable() {
- @Override
- public void run() {
- try {
- ServerSocket serverSocket = new ServerSocket(port);
- serverSocketList.add(serverSocket);
- log.info("Server socket started on port: " + port);
- serverSocket.accept();
- }
- catch (IOException e) {
- String message = "Could not start server socket: [port] " + port;
- log.error(message, e);
- throw new RuntimeException(message, e);
- }
- }
- });
- socketThread.start();
- }
-
-
- protected static String getResourcesPath(String resourcesPath) {
- return PythonTestManager.class.getResource("/").getPath() + "/../../src/test/resources" + resourcesPath;
- }
-
- /**
- * Copy python agent distribution to a new folder, extract it and copy sample configuration files
- *
- * @return
- */
- protected String setupPythonAgent(String resourcesPath) {
- try {
- log.info("Setting up python cartridge agent...");
-
-
- String srcAgentPath = PythonTestManager.class.getResource("/").getPath() +
- "/../../../distribution/target/" + distributionName + ".zip";
- String unzipDestPath =
- PythonTestManager.class.getResource("/").getPath() + "/../" + PYTHON_AGENT_DIR_NAME + "/";
- //FileUtils.copyFile(new File(srcAgentPath), new File(destAgentPath));
- unzip(srcAgentPath, unzipDestPath);
- String destAgentPath = PythonTestManager.class.getResource("/").getPath() + "/../" +
- PYTHON_AGENT_DIR_NAME + "/" + distributionName;
-
- String srcAgentConfPath = getResourcesPath(resourcesPath) + "/agent.conf";
- String destAgentConfPath = destAgentPath + "/agent.conf";
- FileUtils.copyFile(new File(srcAgentConfPath), new File(destAgentConfPath));
-
- String srcLoggingIniPath = getResourcesPath(resourcesPath) + "/logging.ini";
- String destLoggingIniPath = destAgentPath + "/logging.ini";
- FileUtils.copyFile(new File(srcLoggingIniPath), new File(destLoggingIniPath));
-
- String srcPayloadPath = getResourcesPath(resourcesPath) + "/payload";
- String destPayloadPath = destAgentPath + "/payload";
- FileUtils.copyDirectory(new File(srcPayloadPath), new File(destPayloadPath));
-
- log.info("Changing extension scripts permissions");
- File extensionsPath = new File(destAgentPath + "/extensions/bash");
- File[] extensions = extensionsPath.listFiles();
- for (File extension : extensions) {
- extension.setExecutable(true);
- }
-
- log.info("Python cartridge agent setup completed");
-
- return destAgentPath;
- }
- catch (Exception e) {
- String message = "Could not copy cartridge agent distribution";
- log.error(message, e);
- throw new RuntimeException(message, e);
- }
- }
-
- private void unzip(String zipFilePath, String destDirectory) throws IOException {
- File destDir = new File(destDirectory);
- if (!destDir.exists()) {
- destDir.mkdir();
- }
- ZipInputStream zipIn = new ZipInputStream(new FileInputStream(zipFilePath));
- ZipEntry entry = zipIn.getNextEntry();
- // iterates over entries in the zip file
- while (entry != null) {
- String filePath = destDirectory + File.separator + entry.getName();
- if (!entry.isDirectory()) {
- // if the entry is a file, extracts it
- extractFile(zipIn, filePath);
- } else {
- // if the entry is a directory, make the directory
- File dir = new File(filePath);
- dir.mkdir();
- }
- zipIn.closeEntry();
- entry = zipIn.getNextEntry();
- }
- zipIn.close();
- }
-
- private void extractFile(ZipInputStream zipIn, String filePath) throws IOException {
- BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(filePath));
- byte[] bytesIn = new byte[4096];
- int read = 0;
- while ((read = zipIn.read(bytesIn)) != -1) {
- bos.write(bytesIn, 0, read);
- }
- bos.close();
- }
-
- /**
- * Execute shell command
- *
- * @param commandText
- */
- protected ByteArrayOutputStreamLocal executeCommand(final String commandText) {
- final ByteArrayOutputStreamLocal outputStream = new ByteArrayOutputStreamLocal();
- try {
- CommandLine commandline = CommandLine.parse(commandText);
- DefaultExecutor exec = new DefaultExecutor();
- PumpStreamHandler streamHandler = new PumpStreamHandler(outputStream);
- exec.setWorkingDirectory(new File(
- PythonTestManager.class.getResource("/").getPath() + "/../" + PYTHON_AGENT_DIR_NAME));
- exec.setStreamHandler(streamHandler);
- ExecuteWatchdog watchdog = new ExecuteWatchdog(TIMEOUT);
- exec.setWatchdog(watchdog);
- exec.execute(commandline, new ExecuteResultHandler() {
- @Override
- public void onProcessComplete(int i) {
- log.info(commandText + " process completed");
- }
-
- @Override
- public void onProcessFailed(ExecuteException e) {
- log.error(commandText + " process failed", e);
- }
- });
- executorList.put(commandText, exec);
- return outputStream;
- }
- catch (Exception e) {
- log.error(outputStream.toString(), e);
- throw new RuntimeException(e);
- }
- }
-
- /**
- * Sleep current thread
- *
- * @param time
- */
- protected void sleep(long time) {
- try {
- Thread.sleep(time);
- }
- catch (InterruptedException ignore) {
- }
- }
-
- /**
- * Return new lines found in the output
- *
- * @param currentOutputLines current output lines
- * @param output output
- * @return
- */
- protected List<String> getNewLines(List<String> currentOutputLines, String output) {
- List<String> newLines = new ArrayList<String>();
-
- if (StringUtils.isNotBlank(output)) {
- String[] lines = output.split(NEW_LINE);
- for (String line : lines) {
- if (!currentOutputLines.contains(line)) {
- currentOutputLines.add(line);
- newLines.add(line);
- }
- }
- }
- return newLines;
- }
-
- /**
- * Publish messaging event
- *
- * @param event
- */
- protected void publishEvent(Event event) {
- String topicName = MessagingUtil.getMessageTopicName(event);
- EventPublisher eventPublisher = EventPublisherPool.getPublisher(topicName);
- eventPublisher.publish(event);
- }
-
-
- /**
- * Implements ByteArrayOutputStream.isClosed() method
- */
- protected class ByteArrayOutputStreamLocal extends org.apache.commons.io.output.ByteArrayOutputStream {
- private boolean closed;
-
- @Override
- public void close() throws IOException {
- super.close();
- closed = true;
- }
-
- public boolean isClosed() {
- return closed;
- }
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/stratos/blob/64368325/products/python-cartridge-agent/integration/src/test/java/org/apache/stratos/python.cartridge.agent/test/StartUpTest.java
----------------------------------------------------------------------
diff --git a/products/python-cartridge-agent/integration/src/test/java/org/apache/stratos/python.cartridge.agent/test/StartUpTest.java b/products/python-cartridge-agent/integration/src/test/java/org/apache/stratos/python.cartridge.agent/test/StartUpTest.java
deleted file mode 100755
index 36a8cd5..0000000
--- a/products/python-cartridge-agent/integration/src/test/java/org/apache/stratos/python.cartridge.agent/test/StartUpTest.java
+++ /dev/null
@@ -1,171 +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.python.cartridge.agent.test;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.common.domain.LoadBalancingIPType;
-import org.apache.stratos.messaging.domain.topology.*;
-import org.apache.stratos.messaging.event.topology.CompleteTopologyEvent;
-import org.apache.stratos.messaging.event.topology.MemberInitializedEvent;
-import org.testng.annotations.AfterSuite;
-import org.testng.annotations.BeforeSuite;
-import org.testng.annotations.Test;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Properties;
-
-import static junit.framework.Assert.assertTrue;
-
-public class StartUpTest extends PythonTestManager {
- private static final Log log = LogFactory.getLog(StartUpTest.class);
- private static final int STARTUP_TIMEOUT = 30000;
- private static final String RESOURCES_PATH = "/suite-1";
- private static final String CLUSTER_ID = "php.php.domain";
- private static final String DEPLOYMENT_POLICY_NAME = "deployment-policy-1";
- private static final String AUTOSCALING_POLICY_NAME = "autoscaling-policy-1";
- private static final String APP_ID = "application-1";
- private static final String MEMBER_ID = "php.member-1";
- private static final String CLUSTER_INSTANCE_ID = "cluster-1-instance-1";
- private static final String NETWORK_PARTITION_ID = "network-partition-1";
- private static final String PARTITION_ID = "partition-1";
- private static final String TENANT_ID = "-1234";
- private static final String SERVICE_NAME = "php";
- private static final String SOURCE_PATH = "/tmp/stratos-pca-startup-test-app-path/";
-
-
- @BeforeSuite
- public void setupStartUpTest() {
- // Set jndi.properties.dir system property for initializing event publishers and receivers
- System.setProperty("jndi.properties.dir", getResourcesPath(RESOURCES_PATH));
-
- // start Python agent with configurations provided in resource path
- setup(RESOURCES_PATH);
- }
-
-
- /**
- * TearDown method for test method testPythonCartridgeAgent
- */
- @AfterSuite
- public void tearDownStartUpTest() {
- tearDown();
- }
-
- @Test(timeOut = STARTUP_TIMEOUT)
- public void testPythonCartridgeAgent() {
- Thread communicatorThread = new Thread(new Runnable() {
- @Override
- public void run() {
- while (!eventReceiverInitiated) {
- sleep(2000);
- }
- List<String> outputLines = new ArrayList<String>();
- while (!outputStream.isClosed()) {
- List<String> newLines = getNewLines(outputLines, outputStream.toString());
- if (newLines.size() > 0) {
- for (String line : newLines) {
- if (line.contains("Exception in thread") || line.contains("ERROR")) {
- try {
- throw new RuntimeException(line);
- }
- catch (Exception e) {
- log.error("ERROR found in PCA log", e);
- }
- }
- if (line.contains("Subscribed to 'topology/#'")) {
- sleep(2000);
- // Send complete topology event
- log.info("Publishing complete topology event...");
- Topology topology = createTestTopology();
- CompleteTopologyEvent completeTopologyEvent = new CompleteTopologyEvent(topology);
- publishEvent(completeTopologyEvent);
- log.info("Complete topology event published");
-
- // Publish member initialized event
- log.info("Publishing member initialized event...");
- MemberInitializedEvent memberInitializedEvent = new MemberInitializedEvent(
- SERVICE_NAME, CLUSTER_ID, CLUSTER_INSTANCE_ID, MEMBER_ID, NETWORK_PARTITION_ID,
- PARTITION_ID
- );
- publishEvent(memberInitializedEvent);
- log.info("Member initialized event published");
-
- // Simulate server socket
- startServerSocket(8080);
- }
- /*
- if (line.contains("Artifact repository found")) {
- // Send artifact updated event
- ArrayList<ArtifactUpdatedEvent> list = getArtifactUpdatedEventsAsParams();
- for (ArtifactUpdatedEvent artifactUpdatedEvent : list) {
- publishEvent(artifactUpdatedEvent);
- }
- }*/
- log.info(line);
- }
- }
- sleep(100);
- }
- }
- });
-
- communicatorThread.start();
-
- while (!instanceActivated) {
- // wait until the instance activated event is received.
- sleep(2000);
- }
-
- assertTrue("Instance started event was not received", instanceStarted);
- assertTrue("Instance activated event was not received", instanceActivated);
- }
-
-
- /**
- * Create test topology
- *
- * @return
- */
- private Topology createTestTopology() {
- Topology topology = new Topology();
- Service service = new Service(SERVICE_NAME, ServiceType.SingleTenant);
- topology.addService(service);
-
- Cluster cluster = new Cluster(service.getServiceName(), CLUSTER_ID, DEPLOYMENT_POLICY_NAME,
- AUTOSCALING_POLICY_NAME, APP_ID);
- service.addCluster(cluster);
-
- Member member = new Member(service.getServiceName(), cluster.getClusterId(), MEMBER_ID,
- CLUSTER_INSTANCE_ID, NETWORK_PARTITION_ID, PARTITION_ID, LoadBalancingIPType.Private,
- System.currentTimeMillis());
-
- member.setDefaultPrivateIP("10.0.0.1");
- member.setDefaultPublicIP("20.0.0.1");
- Properties properties = new Properties();
- properties.setProperty("prop1", "value1");
- member.setProperties(properties);
- member.setStatus(MemberStatus.Created);
- cluster.addMember(member);
-
- return topology;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/stratos/blob/64368325/products/python-cartridge-agent/integration/src/test/resources/pca-testing1.xml
----------------------------------------------------------------------
diff --git a/products/python-cartridge-agent/integration/src/test/resources/pca-testing1.xml b/products/python-cartridge-agent/integration/src/test/resources/pca-testing1.xml
index 35e60e3..c102914 100755
--- a/products/python-cartridge-agent/integration/src/test/resources/pca-testing1.xml
+++ b/products/python-cartridge-agent/integration/src/test/resources/pca-testing1.xml
@@ -23,7 +23,7 @@
<suite name="PythonCartridgeAgentIntegrationSuite1">
<test name="PCATest">
<classes>
- <class name="org.apache.stratos.python.cartridge.agent.test.StartUpTest"/>
+ <class name="org.apache.stratos.python.cartridge.agent.test.AgentStartupTest"/>
</classes>
</test>
</suite>
http://git-wip-us.apache.org/repos/asf/stratos/blob/64368325/products/python-cartridge-agent/integration/src/test/resources/pca-testing3.xml
----------------------------------------------------------------------
diff --git a/products/python-cartridge-agent/integration/src/test/resources/pca-testing3.xml b/products/python-cartridge-agent/integration/src/test/resources/pca-testing3.xml
new file mode 100755
index 0000000..f20cf20
--- /dev/null
+++ b/products/python-cartridge-agent/integration/src/test/resources/pca-testing3.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ 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.
+ -->
+
+<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
+
+<suite name="PythonCartridgeAgentIntegrationSuite3">
+ <test name="PCATest">
+ <classes>
+ <class name="org.apache.stratos.python.cartridge.agent.test.ADCMTAppTest"/>
+ </classes>
+ </test>
+</suite>
http://git-wip-us.apache.org/repos/asf/stratos/blob/64368325/products/python-cartridge-agent/integration/src/test/resources/suite-1/agent.conf
----------------------------------------------------------------------
diff --git a/products/python-cartridge-agent/integration/src/test/resources/suite-1/agent.conf b/products/python-cartridge-agent/integration/src/test/resources/suite-1/agent.conf
index dc34a1f..eae5003 100755
--- a/products/python-cartridge-agent/integration/src/test/resources/suite-1/agent.conf
+++ b/products/python-cartridge-agent/integration/src/test/resources/suite-1/agent.conf
@@ -39,8 +39,7 @@ monitoring.server.port =7612
monitoring.server.secure.port =7712
monitoring.server.admin.username =admin
monitoring.server.admin.password =admin
-#log.file.paths =/home/chamilad/dev/wso2esb-4.8.1/repository/logs/wso2carbon.log
log.file.paths =/tmp/agent.screen-startup-test.log
metadata.service.url =https://localhost:9443
super.tenant.repository.path =/repository/deployment/server/
-tenant.repository.path =/repository/tenants/
\ No newline at end of file
+tenant.repository.path =/repository/tenants/
http://git-wip-us.apache.org/repos/asf/stratos/blob/64368325/products/python-cartridge-agent/integration/src/test/resources/suite-2/agent.conf
----------------------------------------------------------------------
diff --git a/products/python-cartridge-agent/integration/src/test/resources/suite-2/agent.conf b/products/python-cartridge-agent/integration/src/test/resources/suite-2/agent.conf
index f05a00e..fd3e423 100755
--- a/products/python-cartridge-agent/integration/src/test/resources/suite-2/agent.conf
+++ b/products/python-cartridge-agent/integration/src/test/resources/suite-2/agent.conf
@@ -39,8 +39,7 @@ monitoring.server.port =7612
monitoring.server.secure.port =7712
monitoring.server.admin.username =admin
monitoring.server.admin.password =admin
-#log.file.paths =/home/chamilad/dev/wso2esb-4.8.1/repository/logs/wso2carbon.log
log.file.paths =/tmp/agent.screen-adc-test.log
metadata.service.url =https://localhost:9443
super.tenant.repository.path =/repository/deployment/server/
-tenant.repository.path =/repository/tenants/
\ No newline at end of file
+tenant.repository.path =/repository/tenants/
http://git-wip-us.apache.org/repos/asf/stratos/blob/64368325/products/python-cartridge-agent/integration/src/test/resources/suite-3/agent.conf
----------------------------------------------------------------------
diff --git a/products/python-cartridge-agent/integration/src/test/resources/suite-3/agent.conf b/products/python-cartridge-agent/integration/src/test/resources/suite-3/agent.conf
new file mode 100755
index 0000000..0ee1dce
--- /dev/null
+++ b/products/python-cartridge-agent/integration/src/test/resources/suite-3/agent.conf
@@ -0,0 +1,45 @@
+# 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.
+
+[agent]
+mb.ip =localhost
+mb.port =1885
+listen.address =localhost
+thrift.receiver.ip =localhost
+thrift.receiver.port =7712
+thrift.server.admin.username =admin
+thrift.server.admin.password =admin
+cep.stats.publisher.enabled =true
+lb.private.ip =
+lb.public.ip =
+enable.artifact.update =true
+auto.commit =true
+auto.checkout =true
+artifact.update.interval =15
+artifact.clone.retries =5
+artifact.clone.interval =10
+port.check.timeout =600000
+enable.data.publisher =false
+monitoring.server.ip =localhost
+monitoring.server.port =7612
+monitoring.server.secure.port =7712
+monitoring.server.admin.username =admin
+monitoring.server.admin.password =admin
+log.file.paths =/tmp/agent.screen-adc-mt-test.log
+metadata.service.url =https://localhost:9443
+super.tenant.repository.path =/repository/deployment/server/
+tenant.repository.path =/repository/tenants/
http://git-wip-us.apache.org/repos/asf/stratos/blob/64368325/products/python-cartridge-agent/integration/src/test/resources/suite-3/jndi.properties
----------------------------------------------------------------------
diff --git a/products/python-cartridge-agent/integration/src/test/resources/suite-3/jndi.properties b/products/python-cartridge-agent/integration/src/test/resources/suite-3/jndi.properties
new file mode 100755
index 0000000..beefe3c
--- /dev/null
+++ b/products/python-cartridge-agent/integration/src/test/resources/suite-3/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:61617
+java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
http://git-wip-us.apache.org/repos/asf/stratos/blob/64368325/products/python-cartridge-agent/integration/src/test/resources/suite-3/logging.ini
----------------------------------------------------------------------
diff --git a/products/python-cartridge-agent/integration/src/test/resources/suite-3/logging.ini b/products/python-cartridge-agent/integration/src/test/resources/suite-3/logging.ini
new file mode 100755
index 0000000..15cad9b
--- /dev/null
+++ b/products/python-cartridge-agent/integration/src/test/resources/suite-3/logging.ini
@@ -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.
+
+
+[formatters]
+keys=default
+
+[formatter_default]
+format=[%(asctime)s] %(levelname)s {%(filename)s:%(funcName)s} - %(message)s
+class=logging.Formatter
+
+[handlers]
+keys=console, error_file, log_file
+
+[handler_console]
+class=logging.StreamHandler
+formatter=default
+args=tuple()
+
+[handler_log_file]
+class=logging.FileHandler
+level=DEBUG
+formatter=default
+args=("agent.log", "w")
+
+[handler_error_file]
+class=logging.FileHandler
+level=ERROR
+formatter=default
+args=("error.log", "w")
+
+[loggers]
+keys=root
+
+[logger_root]
+level=DEBUG
+formatter=default
+handlers=console,error_file,log_file
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/stratos/blob/64368325/products/python-cartridge-agent/integration/src/test/resources/suite-3/payload/launch-params
----------------------------------------------------------------------
diff --git a/products/python-cartridge-agent/integration/src/test/resources/suite-3/payload/launch-params b/products/python-cartridge-agent/integration/src/test/resources/suite-3/payload/launch-params
new file mode 100755
index 0000000..ba9387b
--- /dev/null
+++ b/products/python-cartridge-agent/integration/src/test/resources/suite-3/payload/launch-params
@@ -0,0 +1,2 @@
+APPLICATION_ID=application-3,SERVICE_NAME=tomcat-mt,HOST_NAME=tomcat.stratos.org,MULTITENANT=true,TENANT_ID=-1234,
+TENANT_RANGE=*,CARTRIDGE_ALIAS=tomcat,CLUSTER_ID=tomcat.domain,CLUSTER_INSTANCE_ID=cluster-1-instance-1,CARTRIDGE_KEY=PUjpXCLujDhYr5A6,DEPLOYMENT=default,REPO_URL=https://github.com/imesh/stratos-php-applications.git,PORTS=8080,PUPPET_IP=127.0.0.1,PUPPET_HOSTNAME=puppet.apache.stratos.org,PUPPET_ENV=false,MEMBER_ID=tomcat.member-1,LB_CLUSTER_ID=null,NETWORK_PARTITION_ID=network-p1,PARTITION_ID=p1,APPLICATION_PATH=/tmp/pca-test-suite-3,MIN_COUNT=1,INTERNAL=false,CLUSTERING_PRIMARY_KEY=A,LOG_FILE_PATHS=/tmp/temp.log,PERSISTENCE_MAPPING=null
[2/3] stratos git commit: Fixing health stat publisher in PCA,
adding MT app integration test to PCA
Posted by ra...@apache.org.
http://git-wip-us.apache.org/repos/asf/stratos/blob/64368325/products/python-cartridge-agent/integration/cartridge-agent.log
----------------------------------------------------------------------
diff --git a/products/python-cartridge-agent/integration/cartridge-agent.log b/products/python-cartridge-agent/integration/cartridge-agent.log
new file mode 100644
index 0000000..75bf741
--- /dev/null
+++ b/products/python-cartridge-agent/integration/cartridge-agent.log
@@ -0,0 +1,3372 @@
+2015-08-28 16:51:34,169 [-] [main] INFO BrokerService Loaded the Bouncy Castle security provider.
+2015-08-28 16:51:34,176 [-] [main] INFO PythonAgentTestManager PCA integration properties: {distribution.name=apache-stratos-python-cartridge-agent-4.1.2, stratos.admin.password=admin, activemq.mqtt.bind.address=mqtt://localhost:1885, stratos.endpoint=http://localhost:9763, cep.port=7712, distribution.version=4.1.2, stratos.admin.username=admin, activemq.amqp.bind.address=tcp://localhost:61617}
+2015-08-28 16:51:34,178 [-] [main] INFO PythonAgentTestManager PCA integration properties: {distribution.name=apache-stratos-python-cartridge-agent-4.1.2, stratos.admin.password=admin, activemq.mqtt.bind.address=mqtt://localhost:1885, stratos.endpoint=http://localhost:9763, cep.port=7712, distribution.version=4.1.2, stratos.admin.username=admin, activemq.amqp.bind.address=tcp://localhost:61617}
+2015-08-28 16:51:34,179 [-] [main] INFO PythonAgentTestManager PCA integration properties: {distribution.name=apache-stratos-python-cartridge-agent-4.1.2, stratos.admin.password=admin, activemq.mqtt.bind.address=mqtt://localhost:1885, stratos.endpoint=http://localhost:9763, cep.port=7712, distribution.version=4.1.2, stratos.admin.username=admin, activemq.amqp.bind.address=tcp://localhost:61617}
+2015-08-28 16:51:34,470 [-] [JMX connector] INFO ManagementContext JMX consoles can connect to service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi
+2015-08-28 16:51:34,547 [-] [main] INFO PListStoreImpl PListStore:[/home/akila/Documents/ASF/stratos-ravihansa3000.git/products/python-cartridge-agent/integration/target/test-classes/../d172cc3f-19ec-49a3-9d52-909804158deb/activemq-data/testBroker/tmp_storage] started
+2015-08-28 16:51:34,553 [-] [main] INFO BrokerService Using Persistence Adapter: KahaDBPersistenceAdapter[/home/akila/Documents/ASF/stratos-ravihansa3000.git/products/python-cartridge-agent/integration/target/test-classes/../d172cc3f-19ec-49a3-9d52-909804158deb/activemq-data/testBroker/KahaDB]
+2015-08-28 16:51:34,807 [-] [main] INFO BrokerService Apache ActiveMQ 5.10.0 (testBroker, ID:akila-wso2-lap-23868-1440760894669-0:1) is starting
+2015-08-28 16:51:34,816 [-] [main] INFO TransportServerThreadSupport Listening for connections at: tcp://localhost:61617
+2015-08-28 16:51:34,817 [-] [main] INFO TransportConnector Connector tcp://localhost:61617 started
+2015-08-28 16:51:34,818 [-] [main] INFO TransportServerThreadSupport Listening for connections at: mqtt://localhost:1885
+2015-08-28 16:51:34,818 [-] [main] INFO TransportConnector Connector mqtt://localhost:1885 started
+2015-08-28 16:51:34,819 [-] [main] INFO BrokerService Apache ActiveMQ 5.10.0 (testBroker, ID:akila-wso2-lap-23868-1440760894669-0:1) started
+2015-08-28 16:51:34,819 [-] [main] INFO BrokerService For help or more information please see: http://activemq.apache.org
+2015-08-28 16:51:34,819 [-] [main] WARN BrokerService Store limit is 102400 mb (current store usage is 0 mb). The data directory: /home/akila/Documents/ASF/stratos-ravihansa3000.git/products/python-cartridge-agent/integration/target/test-classes/../d172cc3f-19ec-49a3-9d52-909804158deb/activemq-data/testBroker/KahaDB only has 25094 mb of usable space - resetting to maximum available disk space: 25094 mb
+2015-08-28 16:51:34,819 [-] [main] ERROR BrokerService Temporary Store limit is 51200 mb, whilst the temporary data directory: /home/akila/Documents/ASF/stratos-ravihansa3000.git/products/python-cartridge-agent/integration/target/test-classes/../d172cc3f-19ec-49a3-9d52-909804158deb/activemq-data/testBroker/tmp_storage only has 25094 mb of usable space - resetting to maximum available 25094 mb.
+2015-08-28 16:51:34,854 [-] [main] INFO PythonAgentTestManager Broker service started!
+2015-08-28 16:51:34,857 [-] [main] INFO StratosThreadPool Thread pool created: [type] Executor Service [id] TEST_THREAD_POOL [size] 15
+2015-08-28 16:51:34,935 [-] [pool-2-thread-2] INFO TopologyEventMessageDelegator Topology event message delegator started
+2015-08-28 16:51:34,950 [-] [pool-2-thread-4] INFO InstanceStatusEventMessageDelegator Instance notifier event message delegator started
+2015-08-28 16:51:34,952 [-] [main] INFO PythonAgentTestManager Setting up python cartridge agent...
+2015-08-28 16:51:34,952 [-] [Thread-5] INFO PythonAgentTestManager Server socket started on port: 7712
+2015-08-28 16:51:35,003 [-] [main] INFO PythonAgentTestManager Changing extension scripts permissions
+2015-08-28 16:51:35,015 [-] [main] INFO PythonAgentTestManager Python cartridge agent setup completed
+2015-08-28 16:51:35,015 [-] [main] INFO PythonAgentTestManager Python agent working directory name: d172cc3f-19ec-49a3-9d52-909804158deb
+2015-08-28 16:51:35,015 [-] [main] INFO PythonAgentTestManager Starting python cartridge agent...
+2015-08-28 16:51:35,024 [-] [Thread-7] INFO PythonAgentTestManager Server socket started on port: 8080
+2015-08-28 16:51:35,026 [-] [main] ERROR PythonAgentTestManager Error while starting MB
+java.io.IOException: Failed to bind to server socket: tcp://localhost:61617 due to: java.net.BindException: Address already in use
+ at org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport.java:33)
+ at org.apache.activemq.transport.tcp.TcpTransportServer.bind(TcpTransportServer.java:135)
+ at org.apache.activemq.transport.tcp.TcpTransportFactory.doBind(TcpTransportFactory.java:56)
+ at org.apache.activemq.transport.TransportFactorySupport.bind(TransportFactorySupport.java:40)
+ at org.apache.activemq.broker.BrokerService.createTransportConnector(BrokerService.java:2327)
+ at org.apache.activemq.broker.BrokerService.addConnector(BrokerService.java:316)
+ at org.apache.activemq.broker.BrokerService.addConnector(BrokerService.java:306)
+ at org.apache.stratos.python.cartridge.agent.test.PythonAgentTestManager.startBroker(PythonAgentTestManager.java:189)
+ at org.apache.stratos.python.cartridge.agent.test.PythonAgentTestManager.setup(PythonAgentTestManager.java:77)
+ at org.apache.stratos.python.cartridge.agent.test.ADCTest.setupADCTest(ADCTest.java:64)
+ at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+ at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
+ at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
+ at java.lang.reflect.Method.invoke(Method.java:606)
+ at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
+ at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:525)
+ at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:202)
+ at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:130)
+ at org.testng.SuiteRunner.privateRun(SuiteRunner.java:277)
+ at org.testng.SuiteRunner.run(SuiteRunner.java:240)
+ at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
+ at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
+ at org.testng.TestNG.runSuitesSequentially(TestNG.java:1158)
+ at org.testng.TestNG.runSuitesLocally(TestNG.java:1083)
+ at org.testng.TestNG.run(TestNG.java:999)
+ at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:115)
+ at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.executeMulti(TestNGDirectoryTestSuite.java:205)
+ at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute(TestNGDirectoryTestSuite.java:108)
+ at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:111)
+ at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:203)
+ at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:155)
+ at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
+Caused by: java.net.BindException: Address already in use
+ at java.net.PlainSocketImpl.socketBind(Native Method)
+ at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:376)
+ at java.net.ServerSocket.bind(ServerSocket.java:376)
+ at java.net.ServerSocket.<init>(ServerSocket.java:237)
+ at javax.net.DefaultServerSocketFactory.createServerSocket(ServerSocketFactory.java:231)
+ at org.apache.activemq.transport.tcp.TcpTransportServer.bind(TcpTransportServer.java:132)
+ ... 30 more
+2015-08-28 16:51:35,029 [-] [Thread-8] ERROR PythonAgentTestManager Could not start server socket: [port] 8080
+java.net.BindException: Address already in use
+ at java.net.PlainSocketImpl.socketBind(Native Method)
+ at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:376)
+ at java.net.ServerSocket.bind(ServerSocket.java:376)
+ at java.net.ServerSocket.<init>(ServerSocket.java:237)
+ at java.net.ServerSocket.<init>(ServerSocket.java:128)
+ at org.apache.stratos.python.cartridge.agent.test.PythonAgentTestManager$4.run(PythonAgentTestManager.java:236)
+ at java.lang.Thread.run(Thread.java:745)
+2015-08-28 16:51:35,030 [-] [main] ERROR PythonAgentTestManager Error while starting MB
+java.io.IOException: Failed to bind to server socket: tcp://localhost:61617 due to: java.net.BindException: Address already in use
+ at org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport.java:33)
+ at org.apache.activemq.transport.tcp.TcpTransportServer.bind(TcpTransportServer.java:135)
+ at org.apache.activemq.transport.tcp.TcpTransportFactory.doBind(TcpTransportFactory.java:56)
+ at org.apache.activemq.transport.TransportFactorySupport.bind(TransportFactorySupport.java:40)
+ at org.apache.activemq.broker.BrokerService.createTransportConnector(BrokerService.java:2327)
+ at org.apache.activemq.broker.BrokerService.addConnector(BrokerService.java:316)
+ at org.apache.activemq.broker.BrokerService.addConnector(BrokerService.java:306)
+ at org.apache.stratos.python.cartridge.agent.test.PythonAgentTestManager.startBroker(PythonAgentTestManager.java:189)
+ at org.apache.stratos.python.cartridge.agent.test.PythonAgentTestManager.setup(PythonAgentTestManager.java:77)
+ at org.apache.stratos.python.cartridge.agent.test.AgentStartupTest.setupAgentStartupTest(AgentStartupTest.java:57)
+ at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+ at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
+ at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
+ at java.lang.reflect.Method.invoke(Method.java:606)
+ at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
+ at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:525)
+ at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:202)
+ at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:130)
+ at org.testng.SuiteRunner.privateRun(SuiteRunner.java:277)
+ at org.testng.SuiteRunner.run(SuiteRunner.java:240)
+ at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
+ at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
+ at org.testng.TestNG.runSuitesSequentially(TestNG.java:1158)
+ at org.testng.TestNG.runSuitesLocally(TestNG.java:1083)
+ at org.testng.TestNG.run(TestNG.java:999)
+ at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:115)
+ at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.executeMulti(TestNGDirectoryTestSuite.java:205)
+ at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute(TestNGDirectoryTestSuite.java:108)
+ at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:111)
+ at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:203)
+ at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:155)
+ at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
+Caused by: java.net.BindException: Address already in use
+ at java.net.PlainSocketImpl.socketBind(Native Method)
+ at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:376)
+ at java.net.ServerSocket.bind(ServerSocket.java:376)
+ at java.net.ServerSocket.<init>(ServerSocket.java:237)
+ at javax.net.DefaultServerSocketFactory.createServerSocket(ServerSocketFactory.java:231)
+ at org.apache.activemq.transport.tcp.TcpTransportServer.bind(TcpTransportServer.java:132)
+ ... 30 more
+2015-08-28 16:51:35,032 [-] [Thread-9] ERROR PythonAgentTestManager Could not start server socket: [port] 8080
+java.net.BindException: Address already in use
+ at java.net.PlainSocketImpl.socketBind(Native Method)
+ at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:376)
+ at java.net.ServerSocket.bind(ServerSocket.java:376)
+ at java.net.ServerSocket.<init>(ServerSocket.java:237)
+ at java.net.ServerSocket.<init>(ServerSocket.java:128)
+ at org.apache.stratos.python.cartridge.agent.test.PythonAgentTestManager$4.run(PythonAgentTestManager.java:236)
+ at java.lang.Thread.run(Thread.java:745)
+2015-08-28 16:51:35,349 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:35,269] DEBUG {config.py:read_conf_file} - Config file path : '/home/akila/Documents/ASF/stratos-ravihansa3000.git/products/python-cartridge-agent/integration/target/d172cc3f-19ec-49a3-9d52-909804158deb/apache-stratos-python-cartridge-agent-4.1.2/agent.conf'
+2015-08-28 16:51:35,349 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:35,270] DEBUG {config.py:read_payload_file} - Param file path : '/home/akila/Documents/ASF/stratos-ravihansa3000.git/products/python-cartridge-agent/integration/target/d172cc3f-19ec-49a3-9d52-909804158deb/apache-stratos-python-cartridge-agent-4.1.2/payload/launch-params'
+2015-08-28 16:51:35,350 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:35,270] DEBUG {config.py:read_property} - Reading payload parameter: APPLICATION_ID = application-3
+2015-08-28 16:51:35,350 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:35,270] DEBUG {config.py:read_property} - Reading payload parameter: SERVICE_NAME = tomcat-mt
+2015-08-28 16:51:35,350 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:35,270] DEBUG {config.py:read_property} - Reading payload parameter: CLUSTER_ID = tomcat.domain
+2015-08-28 16:51:35,350 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:35,270] DEBUG {config.py:read_property} - Reading payload parameter: PORTS = 8080
+2015-08-28 16:51:35,350 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:35,270] DEBUG {config.py:read_property} - Reading payload parameter: MULTITENANT = true
+2015-08-28 16:51:35,350 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:35,271] DEBUG {config.py:read_property} - Reading payload parameter: TENANT_ID = -1234
+2015-08-28 16:51:35,350 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:35,271] DEBUG {config.py:read_property} - Reading property: auto.commit = true
+2015-08-28 16:51:35,350 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:35,271] DEBUG {config.py:read_property} - Reading payload parameter: INTERNAL = false
+2015-08-28 16:51:35,350 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:35,271] DEBUG {config.py:read_property} - Reading property: artifact.update.interval = 15
+2015-08-28 16:51:35,350 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:35,271] DEBUG {config.py:read_property} - Reading payload parameter: CLUSTER_INSTANCE_ID = cluster-1-instance-1
+2015-08-28 16:51:35,350 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:35,271] DEBUG {config.py:read_property} - Reading payload parameter: MEMBER_ID = tomcat.member-1
+2015-08-28 16:51:35,350 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:35,271] DEBUG {config.py:read_property} - Reading payload parameter: NETWORK_PARTITION_ID = network-p1
+2015-08-28 16:51:35,350 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:35,271] DEBUG {config.py:read_property} - Reading payload parameter: PARTITION_ID = p1
+2015-08-28 16:51:35,350 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:35,271] DEBUG {config.py:read_property} - Reading payload parameter: APPLICATION_PATH = /tmp/pca-test-suite-2
+2015-08-28 16:51:35,350 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:35,271] DEBUG {config.py:read_property} - Reading payload parameter: REPO_URL = https://github.com/imesh/stratos-php-applications.git
+2015-08-28 16:51:35,351 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:35,271] DEBUG {config.py:read_property} - Reading payload parameter: CARTRIDGE_KEY = PUjpXCLujDhYr5A6
+2015-08-28 16:51:35,351 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:35,271] DEBUG {config.py:read_property} - Reading property: log.file.paths = /tmp/agent.screen-adc-mt-test.log
+2015-08-28 16:51:35,351 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:35,271] DEBUG {config.py:read_property} - Reading payload parameter: PERSISTENCE_MAPPING = None
+2015-08-28 16:51:35,351 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:35,271] DEBUG {config.py:read_property} - Reading property: auto.checkout = true
+2015-08-28 16:51:35,351 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:35,272] DEBUG {config.py:read_property} - Reading property: listen.address = localhost
+2015-08-28 16:51:35,351 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:35,272] DEBUG {config.py:read_property} - Reading payload parameter: LB_CLUSTER_ID = None
+2015-08-28 16:51:35,351 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:35,272] DEBUG {config.py:read_property} - Reading payload parameter: MIN_COUNT = 1
+2015-08-28 16:51:35,351 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:35,272] DEBUG {config.py:read_property} - Reading property: lb.private.ip =
+2015-08-28 16:51:35,351 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:35,272] DEBUG {config.py:read_property} - Reading property: lb.public.ip =
+2015-08-28 16:51:35,351 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:35,272] DEBUG {config.py:read_property} - Reading property: tenant.repository.path = /repository/tenants/
+2015-08-28 16:51:35,351 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:35,272] DEBUG {config.py:read_property} - Reading property: super.tenant.repository.path = /repository/deployment/server/
+2015-08-28 16:51:35,351 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:35,272] INFO {config.py:initialize_config} - Cartridge agent configuration initialized
+2015-08-28 16:51:35,351 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:35,272] DEBUG {config.py:initialize_config} - service-name: 'tomcat-mt'
+2015-08-28 16:51:35,351 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:35,272] DEBUG {config.py:initialize_config} - cluster-id: 'tomcat.domain'
+2015-08-28 16:51:35,352 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:35,272] DEBUG {config.py:initialize_config} - cluster-instance-id: 'cluster-1-instance-1'
+2015-08-28 16:51:35,352 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:35,272] DEBUG {config.py:initialize_config} - member-id: 'tomcat.member-1'
+2015-08-28 16:51:35,352 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:35,272] DEBUG {config.py:initialize_config} - network-partition-id: 'network-p1'
+2015-08-28 16:51:35,352 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:35,272] DEBUG {config.py:initialize_config} - partition-id: 'p1'
+2015-08-28 16:51:35,352 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:35,273] DEBUG {config.py:initialize_config} - cartridge-key: 'PUjpXCLujDhYr5A6'
+2015-08-28 16:51:35,352 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:35,273] DEBUG {config.py:initialize_config} - app-path: '/tmp/pca-test-suite-2'
+2015-08-28 16:51:35,352 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:35,273] DEBUG {config.py:initialize_config} - repo-url: 'https://github.com/imesh/stratos-php-applications.git'
+2015-08-28 16:51:35,352 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:35,273] DEBUG {config.py:initialize_config} - ports: "['8080']"
+2015-08-28 16:51:35,352 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:35,273] DEBUG {config.py:initialize_config} - lb-private-ip: None
+2015-08-28 16:51:35,352 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:35,273] DEBUG {config.py:initialize_config} - lb-public-ip: None
+2015-08-28 16:51:35,352 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:35,273] DEBUG {config.py:initialize_config} - dependant_cluster_id: None
+2015-08-28 16:51:35,352 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:35,273] DEBUG {config.py:initialize_config} - export_metadata_keys: None
+2015-08-28 16:51:35,352 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:35,273] DEBUG {config.py:initialize_config} - import_metadata_keys: None
+2015-08-28 16:51:35,352 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:35,273] DEBUG {config.py:initialize_config} - artifact.update.interval: '15'
+2015-08-28 16:51:35,352 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:35,273] DEBUG {config.py:initialize_config} - lvs-virtual-ip: None
+2015-08-28 16:51:35,353 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:35,273] DEBUG {config.py:initialize_config} - log_file_paths: ['/tmp/agent.screen-adc-mt-test.log']
+2015-08-28 16:51:35,353 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:35,273] INFO {config.py:initialize_config} - Initializing plugins
+2015-08-28 16:51:35,353 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:35,273] INFO {config.py:initialize_plugins} - Collecting and loading plugins
+2015-08-28 16:51:35,353 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:35,273] DEBUG {config.py:read_property} - Reading property: plugins.dir = /home/akila/Documents/ASF/stratos-ravihansa3000.git/products/python-cartridge-agent/integration/target/d172cc3f-19ec-49a3-9d52-909804158deb/apache-stratos-python-cartridge-agent-4.1.2/plugins
+2015-08-28 16:51:35,353 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:35,274] DEBUG {PluginFileLocator.py:locatePlugins} - PluginFileLocator walks (recursively) into directory: /home/akila/Documents/ASF/stratos-ravihansa3000.git/products/python-cartridge-agent/integration/target/d172cc3f-19ec-49a3-9d52-909804158deb/apache-stratos-python-cartridge-agent-4.1.2/plugins
+2015-08-28 16:51:35,353 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:35,274] DEBUG {PluginFileLocator.py:locatePlugins} - contracts.pyc is not a valid plugin for strategy info_ext
+2015-08-28 16:51:35,353 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:35,274] DEBUG {PluginFileLocator.py:locatePlugins} - __init__.pyc is not a valid plugin for strategy info_ext
+2015-08-28 16:51:35,353 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:35,274] DEBUG {PluginFileLocator.py:locatePlugins} - __init__.py is not a valid plugin for strategy info_ext
+2015-08-28 16:51:35,353 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:35,274] DEBUG {PluginFileLocator.py:locatePlugins} - contracts.py is not a valid plugin for strategy info_ext
+2015-08-28 16:51:35,353 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:35,274] DEBUG {PluginFileLocator.py:locatePlugins} - README.md is not a valid plugin for strategy info_ext
+2015-08-28 16:51:35,353 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:35,274] INFO {config.py:initialize_extensions} - Collecting and loading extensions
+2015-08-28 16:51:35,353 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:35,274] DEBUG {config.py:read_property} - Reading property: extensions.dir = /home/akila/Documents/ASF/stratos-ravihansa3000.git/products/python-cartridge-agent/integration/target/d172cc3f-19ec-49a3-9d52-909804158deb/apache-stratos-python-cartridge-agent-4.1.2/extensions/py
+2015-08-28 16:51:35,353 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:35,274] DEBUG {PluginFileLocator.py:locatePlugins} - PluginFileLocator walks (recursively) into directory: /home/akila/Documents/ASF/stratos-ravihansa3000.git/products/python-cartridge-agent/integration/target/d172cc3f-19ec-49a3-9d52-909804158deb/apache-stratos-python-cartridge-agent-4.1.2/extensions/py
+2015-08-28 16:51:35,353 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:35,274] DEBUG {PluginFileLocator.py:locatePlugins} - ExtensionExecutor.py is not a valid plugin for strategy info_ext
+2015-08-28 16:51:35,353 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:35,274] DEBUG {PluginFileLocator.py:locatePlugins} - PluginFileLocator found a candidate:
+2015-08-28 16:51:35,354 [-] [Thread-14] INFO PythonAgentTestManager /home/akila/Documents/ASF/stratos-ravihansa3000.git/products/python-cartridge-agent/integration/target/d172cc3f-19ec-49a3-9d52-909804158deb/apache-stratos-python-cartridge-agent-4.1.2/extensions/py/ExtensionExecutor.yapsy-plugin
+2015-08-28 16:51:35,354 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:35,275] DEBUG {PluginFileLocator.py:locatePlugins} - __init__.py is not a valid plugin for strategy info_ext
+2015-08-28 16:51:35,354 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:35,276] DEBUG {config.py:initialize_extensions} - Found extension executor [ExtensionExecutor] at [/home/akila/Documents/ASF/stratos-ravihansa3000.git/products/python-cartridge-agent/integration/target/d172cc3f-19ec-49a3-9d52-909804158deb/apache-stratos-python-cartridge-agent-4.1.2/extensions/py/ExtensionExecutor]
+2015-08-28 16:51:35,354 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:35,276] INFO {config.py:initialize_extensions} - Activated extension executor [ExtensionExecutor]
+2015-08-28 16:51:35,354 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:35,276] DEBUG {config.py:read_property} - Reading property: mb.ip = localhost
+2015-08-28 16:51:35,354 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:35,276] DEBUG {config.py:read_property} - Reading property: mb.port = 1885
+2015-08-28 16:51:35,354 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:35,276] DEBUG {agent.py:main} - Starting cartridge agent
+2015-08-28 16:51:35,354 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:35,277] INFO {agent.py:run} - Starting Cartridge Agent...
+2015-08-28 16:51:35,354 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:35,277] DEBUG {agent.py:register_topology_event_listeners} - Starting topology event message receiver thread
+2015-08-28 16:51:35,354 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:35,277] DEBUG {subscriber.py:register_handler} - Registered handler for event 'MemberActivatedEvent'
+2015-08-28 16:51:35,354 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:35,277] DEBUG {subscriber.py:register_handler} - Registered handler for event 'MemberTerminatedEvent'
+2015-08-28 16:51:35,354 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:35,277] DEBUG {subscriber.py:register_handler} - Registered handler for event 'MemberSuspendedEvent'
+2015-08-28 16:51:35,354 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:35,277] DEBUG {subscriber.py:register_handler} - Registered handler for event 'CompleteTopologyEvent'
+2015-08-28 16:51:35,354 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:35,277] DEBUG {subscriber.py:register_handler} - Registered handler for event 'MemberStartedEvent'
+2015-08-28 16:51:35,354 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:35,277] DEBUG {subscriber.py:register_handler} - Registered handler for event 'MemberCreatedEvent'
+2015-08-28 16:51:35,355 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:35,278] DEBUG {subscriber.py:register_handler} - Registered handler for event 'MemberInitializedEvent'
+2015-08-28 16:51:35,355 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:35,278] INFO {agent.py:register_topology_event_listeners} - Cartridge agent topology receiver thread started
+2015-08-28 16:51:35,355 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:35,279] DEBUG {subscriber.py:run} - Connecting to the message broker with address 'localhost':'1885'
+2015-08-28 16:51:35,355 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:35,317] DEBUG {subscriber.py:on_connect} - Connected to message broker.
+2015-08-28 16:51:35,355 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:35,317] DEBUG {subscriber.py:on_connect} - Subscribed to 'topology/#'
+2015-08-28 16:51:36,049 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:35,269] DEBUG {config.py:read_conf_file} - Config file path : '/home/akila/Documents/ASF/stratos-ravihansa3000.git/products/python-cartridge-agent/integration/target/d172cc3f-19ec-49a3-9d52-909804158deb/apache-stratos-python-cartridge-agent-4.1.2/agent.conf'
+2015-08-28 16:51:36,049 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:35,270] DEBUG {config.py:read_payload_file} - Param file path : '/home/akila/Documents/ASF/stratos-ravihansa3000.git/products/python-cartridge-agent/integration/target/d172cc3f-19ec-49a3-9d52-909804158deb/apache-stratos-python-cartridge-agent-4.1.2/payload/launch-params'
+2015-08-28 16:51:36,049 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:35,270] DEBUG {config.py:read_property} - Reading payload parameter: APPLICATION_ID = application-3
+2015-08-28 16:51:36,049 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:35,270] DEBUG {config.py:read_property} - Reading payload parameter: SERVICE_NAME = tomcat-mt
+2015-08-28 16:51:36,049 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:35,270] DEBUG {config.py:read_property} - Reading payload parameter: CLUSTER_ID = tomcat.domain
+2015-08-28 16:51:36,049 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:35,270] DEBUG {config.py:read_property} - Reading payload parameter: PORTS = 8080
+2015-08-28 16:51:36,049 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:35,270] DEBUG {config.py:read_property} - Reading payload parameter: MULTITENANT = true
+2015-08-28 16:51:36,049 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:35,271] DEBUG {config.py:read_property} - Reading payload parameter: TENANT_ID = -1234
+2015-08-28 16:51:36,050 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:35,271] DEBUG {config.py:read_property} - Reading property: auto.commit = true
+2015-08-28 16:51:36,050 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:35,271] DEBUG {config.py:read_property} - Reading payload parameter: INTERNAL = false
+2015-08-28 16:51:36,050 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:35,271] DEBUG {config.py:read_property} - Reading property: artifact.update.interval = 15
+2015-08-28 16:51:36,050 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:35,271] DEBUG {config.py:read_property} - Reading payload parameter: CLUSTER_INSTANCE_ID = cluster-1-instance-1
+2015-08-28 16:51:36,050 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:35,271] DEBUG {config.py:read_property} - Reading payload parameter: MEMBER_ID = tomcat.member-1
+2015-08-28 16:51:36,050 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:35,271] DEBUG {config.py:read_property} - Reading payload parameter: NETWORK_PARTITION_ID = network-p1
+2015-08-28 16:51:36,050 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:35,271] DEBUG {config.py:read_property} - Reading payload parameter: PARTITION_ID = p1
+2015-08-28 16:51:36,050 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:35,271] DEBUG {config.py:read_property} - Reading payload parameter: APPLICATION_PATH = /tmp/pca-test-suite-2
+2015-08-28 16:51:36,050 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:35,271] DEBUG {config.py:read_property} - Reading payload parameter: REPO_URL = https://github.com/imesh/stratos-php-applications.git
+2015-08-28 16:51:36,050 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:35,271] DEBUG {config.py:read_property} - Reading payload parameter: CARTRIDGE_KEY = PUjpXCLujDhYr5A6
+2015-08-28 16:51:36,050 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:35,271] DEBUG {config.py:read_property} - Reading property: log.file.paths = /tmp/agent.screen-adc-mt-test.log
+2015-08-28 16:51:36,050 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:35,271] DEBUG {config.py:read_property} - Reading payload parameter: PERSISTENCE_MAPPING = None
+2015-08-28 16:51:36,050 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:35,271] DEBUG {config.py:read_property} - Reading property: auto.checkout = true
+2015-08-28 16:51:36,050 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:35,272] DEBUG {config.py:read_property} - Reading property: listen.address = localhost
+2015-08-28 16:51:36,050 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:35,272] DEBUG {config.py:read_property} - Reading payload parameter: LB_CLUSTER_ID = None
+2015-08-28 16:51:36,051 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:35,272] DEBUG {config.py:read_property} - Reading payload parameter: MIN_COUNT = 1
+2015-08-28 16:51:36,051 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:35,272] DEBUG {config.py:read_property} - Reading property: lb.private.ip =
+2015-08-28 16:51:36,051 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:35,272] DEBUG {config.py:read_property} - Reading property: lb.public.ip =
+2015-08-28 16:51:36,051 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:35,272] DEBUG {config.py:read_property} - Reading property: tenant.repository.path = /repository/tenants/
+2015-08-28 16:51:36,051 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:35,272] DEBUG {config.py:read_property} - Reading property: super.tenant.repository.path = /repository/deployment/server/
+2015-08-28 16:51:36,051 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:35,272] INFO {config.py:initialize_config} - Cartridge agent configuration initialized
+2015-08-28 16:51:36,051 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:35,272] DEBUG {config.py:initialize_config} - service-name: 'tomcat-mt'
+2015-08-28 16:51:36,051 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:35,272] DEBUG {config.py:initialize_config} - cluster-id: 'tomcat.domain'
+2015-08-28 16:51:36,051 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:35,272] DEBUG {config.py:initialize_config} - cluster-instance-id: 'cluster-1-instance-1'
+2015-08-28 16:51:36,051 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:35,272] DEBUG {config.py:initialize_config} - member-id: 'tomcat.member-1'
+2015-08-28 16:51:36,051 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:35,272] DEBUG {config.py:initialize_config} - network-partition-id: 'network-p1'
+2015-08-28 16:51:36,051 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:35,272] DEBUG {config.py:initialize_config} - partition-id: 'p1'
+2015-08-28 16:51:36,051 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:35,273] DEBUG {config.py:initialize_config} - cartridge-key: 'PUjpXCLujDhYr5A6'
+2015-08-28 16:51:36,051 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:35,273] DEBUG {config.py:initialize_config} - app-path: '/tmp/pca-test-suite-2'
+2015-08-28 16:51:36,052 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:35,273] DEBUG {config.py:initialize_config} - repo-url: 'https://github.com/imesh/stratos-php-applications.git'
+2015-08-28 16:51:36,052 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:35,273] DEBUG {config.py:initialize_config} - ports: "['8080']"
+2015-08-28 16:51:36,052 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:35,273] DEBUG {config.py:initialize_config} - lb-private-ip: None
+2015-08-28 16:51:36,052 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:35,273] DEBUG {config.py:initialize_config} - lb-public-ip: None
+2015-08-28 16:51:36,052 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:35,273] DEBUG {config.py:initialize_config} - dependant_cluster_id: None
+2015-08-28 16:51:36,052 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:35,273] DEBUG {config.py:initialize_config} - export_metadata_keys: None
+2015-08-28 16:51:36,052 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:35,273] DEBUG {config.py:initialize_config} - import_metadata_keys: None
+2015-08-28 16:51:36,052 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:35,273] DEBUG {config.py:initialize_config} - artifact.update.interval: '15'
+2015-08-28 16:51:36,052 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:35,273] DEBUG {config.py:initialize_config} - lvs-virtual-ip: None
+2015-08-28 16:51:36,052 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:35,273] DEBUG {config.py:initialize_config} - log_file_paths: ['/tmp/agent.screen-adc-mt-test.log']
+2015-08-28 16:51:36,052 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:35,273] INFO {config.py:initialize_config} - Initializing plugins
+2015-08-28 16:51:36,052 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:35,273] INFO {config.py:initialize_plugins} - Collecting and loading plugins
+2015-08-28 16:51:36,052 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:35,273] DEBUG {config.py:read_property} - Reading property: plugins.dir = /home/akila/Documents/ASF/stratos-ravihansa3000.git/products/python-cartridge-agent/integration/target/d172cc3f-19ec-49a3-9d52-909804158deb/apache-stratos-python-cartridge-agent-4.1.2/plugins
+2015-08-28 16:51:36,053 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:35,274] DEBUG {PluginFileLocator.py:locatePlugins} - PluginFileLocator walks (recursively) into directory: /home/akila/Documents/ASF/stratos-ravihansa3000.git/products/python-cartridge-agent/integration/target/d172cc3f-19ec-49a3-9d52-909804158deb/apache-stratos-python-cartridge-agent-4.1.2/plugins
+2015-08-28 16:51:36,053 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:35,274] DEBUG {PluginFileLocator.py:locatePlugins} - contracts.pyc is not a valid plugin for strategy info_ext
+2015-08-28 16:51:36,053 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:35,274] DEBUG {PluginFileLocator.py:locatePlugins} - __init__.pyc is not a valid plugin for strategy info_ext
+2015-08-28 16:51:36,053 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:35,274] DEBUG {PluginFileLocator.py:locatePlugins} - __init__.py is not a valid plugin for strategy info_ext
+2015-08-28 16:51:36,053 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:35,274] DEBUG {PluginFileLocator.py:locatePlugins} - contracts.py is not a valid plugin for strategy info_ext
+2015-08-28 16:51:36,053 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:35,274] DEBUG {PluginFileLocator.py:locatePlugins} - README.md is not a valid plugin for strategy info_ext
+2015-08-28 16:51:36,053 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:35,274] INFO {config.py:initialize_extensions} - Collecting and loading extensions
+2015-08-28 16:51:36,053 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:35,274] DEBUG {config.py:read_property} - Reading property: extensions.dir = /home/akila/Documents/ASF/stratos-ravihansa3000.git/products/python-cartridge-agent/integration/target/d172cc3f-19ec-49a3-9d52-909804158deb/apache-stratos-python-cartridge-agent-4.1.2/extensions/py
+2015-08-28 16:51:36,053 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:35,274] DEBUG {PluginFileLocator.py:locatePlugins} - PluginFileLocator walks (recursively) into directory: /home/akila/Documents/ASF/stratos-ravihansa3000.git/products/python-cartridge-agent/integration/target/d172cc3f-19ec-49a3-9d52-909804158deb/apache-stratos-python-cartridge-agent-4.1.2/extensions/py
+2015-08-28 16:51:36,053 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:35,274] DEBUG {PluginFileLocator.py:locatePlugins} - ExtensionExecutor.py is not a valid plugin for strategy info_ext
+2015-08-28 16:51:36,053 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:35,274] DEBUG {PluginFileLocator.py:locatePlugins} - PluginFileLocator found a candidate:
+2015-08-28 16:51:36,054 [-] [Thread-15] INFO ADCMTAppTest /home/akila/Documents/ASF/stratos-ravihansa3000.git/products/python-cartridge-agent/integration/target/d172cc3f-19ec-49a3-9d52-909804158deb/apache-stratos-python-cartridge-agent-4.1.2/extensions/py/ExtensionExecutor.yapsy-plugin
+2015-08-28 16:51:36,054 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:35,275] DEBUG {PluginFileLocator.py:locatePlugins} - __init__.py is not a valid plugin for strategy info_ext
+2015-08-28 16:51:36,054 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:35,276] DEBUG {config.py:initialize_extensions} - Found extension executor [ExtensionExecutor] at [/home/akila/Documents/ASF/stratos-ravihansa3000.git/products/python-cartridge-agent/integration/target/d172cc3f-19ec-49a3-9d52-909804158deb/apache-stratos-python-cartridge-agent-4.1.2/extensions/py/ExtensionExecutor]
+2015-08-28 16:51:36,054 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:35,276] INFO {config.py:initialize_extensions} - Activated extension executor [ExtensionExecutor]
+2015-08-28 16:51:36,054 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:35,276] DEBUG {config.py:read_property} - Reading property: mb.ip = localhost
+2015-08-28 16:51:36,054 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:35,276] DEBUG {config.py:read_property} - Reading property: mb.port = 1885
+2015-08-28 16:51:36,054 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:35,276] DEBUG {agent.py:main} - Starting cartridge agent
+2015-08-28 16:51:36,054 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:35,277] INFO {agent.py:run} - Starting Cartridge Agent...
+2015-08-28 16:51:36,054 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:35,277] DEBUG {agent.py:register_topology_event_listeners} - Starting topology event message receiver thread
+2015-08-28 16:51:36,054 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:35,277] DEBUG {subscriber.py:register_handler} - Registered handler for event 'MemberActivatedEvent'
+2015-08-28 16:51:36,054 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:35,277] DEBUG {subscriber.py:register_handler} - Registered handler for event 'MemberTerminatedEvent'
+2015-08-28 16:51:36,054 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:35,277] DEBUG {subscriber.py:register_handler} - Registered handler for event 'MemberSuspendedEvent'
+2015-08-28 16:51:36,055 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:35,277] DEBUG {subscriber.py:register_handler} - Registered handler for event 'CompleteTopologyEvent'
+2015-08-28 16:51:36,055 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:35,277] DEBUG {subscriber.py:register_handler} - Registered handler for event 'MemberStartedEvent'
+2015-08-28 16:51:36,055 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:35,277] DEBUG {subscriber.py:register_handler} - Registered handler for event 'MemberCreatedEvent'
+2015-08-28 16:51:36,055 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:35,278] DEBUG {subscriber.py:register_handler} - Registered handler for event 'MemberInitializedEvent'
+2015-08-28 16:51:36,055 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:35,278] INFO {agent.py:register_topology_event_listeners} - Cartridge agent topology receiver thread started
+2015-08-28 16:51:36,055 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:35,279] DEBUG {subscriber.py:run} - Connecting to the message broker with address 'localhost':'1885'
+2015-08-28 16:51:36,055 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:35,317] DEBUG {subscriber.py:on_connect} - Connected to message broker.
+2015-08-28 16:51:36,360 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:36,279] DEBUG {agent.py:run} - LVS Virtual IP is not defined
+2015-08-28 16:51:36,360 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:36,279] INFO {agent.py:wait_for_complete_topology} - Waiting for complete topology event...
+2015-08-28 16:51:38,055 [-] [Thread-15] INFO ADCMTAppTest Publishing complete topology event...
+2015-08-28 16:51:38,208 [-] [Thread-15] INFO ADCMTAppTest Complete topology event published
+2015-08-28 16:51:38,209 [-] [Thread-15] INFO ADCMTAppTest Publishing member initialized event...
+2015-08-28 16:51:38,228 [-] [pool-2-thread-2] INFO CompleteTopologyMessageProcessor Topology initialized
+2015-08-28 16:51:38,246 [-] [Thread-15] INFO ADCMTAppTest Member initialized event published
+2015-08-28 16:51:38,246 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:35,317] DEBUG {subscriber.py:on_connect} - Subscribed to 'topology/#'
+2015-08-28 16:51:38,248 [-] [pool-2-thread-2] INFO MemberInitializedMessageProcessor Member initialized: [service] tomcat-mt [cluster] tomcat.domain [member] tomcat.member-1
+2015-08-28 16:51:38,267 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:38,212] DEBUG {subscriber.py:on_message} - Message received: topology/CompleteTopologyEvent:
+2015-08-28 16:51:38,267 [-] [Thread-14] INFO PythonAgentTestManager {"topology":{"clusterMap":{},"serviceMap":{"tomcat-mt":{"serviceName":"tomcat-mt","serviceType":"SingleTenant","clusterIdClusterMap":{"tomcat.domain":{"serviceName":"tomcat-mt","clusterId":"tomcat.domain","autoscalePolicyName":"autoscaling-policy-3","deploymentPolicyName":"deployment-policy-3","hostNames":[],"isLbCluster":false,"isKubernetesCluster":false,"memberMap":{"tomcat.member-1":{"serviceName":"tomcat-mt","clusterId":"tomcat.domain","memberId":"tomcat.member-1","clusterInstanceId":"cluster-1-instance-1","networkPartitionId":"network-partition-1","partitionId":"partition-1","initTime":1440760898061,"portMap":{},"defaultPublicIP":"20.0.0.1","defaultPrivateIP":"10.0.0.1","properties":{"prop1":"value1"},"memberStateManager":{"stateStack":["Created"],"identifier":"tomcat.member-1"},"loadBalancingIPType":"Private"}},"appId":"application-3","instanceIdToInstanceContextMap":{},"accessUrls":[],"kubernetesServices":[]
}},"portMap":{}}},"initialized":false}}
+2015-08-28 16:51:38,267 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:38,212] DEBUG {subscriber.py:run} - Executing handler for event 'CompleteTopologyEvent'
+2015-08-28 16:51:38,267 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:38,213] DEBUG {agent.py:on_complete_topology} - Complete topology event received
+2015-08-28 16:51:38,267 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:38,213] DEBUG {eventhandler.py:on_complete_topology_event} - Processing Complete topology event...
+2015-08-28 16:51:38,267 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:38,213] DEBUG {eventhandler.py:is_member_initialized_in_topology} - Found member: {memberId: tomcat.member-1, status: Created}
+2015-08-28 16:51:38,267 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:38,213] DEBUG {eventhandler.py:on_complete_topology_event} - Member initialized False
+2015-08-28 16:51:38,267 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:38,214] DEBUG {config.py:read_property} - Reading property: param.file.path = /home/akila/Documents/ASF/stratos-ravihansa3000.git/products/python-cartridge-agent/integration/target/d172cc3f-19ec-49a3-9d52-909804158deb/apache-stratos-python-cartridge-agent-4.1.2/payload/launch-params
+2015-08-28 16:51:38,267 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:38,214] DEBUG {eventhandler.py:execute_extension_for_event} - Executing extension for event [CompleteTopologyEvent]
+2015-08-28 16:51:38,267 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:38,214] DEBUG {ExtensionExecutor.py:run_plugin} - Running extension for CompleteTopologyEvent
+2015-08-28 16:51:38,267 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:38,215] DEBUG {ExtensionExecutor.py:execute_script} - Execute bash script :: /home/akila/Documents/ASF/stratos-ravihansa3000.git/products/python-cartridge-agent/integration/target/d172cc3f-19ec-49a3-9d52-909804158deb/apache-stratos-python-cartridge-agent-4.1.2/extensions/bash/CompleteTopologyEvent.sh
+2015-08-28 16:51:38,267 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:38,220] INFO {ExtensionExecutor.py:run_plugin} - CompleteTopologyEvent Extension executed. [output]: Fri Aug 28 16:51:38 IST 2015: Complete topology event shell extension executed
+2015-08-28 16:51:38,267 [-] [Thread-14] INFO PythonAgentTestManager
+2015-08-28 16:51:38,268 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:38,220] DEBUG {eventhandler.py:execute_plugins_for_event} - No plugins registered for event CompleteTopologyEvent
+2015-08-28 16:51:38,268 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:38,241] DEBUG {subscriber.py:on_message} - Message received: topology/MemberInitializedEvent:
+2015-08-28 16:51:38,268 [-] [Thread-14] INFO PythonAgentTestManager {"serviceName":"tomcat-mt","clusterId":"tomcat.domain","clusterInstanceId":"cluster-1-instance-1","networkPartitionId":"network-partition-1","partitionId":"partition-1","memberId":"tomcat.member-1"}
+2015-08-28 16:51:38,268 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:38,241] DEBUG {subscriber.py:run} - Executing handler for event 'MemberInitializedEvent'
+2015-08-28 16:51:38,268 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:38,241] DEBUG {agent.py:on_member_initialized} - Member initialized event received: '{"serviceName":"tomcat-mt","clusterId":"tomcat.domain","clusterInstanceId":"cluster-1-instance-1","networkPartitionId":"network-partition-1","partitionId":"partition-1","memberId":"tomcat.member-1"}'
+2015-08-28 16:51:38,268 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:38,241] DEBUG {eventhandler.py:on_member_initialized_event} - Processing Member initialized event...
+2015-08-28 16:51:38,268 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:38,241] DEBUG {eventhandler.py:on_member_initialized_event} - Member exists: True
+2015-08-28 16:51:38,268 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:38,242] DEBUG {config.py:read_property} - Reading property: param.file.path = /home/akila/Documents/ASF/stratos-ravihansa3000.git/products/python-cartridge-agent/integration/target/d172cc3f-19ec-49a3-9d52-909804158deb/apache-stratos-python-cartridge-agent-4.1.2/payload/launch-params
+2015-08-28 16:51:38,268 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:38,242] DEBUG {eventhandler.py:execute_extension_for_event} - Executing extension for event [MemberInitializedEvent]
+2015-08-28 16:51:38,268 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:38,242] DEBUG {ExtensionExecutor.py:run_plugin} - Running extension for MemberInitializedEvent
+2015-08-28 16:51:38,268 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:38,243] DEBUG {ExtensionExecutor.py:execute_script} - Execute bash script :: /home/akila/Documents/ASF/stratos-ravihansa3000.git/products/python-cartridge-agent/integration/target/d172cc3f-19ec-49a3-9d52-909804158deb/apache-stratos-python-cartridge-agent-4.1.2/extensions/bash/MemberInitializedEvent.sh
+2015-08-28 16:51:38,268 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:38,247] INFO {ExtensionExecutor.py:run_plugin} - MemberInitializedEvent Extension executed. [output]: Fri Aug 28 16:51:38 IST 2015: Member initialized event shell extension executed
+2015-08-28 16:51:38,268 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:38,248] DEBUG {eventhandler.py:execute_plugins_for_event} - No plugins registered for event MemberInitializedEvent
+2015-08-28 16:51:39,247 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:36,279] DEBUG {agent.py:run} - LVS Virtual IP is not defined
+2015-08-28 16:51:39,247 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:36,279] INFO {agent.py:wait_for_complete_topology} - Waiting for complete topology event...
+2015-08-28 16:51:39,247 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:38,212] DEBUG {subscriber.py:on_message} - Message received: topology/CompleteTopologyEvent:
+2015-08-28 16:51:39,248 [-] [Thread-15] INFO ADCMTAppTest {"topology":{"clusterMap":{},"serviceMap":{"tomcat-mt":{"serviceName":"tomcat-mt","serviceType":"SingleTenant","clusterIdClusterMap":{"tomcat.domain":{"serviceName":"tomcat-mt","clusterId":"tomcat.domain","autoscalePolicyName":"autoscaling-policy-3","deploymentPolicyName":"deployment-policy-3","hostNames":[],"isLbCluster":false,"isKubernetesCluster":false,"memberMap":{"tomcat.member-1":{"serviceName":"tomcat-mt","clusterId":"tomcat.domain","memberId":"tomcat.member-1","clusterInstanceId":"cluster-1-instance-1","networkPartitionId":"network-partition-1","partitionId":"partition-1","initTime":1440760898061,"portMap":{},"defaultPublicIP":"20.0.0.1","defaultPrivateIP":"10.0.0.1","properties":{"prop1":"value1"},"memberStateManager":{"stateStack":["Created"],"identifier":"tomcat.member-1"},"loadBalancingIPType":"Private"}},"appId":"application-3","instanceIdToInstanceContextMap":{},"accessUrls":[],"kubernetesServices":[]}},"portMa
p":{}}},"initialized":false}}
+2015-08-28 16:51:39,248 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:38,212] DEBUG {subscriber.py:run} - Executing handler for event 'CompleteTopologyEvent'
+2015-08-28 16:51:39,248 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:38,213] DEBUG {agent.py:on_complete_topology} - Complete topology event received
+2015-08-28 16:51:39,248 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:38,213] DEBUG {eventhandler.py:on_complete_topology_event} - Processing Complete topology event...
+2015-08-28 16:51:39,248 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:38,213] DEBUG {eventhandler.py:is_member_initialized_in_topology} - Found member: {memberId: tomcat.member-1, status: Created}
+2015-08-28 16:51:39,248 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:38,213] DEBUG {eventhandler.py:on_complete_topology_event} - Member initialized False
+2015-08-28 16:51:39,248 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:38,214] DEBUG {config.py:read_property} - Reading property: param.file.path = /home/akila/Documents/ASF/stratos-ravihansa3000.git/products/python-cartridge-agent/integration/target/d172cc3f-19ec-49a3-9d52-909804158deb/apache-stratos-python-cartridge-agent-4.1.2/payload/launch-params
+2015-08-28 16:51:39,248 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:38,214] DEBUG {eventhandler.py:execute_extension_for_event} - Executing extension for event [CompleteTopologyEvent]
+2015-08-28 16:51:39,248 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:38,214] DEBUG {ExtensionExecutor.py:run_plugin} - Running extension for CompleteTopologyEvent
+2015-08-28 16:51:39,248 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:38,215] DEBUG {ExtensionExecutor.py:execute_script} - Execute bash script :: /home/akila/Documents/ASF/stratos-ravihansa3000.git/products/python-cartridge-agent/integration/target/d172cc3f-19ec-49a3-9d52-909804158deb/apache-stratos-python-cartridge-agent-4.1.2/extensions/bash/CompleteTopologyEvent.sh
+2015-08-28 16:51:39,249 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:38,220] INFO {ExtensionExecutor.py:run_plugin} - CompleteTopologyEvent Extension executed. [output]: Fri Aug 28 16:51:38 IST 2015: Complete topology event shell extension executed
+2015-08-28 16:51:39,249 [-] [Thread-15] INFO ADCMTAppTest
+2015-08-28 16:51:39,249 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:38,220] DEBUG {eventhandler.py:execute_plugins_for_event} - No plugins registered for event CompleteTopologyEvent
+2015-08-28 16:51:39,249 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:38,241] DEBUG {subscriber.py:on_message} - Message received: topology/MemberInitializedEvent:
+2015-08-28 16:51:39,249 [-] [Thread-15] INFO ADCMTAppTest {"serviceName":"tomcat-mt","clusterId":"tomcat.domain","clusterInstanceId":"cluster-1-instance-1","networkPartitionId":"network-partition-1","partitionId":"partition-1","memberId":"tomcat.member-1"}
+2015-08-28 16:51:39,249 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:38,241] DEBUG {subscriber.py:run} - Executing handler for event 'MemberInitializedEvent'
+2015-08-28 16:51:39,249 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:38,241] DEBUG {agent.py:on_member_initialized} - Member initialized event received: '{"serviceName":"tomcat-mt","clusterId":"tomcat.domain","clusterInstanceId":"cluster-1-instance-1","networkPartitionId":"network-partition-1","partitionId":"partition-1","memberId":"tomcat.member-1"}'
+2015-08-28 16:51:39,249 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:38,241] DEBUG {eventhandler.py:on_member_initialized_event} - Processing Member initialized event...
+2015-08-28 16:51:39,249 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:38,241] DEBUG {eventhandler.py:on_member_initialized_event} - Member exists: True
+2015-08-28 16:51:39,249 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:38,242] DEBUG {config.py:read_property} - Reading property: param.file.path = /home/akila/Documents/ASF/stratos-ravihansa3000.git/products/python-cartridge-agent/integration/target/d172cc3f-19ec-49a3-9d52-909804158deb/apache-stratos-python-cartridge-agent-4.1.2/payload/launch-params
+2015-08-28 16:51:39,249 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:38,242] DEBUG {eventhandler.py:execute_extension_for_event} - Executing extension for event [MemberInitializedEvent]
+2015-08-28 16:51:39,249 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:38,242] DEBUG {ExtensionExecutor.py:run_plugin} - Running extension for MemberInitializedEvent
+2015-08-28 16:51:39,250 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:38,243] DEBUG {ExtensionExecutor.py:execute_script} - Execute bash script :: /home/akila/Documents/ASF/stratos-ravihansa3000.git/products/python-cartridge-agent/integration/target/d172cc3f-19ec-49a3-9d52-909804158deb/apache-stratos-python-cartridge-agent-4.1.2/extensions/bash/MemberInitializedEvent.sh
+2015-08-28 16:51:39,250 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:38,247] INFO {ExtensionExecutor.py:run_plugin} - MemberInitializedEvent Extension executed. [output]: Fri Aug 28 16:51:38 IST 2015: Member initialized event shell extension executed
+2015-08-28 16:51:39,250 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:38,248] DEBUG {eventhandler.py:execute_plugins_for_event} - No plugins registered for event MemberInitializedEvent
+2015-08-28 16:51:41,379 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:41,285] INFO {agent.py:wait_for_complete_topology} - Complete topology event received
+2015-08-28 16:51:41,380 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:41,285] DEBUG {agent.py:register_instance_topic_listeners} - Starting instance notifier event message receiver thread
+2015-08-28 16:51:41,380 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:41,285] DEBUG {subscriber.py:register_handler} - Registered handler for event 'ArtifactUpdatedEvent'
+2015-08-28 16:51:41,380 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:41,285] DEBUG {subscriber.py:register_handler} - Registered handler for event 'InstanceCleanupMemberEvent'
+2015-08-28 16:51:41,380 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:41,285] DEBUG {subscriber.py:register_handler} - Registered handler for event 'InstanceCleanupClusterEvent'
+2015-08-28 16:51:41,380 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:41,285] INFO {agent.py:register_instance_topic_listeners} - Instance notifier event message receiver thread started
+2015-08-28 16:51:41,380 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:41,286] DEBUG {subscriber.py:run} - Connecting to the message broker with address 'localhost':'1885'
+2015-08-28 16:51:41,380 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:41,292] DEBUG {subscriber.py:on_connect} - Connected to message broker.
+2015-08-28 16:51:41,380 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:41,292] DEBUG {subscriber.py:on_connect} - Subscribed to 'instance/#'
+2015-08-28 16:51:42,251 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:41,285] INFO {agent.py:wait_for_complete_topology} - Complete topology event received
+2015-08-28 16:51:42,251 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:41,285] DEBUG {agent.py:register_instance_topic_listeners} - Starting instance notifier event message receiver thread
+2015-08-28 16:51:42,251 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:41,285] DEBUG {subscriber.py:register_handler} - Registered handler for event 'ArtifactUpdatedEvent'
+2015-08-28 16:51:42,251 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:41,285] DEBUG {subscriber.py:register_handler} - Registered handler for event 'InstanceCleanupMemberEvent'
+2015-08-28 16:51:42,252 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:41,285] DEBUG {subscriber.py:register_handler} - Registered handler for event 'InstanceCleanupClusterEvent'
+2015-08-28 16:51:42,252 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:41,285] INFO {agent.py:register_instance_topic_listeners} - Instance notifier event message receiver thread started
+2015-08-28 16:51:42,252 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:41,286] DEBUG {subscriber.py:run} - Connecting to the message broker with address 'localhost':'1885'
+2015-08-28 16:51:42,252 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:41,292] DEBUG {subscriber.py:on_connect} - Connected to message broker.
+2015-08-28 16:51:42,252 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:41,292] DEBUG {subscriber.py:on_connect} - Subscribed to 'instance/#'
+2015-08-28 16:51:42,384 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:42,287] DEBUG {agent.py:register_tenant_event_listeners} - Starting tenant event message receiver thread
+2015-08-28 16:51:42,384 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:42,287] DEBUG {subscriber.py:register_handler} - Registered handler for event 'DomainMappingAddedEvent'
+2015-08-28 16:51:42,384 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:42,287] DEBUG {subscriber.py:register_handler} - Registered handler for event 'DomainsMappingRemovedEvent'
+2015-08-28 16:51:42,384 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:42,287] DEBUG {subscriber.py:register_handler} - Registered handler for event 'CompleteTenantEvent'
+2015-08-28 16:51:42,385 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:42,288] DEBUG {subscriber.py:register_handler} - Registered handler for event 'TenantSubscribedEvent'
+2015-08-28 16:51:42,385 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:42,288] INFO {agent.py:register_tenant_event_listeners} - Tenant event message receiver thread started
+2015-08-28 16:51:42,385 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:42,289] DEBUG {subscriber.py:run} - Connecting to the message broker with address 'localhost':'1885'
+2015-08-28 16:51:42,385 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:42,300] DEBUG {subscriber.py:on_connect} - Connected to message broker.
+2015-08-28 16:51:42,385 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:42,300] DEBUG {subscriber.py:on_connect} - Subscribed to 'tenant/#'
+2015-08-28 16:51:43,253 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:42,287] DEBUG {agent.py:register_tenant_event_listeners} - Starting tenant event message receiver thread
+2015-08-28 16:51:43,253 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:42,287] DEBUG {subscriber.py:register_handler} - Registered handler for event 'DomainMappingAddedEvent'
+2015-08-28 16:51:43,253 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:42,287] DEBUG {subscriber.py:register_handler} - Registered handler for event 'DomainsMappingRemovedEvent'
+2015-08-28 16:51:43,254 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:42,287] DEBUG {subscriber.py:register_handler} - Registered handler for event 'CompleteTenantEvent'
+2015-08-28 16:51:43,254 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:42,288] DEBUG {subscriber.py:register_handler} - Registered handler for event 'TenantSubscribedEvent'
+2015-08-28 16:51:43,254 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:42,288] INFO {agent.py:register_tenant_event_listeners} - Tenant event message receiver thread started
+2015-08-28 16:51:43,254 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:42,289] DEBUG {subscriber.py:run} - Connecting to the message broker with address 'localhost':'1885'
+2015-08-28 16:51:43,254 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:42,300] DEBUG {subscriber.py:on_connect} - Connected to message broker.
+2015-08-28 16:51:43,254 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:42,300] DEBUG {subscriber.py:on_connect} - Subscribed to 'tenant/#'
+2015-08-28 16:51:43,389 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:43,290] DEBUG {agent.py:register_application_signup_event_listeners} - Starting application signup event message receiver thread
+2015-08-28 16:51:43,389 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:43,290] DEBUG {subscriber.py:register_handler} - Registered handler for event 'ApplicationSignUpRemovedEvent'
+2015-08-28 16:51:43,390 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:43,291] INFO {agent.py:register_application_signup_event_listeners} - Application signup event message receiver thread started
+2015-08-28 16:51:43,390 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:43,291] DEBUG {subscriber.py:run} - Connecting to the message broker with address 'localhost':'1885'
+2015-08-28 16:51:43,390 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:43,298] DEBUG {subscriber.py:on_connect} - Connected to message broker.
+2015-08-28 16:51:43,390 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:43,298] DEBUG {subscriber.py:on_connect} - Subscribed to 'application/signup/#'
+2015-08-28 16:51:44,255 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:43,290] DEBUG {agent.py:register_application_signup_event_listeners} - Starting application signup event message receiver thread
+2015-08-28 16:51:44,255 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:43,290] DEBUG {subscriber.py:register_handler} - Registered handler for event 'ApplicationSignUpRemovedEvent'
+2015-08-28 16:51:44,255 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:43,291] INFO {agent.py:register_application_signup_event_listeners} - Application signup event message receiver thread started
+2015-08-28 16:51:44,255 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:43,291] DEBUG {subscriber.py:run} - Connecting to the message broker with address 'localhost':'1885'
+2015-08-28 16:51:44,255 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:43,298] DEBUG {subscriber.py:on_connect} - Connected to message broker.
+2015-08-28 16:51:44,255 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:43,298] DEBUG {subscriber.py:on_connect} - Subscribed to 'application/signup/#'
+2015-08-28 16:51:44,294 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:44,292] DEBUG {eventhandler.py:on_instance_started_event} - Processing instance started event...
+2015-08-28 16:51:44,294 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:44,292] DEBUG {config.py:read_property} - Reading property: param.file.path = /home/akila/Documents/ASF/stratos-ravihansa3000.git/products/python-cartridge-agent/integration/target/d172cc3f-19ec-49a3-9d52-909804158deb/apache-stratos-python-cartridge-agent-4.1.2/payload/launch-params
+2015-08-28 16:51:44,294 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:44,292] DEBUG {eventhandler.py:execute_extension_for_event} - Executing extension for event [InstanceStartedEvent]
+2015-08-28 16:51:44,295 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:44,293] DEBUG {ExtensionExecutor.py:run_plugin} - Running extension for InstanceStartedEvent
+2015-08-28 16:51:44,295 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:44,293] DEBUG {ExtensionExecutor.py:execute_script} - Execute bash script :: /home/akila/Documents/ASF/stratos-ravihansa3000.git/products/python-cartridge-agent/integration/target/d172cc3f-19ec-49a3-9d52-909804158deb/apache-stratos-python-cartridge-agent-4.1.2/extensions/bash/InstanceStartedEvent.sh
+2015-08-28 16:51:44,316 [-] [pool-2-thread-4] INFO PythonAgentTestManager Instance started event received
+2015-08-28 16:51:44,395 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:44,298] INFO {ExtensionExecutor.py:run_plugin} - InstanceStartedEvent Extension executed. [output]: Fri Aug 28 16:51:44 IST 2015: Instance started event shell extension executed
+2015-08-28 16:51:44,395 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:44,299] DEBUG {eventhandler.py:execute_plugins_for_event} - No plugins registered for event InstanceStartedEvent
+2015-08-28 16:51:44,395 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:44,299] INFO {publisher.py:publish_instance_started_event} - Publishing instance started event
+2015-08-28 16:51:44,395 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:44,299] DEBUG {config.py:read_property} - Reading property: mb.ip = localhost
+2015-08-28 16:51:44,395 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:44,299] DEBUG {config.py:read_property} - Reading property: mb.port = 1885
+2015-08-28 16:51:44,395 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:44,306] INFO {publisher.py:publish_instance_started_event} - Instance started event published
+2015-08-28 16:51:44,396 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:44,306] INFO {eventhandler.py:start_server_extension} - Processing start server extension...
+2015-08-28 16:51:44,396 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:44,306] DEBUG {eventhandler.py:is_member_initialized_in_topology} - Found member: {memberId: tomcat.member-1, status: Initialized}
+2015-08-28 16:51:44,396 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:44,306] DEBUG {config.py:read_property} - Reading property: param.file.path = /home/akila/Documents/ASF/stratos-ravihansa3000.git/products/python-cartridge-agent/integration/target/d172cc3f-19ec-49a3-9d52-909804158deb/apache-stratos-python-cartridge-agent-4.1.2/payload/launch-params
+2015-08-28 16:51:44,396 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:44,307] DEBUG {eventhandler.py:execute_extension_for_event} - Executing extension for event [StartServers]
+2015-08-28 16:51:44,396 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:44,307] DEBUG {ExtensionExecutor.py:run_plugin} - Running extension for StartServers
+2015-08-28 16:51:44,396 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:44,307] DEBUG {ExtensionExecutor.py:execute_script} - Execute bash script :: /home/akila/Documents/ASF/stratos-ravihansa3000.git/products/python-cartridge-agent/integration/target/d172cc3f-19ec-49a3-9d52-909804158deb/apache-stratos-python-cartridge-agent-4.1.2/extensions/bash/StartServers.sh
+2015-08-28 16:51:44,396 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:44,312] INFO {ExtensionExecutor.py:run_plugin} - StartServers Extension executed. [output]: Fri Aug 28 16:51:44 IST 2015: Start servers event shell extension executed
+2015-08-28 16:51:44,396 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:44,313] DEBUG {eventhandler.py:execute_plugins_for_event} - No plugins registered for event StartServers
+2015-08-28 16:51:44,396 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:44,313] INFO {agent.py:run} - Artifact repository found, waiting for artifact updated event to checkout artifacts: [repo_url] https://github.com/imesh/stratos-php-applications.git
+2015-08-28 16:51:44,396 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:44,313] DEBUG {config.py:read_property} - Reading property: enable.data.publisher = false
+2015-08-28 16:51:44,396 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:44,313] INFO {logpublisher.py:read_config} - Data Publisher disabled
+2015-08-28 16:51:44,396 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:44,315] DEBUG {subscriber.py:on_message} - Message received: instance/status/InstanceStartedEvent:
+2015-08-28 16:51:44,396 [-] [Thread-14] INFO PythonAgentTestManager {
+2015-08-28 16:51:44,396 [-] [Thread-14] INFO PythonAgentTestManager "applicationId": "application-3",
+2015-08-28 16:51:44,396 [-] [Thread-14] INFO PythonAgentTestManager "clusterId": "tomcat.domain",
+2015-08-28 16:51:44,397 [-] [Thread-14] INFO PythonAgentTestManager "clusterInstanceId": "cluster-1-instance-1",
+2015-08-28 16:51:44,397 [-] [Thread-14] INFO PythonAgentTestManager "instanceId": null,
+2015-08-28 16:51:44,397 [-] [Thread-14] INFO PythonAgentTestManager "memberId": "tomcat.member-1",
+2015-08-28 16:51:44,397 [-] [Thread-14] INFO PythonAgentTestManager "networkPartitionId": "network-p1",
+2015-08-28 16:51:44,397 [-] [Thread-14] INFO PythonAgentTestManager "partitionId": "p1",
+2015-08-28 16:51:44,397 [-] [Thread-14] INFO PythonAgentTestManager "serviceName": "tomcat-mt"
+2015-08-28 16:51:44,397 [-] [Thread-14] INFO PythonAgentTestManager }
+2015-08-28 16:51:44,397 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:44,315] DEBUG {subscriber.py:run} - Event handler not found for event : 'InstanceStartedEvent'
+2015-08-28 16:51:45,256 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:44,292] DEBUG {eventhandler.py:on_instance_started_event} - Processing instance started event...
+2015-08-28 16:51:45,256 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:44,292] DEBUG {config.py:read_property} - Reading property: param.file.path = /home/akila/Documents/ASF/stratos-ravihansa3000.git/products/python-cartridge-agent/integration/target/d172cc3f-19ec-49a3-9d52-909804158deb/apache-stratos-python-cartridge-agent-4.1.2/payload/launch-params
+2015-08-28 16:51:45,257 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:44,292] DEBUG {eventhandler.py:execute_extension_for_event} - Executing extension for event [InstanceStartedEvent]
+2015-08-28 16:51:45,257 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:44,293] DEBUG {ExtensionExecutor.py:run_plugin} - Running extension for InstanceStartedEvent
+2015-08-28 16:51:45,257 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:44,293] DEBUG {ExtensionExecutor.py:execute_script} - Execute bash script :: /home/akila/Documents/ASF/stratos-ravihansa3000.git/products/python-cartridge-agent/integration/target/d172cc3f-19ec-49a3-9d52-909804158deb/apache-stratos-python-cartridge-agent-4.1.2/extensions/bash/InstanceStartedEvent.sh
+2015-08-28 16:51:45,257 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:44,298] INFO {ExtensionExecutor.py:run_plugin} - InstanceStartedEvent Extension executed. [output]: Fri Aug 28 16:51:44 IST 2015: Instance started event shell extension executed
+2015-08-28 16:51:45,257 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:44,299] DEBUG {eventhandler.py:execute_plugins_for_event} - No plugins registered for event InstanceStartedEvent
+2015-08-28 16:51:45,258 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:44,299] INFO {publisher.py:publish_instance_started_event} - Publishing instance started event
+2015-08-28 16:51:45,258 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:44,299] DEBUG {config.py:read_property} - Reading property: mb.ip = localhost
+2015-08-28 16:51:45,258 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:44,299] DEBUG {config.py:read_property} - Reading property: mb.port = 1885
+2015-08-28 16:51:45,258 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:44,306] INFO {publisher.py:publish_instance_started_event} - Instance started event published
+2015-08-28 16:51:45,258 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:44,306] INFO {eventhandler.py:start_server_extension} - Processing start server extension...
+2015-08-28 16:51:45,259 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:44,306] DEBUG {eventhandler.py:is_member_initialized_in_topology} - Found member: {memberId: tomcat.member-1, status: Initialized}
+2015-08-28 16:51:45,259 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:44,306] DEBUG {config.py:read_property} - Reading property: param.file.path = /home/akila/Documents/ASF/stratos-ravihansa3000.git/products/python-cartridge-agent/integration/target/d172cc3f-19ec-49a3-9d52-909804158deb/apache-stratos-python-cartridge-agent-4.1.2/payload/launch-params
+2015-08-28 16:51:45,259 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:44,307] DEBUG {eventhandler.py:execute_extension_for_event} - Executing extension for event [StartServers]
+2015-08-28 16:51:45,259 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:44,307] DEBUG {ExtensionExecutor.py:run_plugin} - Running extension for StartServers
+2015-08-28 16:51:45,259 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:44,307] DEBUG {ExtensionExecutor.py:execute_script} - Execute bash script :: /home/akila/Documents/ASF/stratos-ravihansa3000.git/products/python-cartridge-agent/integration/target/d172cc3f-19ec-49a3-9d52-909804158deb/apache-stratos-python-cartridge-agent-4.1.2/extensions/bash/StartServers.sh
+2015-08-28 16:51:45,259 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:44,312] INFO {ExtensionExecutor.py:run_plugin} - StartServers Extension executed. [output]: Fri Aug 28 16:51:44 IST 2015: Start servers event shell extension executed
+2015-08-28 16:51:45,260 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:44,313] DEBUG {eventhandler.py:execute_plugins_for_event} - No plugins registered for event StartServers
+2015-08-28 16:51:45,286 [-] [Thread-15] INFO ADCMTAppTest Artifact updated event published
+2015-08-28 16:51:45,286 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:44,313] INFO {agent.py:run} - Artifact repository found, waiting for artifact updated event to checkout artifacts: [repo_url] https://github.com/imesh/stratos-php-applications.git
+2015-08-28 16:51:45,287 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:44,313] DEBUG {config.py:read_property} - Reading property: enable.data.publisher = false
+2015-08-28 16:51:45,287 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:44,313] INFO {logpublisher.py:read_config} - Data Publisher disabled
+2015-08-28 16:51:45,287 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:44,315] DEBUG {subscriber.py:on_message} - Message received: instance/status/InstanceStartedEvent:
+2015-08-28 16:51:45,287 [-] [Thread-15] INFO ADCMTAppTest {
+2015-08-28 16:51:45,287 [-] [Thread-15] INFO ADCMTAppTest "applicationId": "application-3",
+2015-08-28 16:51:45,287 [-] [Thread-15] INFO ADCMTAppTest "clusterId": "tomcat.domain",
+2015-08-28 16:51:45,287 [-] [Thread-15] INFO ADCMTAppTest "clusterInstanceId": "cluster-1-instance-1",
+2015-08-28 16:51:45,287 [-] [Thread-15] INFO ADCMTAppTest "instanceId": null,
+2015-08-28 16:51:45,287 [-] [Thread-15] INFO ADCMTAppTest "memberId": "tomcat.member-1",
+2015-08-28 16:51:45,287 [-] [Thread-15] INFO ADCMTAppTest "networkPartitionId": "network-p1",
+2015-08-28 16:51:45,287 [-] [Thread-15] INFO ADCMTAppTest "partitionId": "p1",
+2015-08-28 16:51:45,287 [-] [Thread-15] INFO ADCMTAppTest "serviceName": "tomcat-mt"
+2015-08-28 16:51:45,287 [-] [Thread-15] INFO ADCMTAppTest }
+2015-08-28 16:51:45,287 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:44,315] DEBUG {subscriber.py:run} - Event handler not found for event : 'InstanceStartedEvent'
+2015-08-28 16:51:45,306 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:45,284] DEBUG {subscriber.py:on_message} - Message received: instance/notifier/ArtifactUpdatedEvent:
+2015-08-28 16:51:45,306 [-] [Thread-14] INFO PythonAgentTestManager {"clusterId":"tomcat.domain","repoURL":"https://bitbucket.org/testapache2211/opentestrepo1.git","tenantId":"-1234","commitEnabled":false}
+2015-08-28 16:51:45,306 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:45,284] DEBUG {subscriber.py:run} - Executing handler for event 'ArtifactUpdatedEvent'
+2015-08-28 16:51:45,306 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:45,284] INFO {eventhandler.py:on_artifact_updated_event} - Processing Artifact update event: [tenant] -1234 [cluster] tomcat.domain [status] None
+2015-08-28 16:51:45,307 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:45,284] INFO {eventhandler.py:on_artifact_updated_event} - Executing git checkout
+2015-08-28 16:51:45,307 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:45,285] DEBUG {eventhandler.py:get_repo_path_for_tenant} - Repo path returned : '/tmp/pca-test-suite-2/repository/deployment/server/'
+2015-08-28 16:51:45,308 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:45,285] DEBUG {agentgithandler.py:checkout} - Cloning artifacts from https://bitbucket.org/testapache2211/opentestrepo1.git for the first time to /tmp/pca-test-suite-2/repository/deployment/server/
+2015-08-28 16:51:45,308 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:45,285] DEBUG {agentgithandler.py:checkout} - Executing git clone: [tenant-id] -1234 [repo-url] https://bitbucket.org/testapache2211/opentestrepo1.git, [repo path] /tmp/pca-test-suite-2/repository/deployment/server/
+2015-08-28 16:51:46,288 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:45,284] DEBUG {subscriber.py:on_message} - Message received: instance/notifier/ArtifactUpdatedEvent:
+2015-08-28 16:51:46,288 [-] [Thread-15] INFO ADCMTAppTest {"clusterId":"tomcat.domain","repoURL":"https://bitbucket.org/testapache2211/opentestrepo1.git","tenantId":"-1234","commitEnabled":false}
+2015-08-28 16:51:46,288 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:45,284] DEBUG {subscriber.py:run} - Executing handler for event 'ArtifactUpdatedEvent'
+2015-08-28 16:51:46,288 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:45,284] INFO {eventhandler.py:on_artifact_updated_event} - Processing Artifact update event: [tenant] -1234 [cluster] tomcat.domain [status] None
+2015-08-28 16:51:46,288 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:45,284] INFO {eventhandler.py:on_artifact_updated_event} - Executing git checkout
+2015-08-28 16:51:46,288 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:45,285] DEBUG {eventhandler.py:get_repo_path_for_tenant} - Repo path returned : '/tmp/pca-test-suite-2/repository/deployment/server/'
+2015-08-28 16:51:46,288 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:45,285] DEBUG {agentgithandler.py:checkout} - Cloning artifacts from https://bitbucket.org/testapache2211/opentestrepo1.git for the first time to /tmp/pca-test-suite-2/repository/deployment/server/
+2015-08-28 16:51:46,288 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:45,285] DEBUG {agentgithandler.py:checkout} - Executing git clone: [tenant-id] -1234 [repo-url] https://bitbucket.org/testapache2211/opentestrepo1.git, [repo path] /tmp/pca-test-suite-2/repository/deployment/server/
+2015-08-28 16:51:49,372 [-] [Thread-7] INFO PythonAgentTestManager Client connected to port 8080
+2015-08-28 16:51:49,421 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:49,360] INFO {agentgithandler.py:clone} - Git clone operation for tenant -1234 successful
+2015-08-28 16:51:49,421 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:49,360] DEBUG {agentgithandler.py:checkout} - Git clone executed: [tenant-id] -1234 [repo-url] https://bitbucket.org/testapache2211/opentestrepo1.git
+2015-08-28 16:51:49,421 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:49,360] DEBUG {config.py:read_property} - Reading property: param.file.path = /home/akila/Documents/ASF/stratos-ravihansa3000.git/products/python-cartridge-agent/integration/target/d172cc3f-19ec-49a3-9d52-909804158deb/apache-stratos-python-cartridge-agent-4.1.2/payload/launch-params
+2015-08-28 16:51:49,421 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:49,360] DEBUG {eventhandler.py:execute_extension_for_event} - Executing extension for event [ArtifactUpdatedEvent]
+2015-08-28 16:51:49,421 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:49,361] DEBUG {ExtensionExecutor.py:run_plugin} - Running extension for ArtifactUpdatedEvent
+2015-08-28 16:51:49,421 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:49,361] DEBUG {ExtensionExecutor.py:execute_script} - Execute bash script :: /home/akila/Documents/ASF/stratos-ravihansa3000.git/products/python-cartridge-agent/integration/target/d172cc3f-19ec-49a3-9d52-909804158deb/apache-stratos-python-cartridge-agent-4.1.2/extensions/bash/ArtifactUpdatedEvent.sh
+2015-08-28 16:51:49,422 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:49,370] INFO {ExtensionExecutor.py:run_plugin} - ArtifactUpdatedEvent Extension executed. [output]: Fri Aug 28 16:51:49 IST 2015: Artifacts updated event shell extension executed
+2015-08-28 16:51:49,422 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:49,371] DEBUG {eventhandler.py:execute_plugins_for_event} - No plugins registered for event ArtifactUpdatedEvent
+2015-08-28 16:51:49,422 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:49,371] DEBUG {config.py:read_property} - Reading property: port.check.timeout = 600000
+2015-08-28 16:51:49,422 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:49,372] DEBUG {cartridgeagentutils.py:wait_until_ports_active} - Port check timeout: 600000
+2015-08-28 16:51:49,422 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:49,372] INFO {cartridgeagentutils.py:wait_until_ports_active} - Waiting for ports to be active: [ip] 'localhost' [ports] ['8080']
+2015-08-28 16:51:49,422 [-] [Thread-14] INFO PythonAgentTestManager [2015-08-28 16:51:49,372] DEBUG {cartridgeagentutils.py:check_ports_active} - Port '8080' is active
+2015-08-28 16:51:50,289 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:49,360] INFO {agentgithandler.py:clone} - Git clone operation for tenant -1234 successful
+2015-08-28 16:51:50,290 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:49,360] DEBUG {agentgithandler.py:checkout} - Git clone executed: [tenant-id] -1234 [repo-url] https://bitbucket.org/testapache2211/opentestrepo1.git
+2015-08-28 16:51:50,290 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:49,360] DEBUG {config.py:read_property} - Reading property: param.file.path = /home/akila/Documents/ASF/stratos-ravihansa3000.git/products/python-cartridge-agent/integration/target/d172cc3f-19ec-49a3-9d52-909804158deb/apache-stratos-python-cartridge-agent-4.1.2/payload/launch-params
+2015-08-28 16:51:50,290 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:49,360] DEBUG {eventhandler.py:execute_extension_for_event} - Executing extension for event [ArtifactUpdatedEvent]
+2015-08-28 16:51:50,290 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:49,361] DEBUG {ExtensionExecutor.py:run_plugin} - Running extension for ArtifactUpdatedEvent
+2015-08-28 16:51:50,290 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:49,361] DEBUG {ExtensionExecutor.py:execute_script} - Execute bash script :: /home/akila/Documents/ASF/stratos-ravihansa3000.git/products/python-cartridge-agent/integration/target/d172cc3f-19ec-49a3-9d52-909804158deb/apache-stratos-python-cartridge-agent-4.1.2/extensions/bash/ArtifactUpdatedEvent.sh
+2015-08-28 16:51:50,290 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:49,370] INFO {ExtensionExecutor.py:run_plugin} - ArtifactUpdatedEvent Extension executed. [output]: Fri Aug 28 16:51:49 IST 2015: Artifacts updated event shell extension executed
+2015-08-28 16:51:50,290 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:49,371] DEBUG {eventhandler.py:execute_plugins_for_event} - No plugins registered for event ArtifactUpdatedEvent
+2015-08-28 16:51:50,290 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:49,371] DEBUG {config.py:read_property} - Reading property: port.check.timeout = 600000
+2015-08-28 16:51:50,290 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:49,372] DEBUG {cartridgeagentutils.py:wait_until_ports_active} - Port check timeout: 600000
+2015-08-28 16:51:50,290 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:49,372] INFO {cartridgeagentutils.py:wait_until_ports_active} - Waiting for ports to be active: [ip] 'localhost' [ports] ['8080']
+2015-08-28 16:51:50,290 [-] [Thread-15] INFO ADCMTAppTest [2015-08-28 16:51:49,372] DEBUG {cartridgeagentutils.py:check_ports_active} - P
<TRUNCATED>
[3/3] stratos git commit: Fixing health stat publisher in PCA,
adding MT app integration test to PCA
Posted by ra...@apache.org.
Fixing health stat publisher in PCA, adding MT app integration test to PCA
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/64368325
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/64368325
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/64368325
Branch: refs/heads/stratos-4.1.x
Commit: 643683259d1b240ed594c27c6ad013f655c32fcb
Parents: 6ed9bf6
Author: Akila Perera <ra...@gmail.com>
Authored: Fri Aug 28 18:37:29 2015 +0530
Committer: Akila Perera <ra...@gmail.com>
Committed: Fri Aug 28 18:38:14 2015 +0530
----------------------------------------------------------------------
.../cartridge.agent/modules/databridge/agent.py | 2 +-
.../modules/databridge/thrift/publisher.py | 6 +-
.../integration/cartridge-agent.log | 3372 ++++++++++++++++++
.../python-cartridge-agent/integration/pom.xml | 20 +-
.../test/ADCMTAppTest.java | 213 ++
.../python.cartridge.agent/test/ADCTest.java | 138 +-
.../test/AgentStartupTest.java | 149 +
.../test/PythonAgentTestManager.java | 455 +++
.../test/PythonTestManager.java | 411 ---
.../test/StartUpTest.java | 171 -
.../src/test/resources/pca-testing1.xml | 2 +-
.../src/test/resources/pca-testing3.xml | 29 +
.../src/test/resources/suite-1/agent.conf | 3 +-
.../src/test/resources/suite-2/agent.conf | 3 +-
.../src/test/resources/suite-3/agent.conf | 45 +
.../src/test/resources/suite-3/jndi.properties | 22 +
.../src/test/resources/suite-3/logging.ini | 52 +
.../resources/suite-3/payload/launch-params | 2 +
18 files changed, 4422 insertions(+), 673 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/64368325/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/modules/databridge/agent.py
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/modules/databridge/agent.py b/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/modules/databridge/agent.py
index a17a589..533cf20 100644
--- a/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/modules/databridge/agent.py
+++ b/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/modules/databridge/agent.py
@@ -142,7 +142,7 @@ class ThriftPublisher(Thread):
except ValueError:
raise RuntimeError("Port number for Thrift Publisher is invalid: %r" % port)
- self.__publisher = Publisher(ip, port_number)
+ self.__publisher = Publisher(ip, port_number, stream_definition)
#self.__publisher.defineStream(str(stream_definition))
self.stream_definition = stream_definition
self.stream_id = self.__publisher.streamId
http://git-wip-us.apache.org/repos/asf/stratos/blob/64368325/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/modules/databridge/thrift/publisher.py
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/modules/databridge/thrift/publisher.py b/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/modules/databridge/thrift/publisher.py
index ea87718..e607d1b 100644
--- a/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/modules/databridge/thrift/publisher.py
+++ b/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/modules/databridge/thrift/publisher.py
@@ -31,7 +31,7 @@ from thrift.protocol import TBinaryProtocol
class Publisher:
client = None
- def __init__(self, ip, port):
+ def __init__(self, ip, port, stream_definition):
# Make SSL socket
self.socket = TSSLSocket.TSSLSocket(ip, port, False)
# Buffering is critical. Raw sockets are very slow
@@ -40,8 +40,7 @@ class Publisher:
self.protocol = TBinaryProtocol.TBinaryProtocol(self.transport)
self.sessionId = None
self.streamId = None
-
- # self.event_num = 0
+ self.streamDef = stream_definition
def connect(self, username, password):
# Create a client to use the protocol encoder
@@ -51,6 +50,7 @@ class Publisher:
self.socket.open()
self.transport.open()
self.sessionId = Publisher.client.connect(username, password)
+ self.streamId = Publisher.client.defineStream(self.sessionId, self.streamDef)
def defineStream(self, streamDef):
# Create Stream Definition