[
https://issues.apache.org/jira/browse/CAMEL-12577?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16512369#comment-16512369
]
ASF GitHub Bot commented on CAMEL-12577:
----------------------------------------
oscerd closed pull request #2374: CAMEL-12577: Re-apply CAMEL-12104 Unintuitive
default cxf timeout
URL: https://github.com/apache/camel/pull/2374
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git
a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfConsumer.java
b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfConsumer.java
index 3ba12bf138a..95705c7a83d 100644
---
a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfConsumer.java
+++
b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfConsumer.java
@@ -191,7 +191,7 @@ public void done(boolean doneSync) {
}
});
- } else if (continuation.isResumed()) {
+ } else if (!continuation.isTimeout() &&
continuation.isResumed()) {
org.apache.camel.Exchange camelExchange =
(org.apache.camel.Exchange)continuation.getObject();
try {
setResponseBack(cxfExchange, camelExchange);
@@ -199,7 +199,8 @@ public void done(boolean doneSync) {
CxfConsumer.this.doneUoW(camelExchange);
throw ex;
}
- } else if (!continuation.isResumed() &&
!continuation.isPending()) {
+
+ } else if (continuation.isTimeout() ||
(!continuation.isResumed() && !continuation.isPending())) {
org.apache.camel.Exchange camelExchange =
(org.apache.camel.Exchange)continuation.getObject();
try {
if (!continuation.isPending()) {
diff --git
a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsInvoker.java
b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsInvoker.java
index 29d9fa3eb90..fef3818f43a 100644
---
a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsInvoker.java
+++
b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsInvoker.java
@@ -104,7 +104,7 @@ public void done(boolean doneSync) {
});
return null;
}
- if (continuation.isResumed()) {
+ if (!continuation.isTimeout() && continuation.isResumed()) {
cxfExchange.put(SUSPENED, Boolean.FALSE);
org.apache.camel.Exchange camelExchange =
(org.apache.camel.Exchange)continuation.getObject();
try {
@@ -114,7 +114,7 @@ public void done(boolean doneSync) {
throw ex;
}
} else {
- if (!continuation.isPending()) {
+ if (continuation.isTimeout() || !continuation.isPending()) {
cxfExchange.put(SUSPENED, Boolean.FALSE);
org.apache.camel.Exchange camelExchange =
(org.apache.camel.Exchange)continuation.getObject();
camelExchange.setException(new
ExchangeTimedOutException(camelExchange, endpoint.getContinuationTimeout()));
diff --git
a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfConsumerContinuationTimeoutTest.java
b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfConsumerContinuationTimeoutTest.java
index cfe31bde6e5..d628501ddb3 100644
---
a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfConsumerContinuationTimeoutTest.java
+++
b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfConsumerContinuationTimeoutTest.java
@@ -25,7 +25,6 @@
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.test.junit4.CamelTestSupport;
import org.apache.camel.util.AsyncProcessorHelper;
-import org.junit.Ignore;
import org.junit.Test;
public class CxfConsumerContinuationTimeoutTest extends CamelTestSupport {
@@ -114,7 +113,6 @@ public void testNoTimeout() throws Exception {
}
@Test
- @Ignore("CAMEL-12104")
public void testTimeout() throws Exception {
String out = template.requestBodyAndHeader("direct:start", "Bye
World", "priority", "slow", String.class);
assertTrue(out.contains("The OUT message was not received within: 5000
millis."));
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> Re-apply CAMEL-12104 Unintuitive default cxf timeout behavior
> -------------------------------------------------------------
>
> Key: CAMEL-12577
> URL: https://issues.apache.org/jira/browse/CAMEL-12577
> Project: Camel
> Issue Type: Bug
> Components: camel-cxf
> Reporter: Peter Palaga
> Assignee: Peter Palaga
> Priority: Major
> Fix For: 2.22.0
>
>
> CAMEL-12104 was temporarily reverted via CAMEL-12409. We can re-apply
> CAMEL-12104 through reverting CAMEL-12409 now.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)