You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ni...@apache.org on 2009/02/02 03:23:41 UTC
svn commit: r739904 - in
/camel/trunk/components/camel-restlet/src/test/java/org/apache/camel/component/restlet:
RestletPostContentTest.java RestletRouteBuilderTest.java
route/TestRouteBuilder.java
Author: ningjiang
Date: Mon Feb 2 02:23:41 2009
New Revision: 739904
URL: http://svn.apache.org/viewvc?rev=739904&view=rev
Log:
Changed the service port number to avoid the port confliction of the CI windows box
Modified:
camel/trunk/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestletPostContentTest.java
camel/trunk/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestletRouteBuilderTest.java
camel/trunk/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/route/TestRouteBuilder.java
Modified: camel/trunk/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestletPostContentTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestletPostContentTest.java?rev=739904&r1=739903&r2=739904&view=diff
==============================================================================
--- camel/trunk/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestletPostContentTest.java (original)
+++ camel/trunk/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestletPostContentTest.java Mon Feb 2 02:23:41 2009
@@ -41,7 +41,7 @@
return new RouteBuilder() {
@Override
public void configure() throws Exception {
- from("restlet:http://localhost:8080/users/{username}?restletMethod=POST")
+ from("restlet:http://localhost:9080/users/{username}?restletMethod=POST")
.process(new SetUserProcessor());
}
@@ -57,7 +57,7 @@
}
public void testPostBody() throws Exception {
- HttpMethod method = new PostMethod("http://localhost:8080/users/homer");
+ HttpMethod method = new PostMethod("http://localhost:9080/users/homer");
RequestEntity requestEntity = new StringRequestEntity(MSG_BODY, null, null);
((EntityEnclosingMethod)method).setRequestEntity(requestEntity);
HttpClient client = new HttpClient();
Modified: camel/trunk/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestletRouteBuilderTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestletRouteBuilderTest.java?rev=739904&r1=739903&r2=739904&view=diff
==============================================================================
--- camel/trunk/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestletRouteBuilderTest.java (original)
+++ camel/trunk/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestletRouteBuilderTest.java Mon Feb 2 02:23:41 2009
@@ -40,10 +40,10 @@
// Restlet producer to use POST method. The RestletMethod=post will be stripped
// before request is sent.
from("direct:start").setHeader("id", constant(ID))
- .to("restlet:http://localhost:8080/orders?restletMethod=post&foo=bar");
+ .to("restlet:http://localhost:9080/orders?restletMethod=post&foo=bar");
// Restlet consumer to handler POST method
- from("restlet:http://localhost:8080/orders?restletMethod=post").process(new Processor() {
+ from("restlet:http://localhost:9080/orders?restletMethod=post").process(new Processor() {
public void process(Exchange exchange) throws Exception {
exchange.getOut().setBody(
"received [" + exchange.getIn().getBody(String.class)
@@ -53,7 +53,7 @@
});
// Restlet consumer default to handle GET method
- from("restlet:http://localhost:8080/orders/{id}/{x}").process(new Processor() {
+ from("restlet:http://localhost:9080/orders/{id}/{x}").process(new Processor() {
public void process(Exchange exchange) throws Exception {
exchange.getOut().setBody(
"received GET request with id="
@@ -75,7 +75,7 @@
public void testConsumer() throws IOException {
Client client = new Client(Protocol.HTTP);
Response response = client.handle(new Request(Method.GET,
- "http://localhost:8080/orders/99991/6"));
+ "http://localhost:9080/orders/99991/6"));
assertEquals("received GET request with id=99991 and x=6",
response.getEntity().getText());
}
@@ -83,7 +83,7 @@
public void testUnhandledConsumer() throws IOException {
Client client = new Client(Protocol.HTTP);
Response response = client.handle(new Request(Method.POST,
- "http://localhost:8080/orders/99991/6"));
+ "http://localhost:9080/orders/99991/6"));
// expect error status as no Restlet consumer to handle POST method
assertEquals(Status.CLIENT_ERROR_NOT_FOUND, response.getStatus());
assertNotNull(response.getEntity().getText());
Modified: camel/trunk/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/route/TestRouteBuilder.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/route/TestRouteBuilder.java?rev=739904&r1=739903&r2=739904&view=diff
==============================================================================
--- camel/trunk/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/route/TestRouteBuilder.java (original)
+++ camel/trunk/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/route/TestRouteBuilder.java Mon Feb 2 02:23:41 2009
@@ -31,7 +31,7 @@
public void configure() throws Exception {
// START SNIPPET: consumer_route
- from("restlet:http://localhost:8080/securedOrders?restletMethod=post&restletRealmRef=realm").process(new Processor() {
+ from("restlet:http://localhost:9080/securedOrders?restletMethod=post&restletRealmRef=realm").process(new Processor() {
public void process(Exchange exchange) throws Exception {
exchange.getOut().setBody(
"received [" + exchange.getIn().getBody()
@@ -45,7 +45,7 @@
// Note: restletMethod and restletRealmRef are stripped
// from the query before a request is sent as they are
// only processed by Camel.
- from("direct:start-auth").to("restlet:http://localhost:8080/securedOrders?restletMethod=post");
+ from("direct:start-auth").to("restlet:http://localhost:9080/securedOrders?restletMethod=post");
// END SNIPPET: producer_route
}