camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject camel git commit: Fixed test on windows
Date Thu, 05 Mar 2015 09:59:51 GMT
Repository: camel
Updated Branches:
  refs/heads/master 6465184d1 -> ef186eea8


Fixed test on windows


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

Branch: refs/heads/master
Commit: ef186eea8b33e67e6ca2ede178d574cf673bff2b
Parents: 6465184
Author: Claus Ibsen <claus.ibsen@gmail.com>
Authored: Thu Mar 5 11:01:07 2015 +0100
Committer: Claus Ibsen <claus.ibsen@gmail.com>
Committed: Thu Mar 5 11:01:07 2015 +0100

----------------------------------------------------------------------
 .../camel/component/beanstalk/AwaitingConsumerTest.java      | 8 ++++++++
 .../camel/component/beanstalk/BeanstalkMockTestSupport.java  | 5 +++++
 .../camel/component/beanstalk/ConsumerCompletionTest.java    | 8 ++++++++
 .../camel/component/beanstalk/ImmediateConsumerTest.java     | 4 ++++
 4 files changed, 25 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/ef186eea/components/camel-beanstalk/src/test/java/org/apache/camel/component/beanstalk/AwaitingConsumerTest.java
----------------------------------------------------------------------
diff --git a/components/camel-beanstalk/src/test/java/org/apache/camel/component/beanstalk/AwaitingConsumerTest.java
b/components/camel-beanstalk/src/test/java/org/apache/camel/component/beanstalk/AwaitingConsumerTest.java
index fa75a17..3921562 100644
--- a/components/camel-beanstalk/src/test/java/org/apache/camel/component/beanstalk/AwaitingConsumerTest.java
+++ b/components/camel-beanstalk/src/test/java/org/apache/camel/component/beanstalk/AwaitingConsumerTest.java
@@ -39,6 +39,10 @@ public class AwaitingConsumerTest extends BeanstalkMockTestSupport {
 
     @Test
     public void testReceive() throws Exception {
+        if (!canTest()) {
+            return;
+        }
+
         final Job jobMock = mock(Job.class);
         final long jobId = 111;
         final byte[] payload = Helper.stringToBytes(testMessage);
@@ -62,6 +66,10 @@ public class AwaitingConsumerTest extends BeanstalkMockTestSupport {
 
     @Test
     public void testBeanstalkException() throws Exception {
+        if (!canTest()) {
+            return;
+        }
+
         final Job jobMock = mock(Job.class);
         final long jobId = 111;
         final byte[] payload = Helper.stringToBytes(testMessage);

http://git-wip-us.apache.org/repos/asf/camel/blob/ef186eea/components/camel-beanstalk/src/test/java/org/apache/camel/component/beanstalk/BeanstalkMockTestSupport.java
----------------------------------------------------------------------
diff --git a/components/camel-beanstalk/src/test/java/org/apache/camel/component/beanstalk/BeanstalkMockTestSupport.java
b/components/camel-beanstalk/src/test/java/org/apache/camel/component/beanstalk/BeanstalkMockTestSupport.java
index 172849c..6530fea 100644
--- a/components/camel-beanstalk/src/test/java/org/apache/camel/component/beanstalk/BeanstalkMockTestSupport.java
+++ b/components/camel-beanstalk/src/test/java/org/apache/camel/component/beanstalk/BeanstalkMockTestSupport.java
@@ -29,6 +29,11 @@ public class BeanstalkMockTestSupport extends CamelTestSupport {
     @Mock
     Client client;
 
+    public boolean canTest() {
+        // cannot test on windows
+        return !isPlatform("windows");
+    }
+
     @Before
     @Override
     public void setUp() throws Exception {

http://git-wip-us.apache.org/repos/asf/camel/blob/ef186eea/components/camel-beanstalk/src/test/java/org/apache/camel/component/beanstalk/ConsumerCompletionTest.java
----------------------------------------------------------------------
diff --git a/components/camel-beanstalk/src/test/java/org/apache/camel/component/beanstalk/ConsumerCompletionTest.java
b/components/camel-beanstalk/src/test/java/org/apache/camel/component/beanstalk/ConsumerCompletionTest.java
index 0ed59c1..40d9437 100644
--- a/components/camel-beanstalk/src/test/java/org/apache/camel/component/beanstalk/ConsumerCompletionTest.java
+++ b/components/camel-beanstalk/src/test/java/org/apache/camel/component/beanstalk/ConsumerCompletionTest.java
@@ -46,6 +46,10 @@ public class ConsumerCompletionTest extends BeanstalkMockTestSupport {
 
     @Test
     public void testDeleteOnComplete() throws Exception {
+        if (!canTest()) {
+            return;
+        }
+
         final long jobId = 111;
         final byte[] payload = Helper.stringToBytes(testMessage);
         final Job jobMock = mock(Job.class);
@@ -92,6 +96,10 @@ public class ConsumerCompletionTest extends BeanstalkMockTestSupport {
 
     @Test
     public void testBeanstalkException() throws Exception {
+        if (!canTest()) {
+            return;
+        }
+
         shouldIdie = false;
         final Job jobMock = mock(Job.class);
         final long jobId = 111;

http://git-wip-us.apache.org/repos/asf/camel/blob/ef186eea/components/camel-beanstalk/src/test/java/org/apache/camel/component/beanstalk/ImmediateConsumerTest.java
----------------------------------------------------------------------
diff --git a/components/camel-beanstalk/src/test/java/org/apache/camel/component/beanstalk/ImmediateConsumerTest.java
b/components/camel-beanstalk/src/test/java/org/apache/camel/component/beanstalk/ImmediateConsumerTest.java
index 3d3248e..f168d10 100644
--- a/components/camel-beanstalk/src/test/java/org/apache/camel/component/beanstalk/ImmediateConsumerTest.java
+++ b/components/camel-beanstalk/src/test/java/org/apache/camel/component/beanstalk/ImmediateConsumerTest.java
@@ -45,6 +45,10 @@ public class ImmediateConsumerTest extends BeanstalkMockTestSupport {
 
     @Test
     public void testDeleteOnSuccess() throws Exception {
+        if (!canTest()) {
+            return;
+        }
+
         final Job jobMock = mock(Job.class);
         final long jobId = 111;
         final byte[] payload = Helper.stringToBytes(testMessage);


Mime
View raw message