Commit fe52f00 1 parent b9fac4a commit fe52f00 Copy full SHA for fe52f00
File tree 1 file changed +3
-5
lines changed
tests/components/camel-jetty/src/main/java/org/apache/karaf/camel/test
1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ public class CamelJettyComponent extends AbstractCamelComponentResultMockBased {
38
38
39
39
@ Override
40
40
protected Function <RouteBuilder , RouteDefinition > consumerRoute () {
41
- return builder -> builder .from ("jetty://http://localhost:%s/test " .formatted (port )).transform (builder .constant ("OK" ));
41
+ return builder -> builder .from ("jetty://http://localhost:%s/jettyTest " .formatted (port )).transform (builder .constant ("OK" ));
42
42
}
43
43
44
44
@ Override
@@ -55,16 +55,14 @@ public void process(Exchange exchange) throws Exception {
55
55
HttpClient client = HttpClient .newHttpClient ();
56
56
57
57
// Create a URI for the request
58
- URI uri = URI .create ("http://localhost:%s/test " .formatted (port ));
58
+ URI uri = URI .create ("http://localhost:%s/jettyTest " .formatted (port ));
59
59
60
60
// Create a HttpRequest
61
61
HttpRequest request = HttpRequest .newBuilder ()
62
62
.uri (uri )
63
63
.build ();
64
64
65
- client .sendAsync (request , HttpResponse .BodyHandlers .ofString ())
66
- .thenApply (HttpResponse ::body )
67
- .thenAccept (System .out ::println );
65
+ client .send (request , HttpResponse .BodyHandlers .ofString ());
68
66
}
69
67
}
70
68
}
You can’t perform that action at this time.
0 commit comments