You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by co...@apache.org on 2019/05/24 19:39:23 UTC

[camel] 01/21: CAMEL-13402 - Updating to Californium 2.0.x

This is an automated email from the ASF dual-hosted git repository.

coheigea pushed a commit to branch camel-2.x
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 8c4f27703f54b594ab1d699c67a506b736fa4797
Author: Colm O hEigeartaigh <co...@apache.org>
AuthorDate: Tue Apr 9 14:45:04 2019 +0100

    CAMEL-13402 - Updating to Californium 2.0.x
---
 .../src/test/java/org/apache/camel/coap/CoAPComponentTest.java      | 4 ++--
 .../src/test/java/org/apache/camel/coap/CoAPMethodRestrictTest.java | 2 +-
 .../src/test/java/org/apache/camel/coap/CoAPRestComponentTest.java  | 6 +++---
 parent/pom.xml                                                      | 2 +-
 4 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPComponentTest.java b/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPComponentTest.java
index 15c317b..62d6009 100644
--- a/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPComponentTest.java
+++ b/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPComponentTest.java
@@ -35,8 +35,8 @@ public class CoAPComponentTest extends CoAPTestSupport {
     @Test
     public void testCoAPComponent() throws Exception {
         CoapClient client = createClient("/TestResource");
-        CoapResponse response = client.get();
-        assertEquals("Hello ", response.getResponseText());
+        CoapResponse response = client.post("Camel", MediaTypeRegistry.TEXT_PLAIN);
+        assertEquals("Hello Camel", response.getResponseText());
         
         MockEndpoint mock = getMockEndpoint("mock:result");
         mock.expectedMinimumMessageCount(1);
diff --git a/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPMethodRestrictTest.java b/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPMethodRestrictTest.java
index f9b44f1..6f19767 100644
--- a/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPMethodRestrictTest.java
+++ b/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPMethodRestrictTest.java
@@ -54,7 +54,7 @@ public class CoAPMethodRestrictTest extends CoAPTestSupport {
             if (methodRestrict.contains(method)) {
                 assertEquals(expectedResponse, result);
             } else {
-                assertEquals("", result);
+                assertNull(result);
             }
         }
     }
diff --git a/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPRestComponentTest.java b/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPRestComponentTest.java
index 2aa58e9..8b94b1c 100644
--- a/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPRestComponentTest.java
+++ b/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPRestComponentTest.java
@@ -46,7 +46,7 @@ public class CoAPRestComponentTest extends CamelTestSupport {
         assertEquals("Hello Ducky: data", rsp.getResponseText());
 
         client = new CoapClient("coap://localhost:" + coapport + "/TestParams?id=Ducky");
-        client.setTimeout(1000000);
+        client.setTimeout(1000000L);
         rsp = client.get();
         assertEquals(ResponseCode.CONTENT, rsp.getCode());
         assertEquals("Hello Ducky", rsp.getResponseText());
@@ -60,7 +60,7 @@ public class CoAPRestComponentTest extends CamelTestSupport {
     public void testCoAPMethodNotAllowedResponse() throws Exception {
         NetworkConfig.createStandardWithoutFile();
         CoapClient client = new CoapClient("coap://localhost:" + coapport + "/TestResource/Ducky");
-        client.setTimeout(1000000);
+        client.setTimeout(1000000L);
         CoapResponse rsp = client.delete();
         assertEquals(ResponseCode.METHOD_NOT_ALLOWED, rsp.getCode());
     }
@@ -69,7 +69,7 @@ public class CoAPRestComponentTest extends CamelTestSupport {
     public void testCoAPNotFoundResponse() throws Exception {
         NetworkConfig.createStandardWithoutFile();
         CoapClient client = new CoapClient("coap://localhost:" + coapport + "/foo/bar/cheese");
-        client.setTimeout(1000000);
+        client.setTimeout(1000000L);
         CoapResponse rsp = client.get();
         assertEquals(ResponseCode.NOT_FOUND, rsp.getCode());
     }
diff --git a/parent/pom.xml b/parent/pom.xml
index d72d95b..5ec7d00 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -103,7 +103,7 @@
     <c3p0-version>0.9.5.3</c3p0-version>
     <c3p0-bundle-version>0.9.5.3_1</c3p0-bundle-version>
     <caffeine-version>2.6.2</caffeine-version>
-    <californium-version>1.0.7</californium-version>
+    <californium-version>2.0.0-M14</californium-version>
     <camel-test-spring-artifactId>camel-test-spring</camel-test-spring-artifactId>
     <cassandra-driver-version>3.6.0</cassandra-driver-version>
     <cassandra-driver-guava-version>19.0</cassandra-driver-guava-version>