You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2016/05/06 06:51:30 UTC
[1/3] camel git commit: Fixed test
Repository: camel
Updated Branches:
refs/heads/master d10d5b33f -> f3a0f9397
Fixed test
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/dc7a21c6
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/dc7a21c6
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/dc7a21c6
Branch: refs/heads/master
Commit: dc7a21c6607d105abf49db6d673dc1cfeb4beb00
Parents: d10d5b3
Author: Claus Ibsen <da...@apache.org>
Authored: Fri May 6 08:41:41 2016 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Fri May 6 08:41:41 2016 +0200
----------------------------------------------------------------------
.../component/undertow/UndertowPrefixMatchingTest.java | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/dc7a21c6/components/camel-undertow/src/test/java/org/apache/camel/component/undertow/UndertowPrefixMatchingTest.java
----------------------------------------------------------------------
diff --git a/components/camel-undertow/src/test/java/org/apache/camel/component/undertow/UndertowPrefixMatchingTest.java b/components/camel-undertow/src/test/java/org/apache/camel/component/undertow/UndertowPrefixMatchingTest.java
index dd227d8..f243b45 100644
--- a/components/camel-undertow/src/test/java/org/apache/camel/component/undertow/UndertowPrefixMatchingTest.java
+++ b/components/camel-undertow/src/test/java/org/apache/camel/component/undertow/UndertowPrefixMatchingTest.java
@@ -21,23 +21,19 @@ import org.apache.camel.Exchange;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.http.common.HttpOperationFailedException;
import org.junit.Test;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
public class UndertowPrefixMatchingTest extends BaseUndertowTest {
- private static final Logger LOG = LoggerFactory.getLogger(UndertowComponentTest.class);
@Test
public void passOnExactPath() throws Exception {
- Exchange response = template.requestBody("http://localhost:{{port}}/myapp/suffix", "Hello Camel!", Exchange.class);
+ template.requestBody("http://localhost:{{port}}/myapp/suffix", "Hello Camel!");
getMockEndpoint("mock:myapp").expectedHeaderReceived(Exchange.HTTP_RESPONSE_CODE, 200);
}
@Test
public void failsOnPrefixPath() throws Exception {
-
try {
- String response = template.requestBody("http://localhost:{{port}}/myapp", "Hello Camel!", String.class);
+ template.requestBody("http://localhost:{{port}}/myapp", "Hello Camel!");
fail("Should fail, something is wrong");
} catch (CamelExecutionException ex) {
HttpOperationFailedException cause = assertIsInstanceOf(HttpOperationFailedException.class, ex.getCause());
@@ -47,11 +43,10 @@ public class UndertowPrefixMatchingTest extends BaseUndertowTest {
@Test
public void passOnPrefixPath() throws Exception {
- Exchange response = template.requestBody("http://localhost:{{port}}/bar/somethingNotImportant", "Hello Camel!", Exchange.class);
+ template.requestBody("http://localhost:{{port}}/bar/somethingNotImportant", "Hello Camel!");
getMockEndpoint("mock:myapp").expectedHeaderReceived(Exchange.HTTP_RESPONSE_CODE, 200);
}
-
@Override
protected RouteBuilder createRouteBuilder() throws Exception {
return new RouteBuilder() {
[3/3] camel git commit: Fixed test
Posted by da...@apache.org.
Fixed test
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/f3a0f939
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/f3a0f939
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/f3a0f939
Branch: refs/heads/master
Commit: f3a0f9397c75233cd028e224a91d70b7c97d5ee5
Parents: a22289b
Author: Claus Ibsen <da...@apache.org>
Authored: Fri May 6 08:50:34 2016 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Fri May 6 08:50:34 2016 +0200
----------------------------------------------------------------------
.../org/apache/camel/component/ignite/IgniteCacheTest.java | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/f3a0f939/components/camel-ignite/src/test/java/org/apache/camel/component/ignite/IgniteCacheTest.java
----------------------------------------------------------------------
diff --git a/components/camel-ignite/src/test/java/org/apache/camel/component/ignite/IgniteCacheTest.java b/components/camel-ignite/src/test/java/org/apache/camel/component/ignite/IgniteCacheTest.java
index b936e1b..74edfa6 100644
--- a/components/camel-ignite/src/test/java/org/apache/camel/component/ignite/IgniteCacheTest.java
+++ b/components/camel-ignite/src/test/java/org/apache/camel/component/ignite/IgniteCacheTest.java
@@ -16,10 +16,8 @@
*/
package org.apache.camel.component.ignite;
-
-import java.util.ArrayList;
import java.util.HashSet;
-import java.util.Iterator;
+import java.util.List;
import java.util.Map;
import java.util.Set;
@@ -27,8 +25,6 @@ import javax.cache.Cache.Entry;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
-import com.google.common.collect.Iterators;
-import com.google.common.collect.Lists;
import org.apache.camel.CamelException;
import org.apache.camel.component.ignite.cache.IgniteCacheOperation;
@@ -124,8 +120,7 @@ public class IgniteCacheTest extends AbstractIgniteTest {
}
});
- Iterator<String> iter = template.requestBodyAndHeader("ignite:cache:testcache1?operation=QUERY", keys, IgniteConstants.IGNITE_CACHE_QUERY, query, Iterator.class);
- ArrayList<Object> results = Lists.newArrayList(Iterators.toArray(iter, Object.class));
+ List results = template.requestBodyAndHeader("ignite:cache:testcache1?operation=QUERY", keys, IgniteConstants.IGNITE_CACHE_QUERY, query, List.class);
assert_().that(results.size()).isEqualTo(50);
}
[2/3] camel git commit: Fixed test
Posted by da...@apache.org.
Fixed test
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/a22289b1
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/a22289b1
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/a22289b1
Branch: refs/heads/master
Commit: a22289b1c0b1d9fe768925a06f7a91b521a7b5d2
Parents: dc7a21c
Author: Claus Ibsen <da...@apache.org>
Authored: Fri May 6 08:47:32 2016 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Fri May 6 08:47:32 2016 +0200
----------------------------------------------------------------------
.../camel/component/ahc/javabody/AhcProduceJavaBodyTest.java | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/a22289b1/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/javabody/AhcProduceJavaBodyTest.java
----------------------------------------------------------------------
diff --git a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/javabody/AhcProduceJavaBodyTest.java b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/javabody/AhcProduceJavaBodyTest.java
index 033976e..c4178d2 100644
--- a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/javabody/AhcProduceJavaBodyTest.java
+++ b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/javabody/AhcProduceJavaBodyTest.java
@@ -171,8 +171,9 @@ public class AhcProduceJavaBodyTest extends BaseAhcTest {
});
context.start();
- MyCoolBean reply = template.requestBody(getAhcEndpointUri(), "Hello World", MyCoolBean.class);
- assertNull(reply);
+ Object reply = template.requestBody(getAhcEndpointUri(), "Hello World", Object.class);
+ MyCoolBean bean = context.getTypeConverter().convertTo(MyCoolBean.class, reply);
+ assertNull(bean);
}
@Test