activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject [15/48] activemq-artemis git commit: included more tests fixed some test issues
Date Tue, 16 Feb 2016 20:10:29 GMT
included more tests
fixed some test issues


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/0e74c7eb
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/0e74c7eb
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/0e74c7eb

Branch: refs/heads/refactor-openwire
Commit: 0e74c7eb2ad6876c7bc722558ebbe35415ea46c1
Parents: 24a48ec
Author: Howard Gao <howard.gao@gmail.com>
Authored: Wed Feb 3 22:47:21 2016 +0800
Committer: clebert suconic <clebertsuconic@cleberts-MacBook-Pro.local>
Committed: Tue Feb 16 15:09:01 2016 -0500

----------------------------------------------------------------------
 tests/activemq5-unit-tests/pom.xml                              | 5 +++--
 .../org/apache/activemq/transport/tcp/TcpTransportFactory.java  | 4 ++++
 .../java/org/apache/activemq/EmbeddedBrokerTestSupport.java     | 4 +++-
 .../test/java/org/apache/activemq/ExclusiveConsumerTest.java    | 1 +
 .../java/org/apache/activemq/ReconnectWithSameClientIDTest.java | 2 +-
 .../test/java/org/apache/activemq/TransactionContextTest.java   | 4 +++-
 .../java/org/apache/activemq/test/JmsTopicSendReceiveTest.java  | 2 ++
 .../org/apache/activemq/transport/tcp/TransportUriTest.java     | 1 +
 8 files changed, 18 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/0e74c7eb/tests/activemq5-unit-tests/pom.xml
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/pom.xml b/tests/activemq5-unit-tests/pom.xml
index 0f7c9ac..2782627 100644
--- a/tests/activemq5-unit-tests/pom.xml
+++ b/tests/activemq5-unit-tests/pom.xml
@@ -416,11 +416,13 @@
             <configuration>
                <skipTests>${skipActiveMQ5Tests}</skipTests>
                <includes>
-                  <!-- include this first three packages -->
+                  <!-- included packages -->
                   <include>**/org/apache/activemq/*Test.java</include>
                   <include>**/org/apache/activemq/command/*Test.java</include>
                   <include>**/org/apache/activemq/openwire/*Test.java</include>
                   <include>**/org/apache/activemq/transport/tcp/*Test.java</include>
+                  <include>**/org/apache/activemq/transport/failover/*Test.java</include>
+                  <include>**/org/apache/activemq/transport/*Test.java</include>
                   <!-- tests that are known to pass-->
                   <include>**/org/apache/activemq/blob/BlobTransferPolicyUriTest.java</include>
                </includes>
@@ -430,7 +432,6 @@
                   <exclude>**/org/apache/activemq/ProducerFlowControlTest.java</exclude>
                   <!-- exclude tests that are on client side only -->
                   <exclude>**/org/apache/activemq/transport/tcp/TransportConnectorInvalidSocketOptionsTest.java</exclude>
-                  <exclude>**/org/apache/activemq/transport/tcp/TransportUriTest.java</exclude>
                </excludes>
             </configuration>
          </plugin>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/0e74c7eb/tests/activemq5-unit-tests/src/main/java/org/apache/activemq/transport/tcp/TcpTransportFactory.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/main/java/org/apache/activemq/transport/tcp/TcpTransportFactory.java
b/tests/activemq5-unit-tests/src/main/java/org/apache/activemq/transport/tcp/TcpTransportFactory.java
index 0843d3a..b3ac85f 100644
--- a/tests/activemq5-unit-tests/src/main/java/org/apache/activemq/transport/tcp/TcpTransportFactory.java
+++ b/tests/activemq5-unit-tests/src/main/java/org/apache/activemq/transport/tcp/TcpTransportFactory.java
@@ -67,6 +67,10 @@ public class TcpTransportFactory extends TransportFactory {
             System.out.println("bound: " + brokerId);
          }
       }
+      //remove unused invm parameters
+      params.remove("broker.persistent");
+      params.remove("broker.useJmx");
+      params.remove("marshal");
       URI location2 = URISupport.createRemainingURI(location, params);
       return super.doConnect(location2);
    }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/0e74c7eb/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/EmbeddedBrokerTestSupport.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/EmbeddedBrokerTestSupport.java
b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/EmbeddedBrokerTestSupport.java
index b8dea70..1e6a227 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/EmbeddedBrokerTestSupport.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/EmbeddedBrokerTestSupport.java
@@ -46,13 +46,14 @@ public abstract class EmbeddedBrokerTestSupport extends CombinationTestSupport
{
    protected boolean useTopic;
    protected ActiveMQDestination destination;
    protected JmsTemplate template;
+   protected boolean disableWrapper = false;
 
    public TemporaryFolder temporaryFolder;
 
    public String CLUSTER_PASSWORD = "OPENWIRECLUSTER";
 
    protected void setUp() throws Exception {
-      BrokerService.disableWrapper = true;
+      BrokerService.disableWrapper = disableWrapper;
       File tmpRoot = new File("./target/tmp");
       tmpRoot.mkdirs();
       temporaryFolder = new TemporaryFolder(tmpRoot);
@@ -78,6 +79,7 @@ public abstract class EmbeddedBrokerTestSupport extends CombinationTestSupport
{
       if (artemisBroker != null) {
          try {
             artemisBroker.stop();
+            artemisBroker = null;
          }
          catch (Exception e) {
          }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/0e74c7eb/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ExclusiveConsumerTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ExclusiveConsumerTest.java
b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ExclusiveConsumerTest.java
index 0287a77..b2c1d8a 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ExclusiveConsumerTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ExclusiveConsumerTest.java
@@ -26,6 +26,7 @@ import javax.jms.Session;
 
 import junit.framework.TestCase;
 
+import org.apache.activemq.artemiswrapper.ArtemisBrokerHelper;
 import org.apache.activemq.command.ActiveMQQueue;
 
 public class ExclusiveConsumerTest extends TestCase {

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/0e74c7eb/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ReconnectWithSameClientIDTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ReconnectWithSameClientIDTest.java
b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ReconnectWithSameClientIDTest.java
index c6f60f8..adda445 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ReconnectWithSameClientIDTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ReconnectWithSameClientIDTest.java
@@ -96,7 +96,7 @@ public class ReconnectWithSameClientIDTest extends EmbeddedBrokerTestSupport
{
 
    @Override
    protected ConnectionFactory createConnectionFactory() throws Exception {
-      return new ActiveMQConnectionFactory((useFailover ? "failover:" : "") + broker.getTransportConnectors().get(0).getPublishableConnectString());
+      return new ActiveMQConnectionFactory((useFailover ? "failover:" : "") + newURI("localhost",
0));
    }
 
    @Override

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/0e74c7eb/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/TransactionContextTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/TransactionContextTest.java
b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/TransactionContextTest.java
index 8d239e7..beab88e 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/TransactionContextTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/TransactionContextTest.java
@@ -42,7 +42,9 @@ public class TransactionContextTest {
 
    @After
    public void tearDown() throws Exception {
-      connection.close();
+      if (connection != null) {
+         connection.close();
+      }
    }
 
    @Test

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/0e74c7eb/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/JmsTopicSendReceiveTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/JmsTopicSendReceiveTest.java
b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/JmsTopicSendReceiveTest.java
index 1cfea7b..28ac25e 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/JmsTopicSendReceiveTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/JmsTopicSendReceiveTest.java
@@ -23,6 +23,7 @@ import javax.jms.MessageConsumer;
 import javax.jms.Session;
 import javax.jms.Topic;
 
+import org.apache.activemq.artemiswrapper.ArtemisBrokerHelper;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -90,6 +91,7 @@ public class JmsTopicSendReceiveTest extends JmsSendReceiveTestSupport {
       /** TODO we should be able to shut down properly */
       session.close();
       connection.close();
+      ArtemisBrokerHelper.stopArtemisBroker();
    }
 
    /**

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/0e74c7eb/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/tcp/TransportUriTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/tcp/TransportUriTest.java
b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/tcp/TransportUriTest.java
index 9d3c347..ce9aff9 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/tcp/TransportUriTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/tcp/TransportUriTest.java
@@ -165,6 +165,7 @@ public class TransportUriTest extends EmbeddedBrokerTestSupport {
 
    @Override
    protected void setUp() throws Exception {
+      disableWrapper = true;
       bindAddress = "tcp://localhost:61616";
       super.setUp();
    }


Mime
View raw message