allthingssecurity commented on PR #28591:
URL: https://github.com/apache/camel/pull/28591#issuecomment-6464725808
@davsclaus thanks, you're right about undertow. Fixed in d21c3a632ec0 (one
new commit on top).
**Blocker.** `RestRootHandler.removeConsumer` now unregisters only when
`consumers.remove(consumer)` returns true, as you suggested. `addConsumer` also
registers only when the consumer is new, so the two stay paired. New
`RestUndertowWildcardPathRemoveNotStartedRouteTest`: `rest:get:files/*` is
started, `rest:post:files/*` has `autoStartup(false)`, and after
`removeRoute("post")` a GET still gets its reply. On the previous head it fails
with `expected: <get> but was: <No matching path found>`. I didn't add a test
for the failed-start path, because it needs a failing servlet context
deployment. The same guard covers it.
**Non-blocking**
1. The duplicate test now finds the `IllegalStateException` in the cause
chain and checks that its message starts with "Duplicate request path for".
2. `register` keeps the existing pattern and compiles one only when the path
is new.
3. The record component is now `path`, with an explicit `getConsumerPath()`.
Tests: camel-undertow 239 run / 0 failures, camel-netty-http 316 / 0,
camel-servlet 112 / 0, camel-http-common 48 / 0, the jetty rest tests 104 / 0,
and `RestConsumerContextPathMatcherTest` 13 / 0. On a local merge with current
main, which has changed `RestRootHandler` and `DefaultUndertowHost`, the
undertow tests (255 / 0) and the new tests pass too. I updated the description:
it no longer says undertow was already paired.
_Claude Code on behalf of allthingssecurity_
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]