You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by cl...@apache.org on 2015/09/08 17:09:47 UTC

activemq-artemis git commit: test fixes on windows

Repository: activemq-artemis
Updated Branches:
  refs/heads/master 8843a9ee1 -> 20006b6e9


test fixes on windows


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

Branch: refs/heads/master
Commit: 20006b6e9df5f5689d2275ead6283c9174703e40
Parents: 8843a9e
Author: Clebert Suconic <cl...@apache.org>
Authored: Tue Sep 8 11:05:19 2015 -0400
Committer: Clebert Suconic <cl...@apache.org>
Committed: Tue Sep 8 11:08:34 2015 -0400

----------------------------------------------------------------------
 .../apache/activemq/cli/test/ArtemisTest.java   | 21 +++++++++++++++-----
 1 file changed, 16 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/20006b6e/artemis-cli/src/test/java/org/apache/activemq/cli/test/ArtemisTest.java
----------------------------------------------------------------------
diff --git a/artemis-cli/src/test/java/org/apache/activemq/cli/test/ArtemisTest.java b/artemis-cli/src/test/java/org/apache/activemq/cli/test/ArtemisTest.java
index 1ec7601..df2ec38 100644
--- a/artemis-cli/src/test/java/org/apache/activemq/cli/test/ArtemisTest.java
+++ b/artemis-cli/src/test/java/org/apache/activemq/cli/test/ArtemisTest.java
@@ -64,12 +64,17 @@ public class ArtemisTest {
 
    @Test
    public void invalidCliDoesntThrowException() {
-      testCli("create");
+      testCli("--silent", "create");
    }
 
    @Test
    public void invalidPathDoesntThrowException() {
-      testCli("create", "/rawr");
+      if (isWindows()) {
+         testCli("create", "zzzzz:/rawr", "--silent");
+      }
+      else {
+         testCli("create", "/rawr", "--silent");
+      }
    }
 
    @Test
@@ -90,7 +95,7 @@ public class ArtemisTest {
       String queues = "q1,t2";
       String topics = "t1,t2";
       Run.setEmbedded(true);
-      Artemis.main("create", temporaryFolder.getRoot().getAbsolutePath(), "--force", "--silent", "--no-web", "--queues", queues, "--topics", topics);
+      Artemis.main("create", temporaryFolder.getRoot().getAbsolutePath(), "--force", "--silent", "--no-web", "--queues", queues, "--topics", topics, "--no-autotune");
       System.setProperty("artemis.instance", temporaryFolder.getRoot().getAbsolutePath());
       // Some exceptions may happen on the initialization, but they should be ok on start the basic core protocol
       Artemis.internalExecute("run");
@@ -108,8 +113,8 @@ public class ArtemisTest {
          }
       }
 
-      Assert.assertEquals(Integer.valueOf(1000), Artemis.internalExecute("producer", "--message-count", "1000", "--verbose"));
-      Assert.assertEquals(Integer.valueOf(1000), Artemis.internalExecute("consumer", "--verbose", "--break-on-null", "--receive-timeout", "100"));
+      Assert.assertEquals(Integer.valueOf(100), Artemis.internalExecute("producer", "--message-count", "100", "--verbose"));
+      Assert.assertEquals(Integer.valueOf(100), Artemis.internalExecute("consumer", "--verbose", "--break-on-null", "--receive-timeout", "100"));
 
       ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory("tcp://localhost:61616");
       Connection connection = cf.createConnection();
@@ -160,4 +165,10 @@ public class ArtemisTest {
          Assert.fail("Exception caught " + e.getMessage());
       }
    }
+
+
+   public boolean isWindows() {
+      return System.getProperty("os.name", "null").toLowerCase().indexOf("win") >= 0;
+
+   }
 }