Copilot commented on code in PR #24469:
URL: https://github.com/apache/camel/pull/24469#discussion_r3530940011
##########
components/camel-elasticsearch/src/test/java/org/apache/camel/component/es/integration/ElasticsearchClusterIndexIT.java:
##########
@@ -77,9 +77,9 @@ protected RouteBuilder createRouteBuilder() {
@Override
public void configure() {
from("direct:indexWithIpAndPort")
- .to("elasticsearch://" + clusterName +
"?operation=Index&indexName=twitter");
+ .to("elasticsearch://" + clusterName +
"?operation=Index&indexName=cluster");
from("direct:indexWithSniffer")
- .to("elasticsearch://" + clusterName +
"?operation=Index&indexName=twitter&enableSniffer=true");
+ .to("elasticsearch://" + clusterName +
"?operation=Index&indexName=cluster&enableSniffer=true");
Review Comment:
`direct:indexWithSniffer` hardcodes `indexName=cluster`, but the test call
sets `PARAM_INDEX_NAME` to `facebook` and verifies the document in the
`facebook` index. Since headers override the URI, the `indexName=cluster`
parameter is misleading and creates a brittle implicit default if the header is
ever omitted. Prefer removing `indexName` from the endpoint URI (or aligning it
with the header).
--
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]