This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new 311d8fd91a51 CAMEL-27568: camel-netty - Fix flaky test
NettyProducerStrayExceptionTest (#30864)
311d8fd91a51 is described below
commit 311d8fd91a518beaf592ff63cfdd68e2add27092
Author: Claus Ibsen <[email protected]>
AuthorDate: Thu Nov 26 19:13:01 2026 +0100
CAMEL-27568: camel-netty - Fix flaky test NettyProducerStrayExceptionTest
(#30864)
With requestTimeout=1000 the read timeout closed the unused channel when the
greeting of the test server came later than one second, as on a busy CI
machine. The test now takes the read timeout off the unused channel; the
pool
adds a new one when the request borrows the channel.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Claus Ibsen <[email protected]>
---
.../camel/component/netty/NettyProducerStrayExceptionTest.java | 5 +++++
1 file changed, 5 insertions(+)
diff --git
a/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettyProducerStrayExceptionTest.java
b/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettyProducerStrayExceptionTest.java
index e44d1dee29dc..a25539830829 100644
---
a/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettyProducerStrayExceptionTest.java
+++
b/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettyProducerStrayExceptionTest.java
@@ -127,6 +127,11 @@ class NettyProducerStrayExceptionTest extends
CamelTestSupport {
private void startProducerAndAwaitException(String options) throws
Exception {
Channel channel = startProducer(options);
+ // without a request the read timeout would close the unused channel
before a slow greeting arrives; the pool
+ // adds a new one when the request borrows the channel (activateObject)
+ if (channel.pipeline().get("timeout") != null) {
+ channel.pipeline().remove("timeout");
+ }
// see the exception before the producer's handler gets it, and count
down once that handler is done with it
channel.pipeline().addBefore("handler", "exceptionProbe", new
ChannelInboundHandlerAdapter() {
@Override