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

[13/50] [abbrv] stratos git commit: PCA - Publish MB events using a thread and timeout after 5 seconds. Improved PCA structure and removed unnecessary threading PCA Live Test - Improved logging, improved MB HA test case

http://git-wip-us.apache.org/repos/asf/stratos/blob/f0740ec0/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/PythonAgentIntegrationTest.java
----------------------------------------------------------------------
diff --git a/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/PythonAgentIntegrationTest.java b/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/PythonAgentIntegrationTest.java
index 6e25b6b..08042b7 100644
--- a/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/PythonAgentIntegrationTest.java
+++ b/products/python-cartridge-agent/modules/integration/test-integration/src/test/java/org/apache/stratos/python/cartridge/agent/integration/tests/PythonAgentIntegrationTest.java
@@ -48,7 +48,7 @@ import java.util.concurrent.ExecutorService;
 import java.util.zip.ZipEntry;
 import java.util.zip.ZipInputStream;
 
-public class PythonAgentIntegrationTest {
+public abstract class PythonAgentIntegrationTest {
 
     public static final String PATH_SEP = File.separator;
     public static final String NEW_LINE = System.getProperty("line.separator");
@@ -219,6 +219,10 @@ public class PythonAgentIntegrationTest {
         this.topologyEventReceiver.terminate();
         this.initializerEventReceiver.terminate();
 
+        this.instanceStatusEventReceiver = null;
+        this.topologyEventReceiver = null;
+        this.initializerEventReceiver = null;
+
         this.instanceActivated = false;
         this.instanceStarted = false;
 
@@ -319,7 +323,7 @@ public class PythonAgentIntegrationTest {
                                     log.error("ERROR found in PCA log", e);
                                 }
                             }
-                            log.debug("[PCA] " + line);
+                            log.debug("[" + getClassName() + "] [PCA] " + line);
                         }
                     }
                     sleep(100);
@@ -330,6 +334,12 @@ public class PythonAgentIntegrationTest {
     }
 
     /**
+     * Return concrete class name
+     * @return
+     */
+    protected abstract String getClassName();
+
+    /**
      * Start server socket
      *
      * @param port Port number of server socket to be started

http://git-wip-us.apache.org/repos/asf/stratos/blob/f0740ec0/products/python-cartridge-agent/modules/integration/test-integration/src/test/resources/MessageBrokerHATestCase/agent.conf
----------------------------------------------------------------------
diff --git a/products/python-cartridge-agent/modules/integration/test-integration/src/test/resources/MessageBrokerHATestCase/agent.conf b/products/python-cartridge-agent/modules/integration/test-integration/src/test/resources/MessageBrokerHATestCase/agent.conf
index c6c55f3..770a548 100644
--- a/products/python-cartridge-agent/modules/integration/test-integration/src/test/resources/MessageBrokerHATestCase/agent.conf
+++ b/products/python-cartridge-agent/modules/integration/test-integration/src/test/resources/MessageBrokerHATestCase/agent.conf
@@ -19,7 +19,7 @@
 mb.urls                               =localhost:1885,localhost:1886,localhost:1887
 mb.username                           =system
 mb.password                           =manager
-mb.publisher.timeout                  =20
+mb.publisher.timeout                  =200
 listen.address                        =localhost
 thrift.receiver.urls                  =localhost:7712
 thrift.server.admin.username          =admin

http://git-wip-us.apache.org/repos/asf/stratos/blob/f0740ec0/products/python-cartridge-agent/modules/integration/test-integration/src/test/resources/log4j.properties
----------------------------------------------------------------------
diff --git a/products/python-cartridge-agent/modules/integration/test-integration/src/test/resources/log4j.properties b/products/python-cartridge-agent/modules/integration/test-integration/src/test/resources/log4j.properties
index 759bbb4..74b61aa 100644
--- a/products/python-cartridge-agent/modules/integration/test-integration/src/test/resources/log4j.properties
+++ b/products/python-cartridge-agent/modules/integration/test-integration/src/test/resources/log4j.properties
@@ -31,7 +31,7 @@ log4j.additivity.org.apache.stratos.python.cartridge.agent.integration.tests.Pyt
 log4j.appender.stdout=org.apache.log4j.ConsoleAppender
 #log4j.appender.stdout.Target=System.out
 log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
-log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p {%c}:%L - %m%n
+log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p {%c{1}}:%L - %m%n
 log4j.appender.stdout.threshold=DEBUG
 
 

http://git-wip-us.apache.org/repos/asf/stratos/blob/f0740ec0/products/python-cartridge-agent/modules/integration/test-integration/src/test/resources/test-suite-all.xml
----------------------------------------------------------------------
diff --git a/products/python-cartridge-agent/modules/integration/test-integration/src/test/resources/test-suite-all.xml b/products/python-cartridge-agent/modules/integration/test-integration/src/test/resources/test-suite-all.xml
index d8e342f..0e87501 100755
--- a/products/python-cartridge-agent/modules/integration/test-integration/src/test/resources/test-suite-all.xml
+++ b/products/python-cartridge-agent/modules/integration/test-integration/src/test/resources/test-suite-all.xml
@@ -24,6 +24,7 @@
     <test name="all" preserve-order="true" parallel="false">
         <groups>
             <run>
+                <exclude name="ha"/>
                 <exclude name="failed"/>
                 <exclude name="disabled"/>
             </run>

http://git-wip-us.apache.org/repos/asf/stratos/blob/f0740ec0/products/python-cartridge-agent/modules/integration/test-integration/src/test/resources/test-suite-smoke.xml
----------------------------------------------------------------------
diff --git a/products/python-cartridge-agent/modules/integration/test-integration/src/test/resources/test-suite-smoke.xml b/products/python-cartridge-agent/modules/integration/test-integration/src/test/resources/test-suite-smoke.xml
index bcac412..77aeb2d 100755
--- a/products/python-cartridge-agent/modules/integration/test-integration/src/test/resources/test-suite-smoke.xml
+++ b/products/python-cartridge-agent/modules/integration/test-integration/src/test/resources/test-suite-smoke.xml
@@ -25,6 +25,8 @@
         <groups>
             <run>
                 <include name="smoke"/>
+                <!--<include name="ha"/>-->
+                <exclude name="ha"/>
                 <exclude name="failed"/>
                 <exclude name="disabled"/>
             </run>