gnodet-bot commented on code in PR #26449:
URL: https://github.com/apache/camel/pull/26449#discussion_r4012311523


##########
dsl/camel-yaml-dsl/camel-yaml-dsl/src/test/groovy/org/apache/camel/dsl/yaml/CircuitBreakerTest.groovy:
##########
@@ -60,6 +60,27 @@ class CircuitBreakerTest extends YamlTestSupport {
         }
     }
 
+    def "circuitBreaker inheritErrorHandler placeholder"() {
+        when:
+        // the schema types inheritErrorHandler as boolean so skip the strict 
validation, the runtime accepts a
+        // placeholder that is resolved when the route starts (CAMEL-24696)
+        loadRoutesNoValidate '''

Review Comment:
   Inaccurate comment — and the wrong helper.
   
   `isRuntimeAcceptedScalar` (already present on this branch) accepts any 
`{{...}}` string for a `boolean`-typed attribute, so `loadRoutes` (with 
validation enabled) works here too. The comment "skip the strict validation" 
misrepresents what the validator does and could mislead future maintainers.
   
   Using `loadRoutes` would also actively test that the validator correctly 
accepts the placeholder, which is the more valuable assertion.
   
   ```suggestion
           // isRuntimeAcceptedScalar accepts {{...}} placeholders for 
boolean-typed attributes,
           // so validation passes even though the schema types 
inheritErrorHandler as boolean (CAMEL-24696)
           loadRoutes '''
   ```



##########
dsl/camel-yaml-dsl/camel-yaml-dsl/src/test/groovy/org/apache/camel/dsl/yaml/LoadBalanceTest.groovy:
##########
@@ -56,4 +59,30 @@ class LoadBalanceTest extends YamlTestSupport {
             MockEndpoint.assertIsSatisfied(context)
     }
 
+    def "failoverLoadBalancer inheritErrorHandler placeholder"() {
+        when:
+            // the schema types inheritErrorHandler as boolean so skip the 
strict validation, the runtime accepts a
+            // placeholder that is resolved when the route starts (CAMEL-24696)
+            loadRoutesNoValidate '''

Review Comment:
   Same inaccurate comment as in `CircuitBreakerTest`. 
`isRuntimeAcceptedScalar` accepts the placeholder for `boolean` fields, so 
`loadRoutes` works here too.
   
   ```suggestion
               // isRuntimeAcceptedScalar accepts {{...}} placeholders for 
boolean-typed attributes,
               // so validation passes even though the schema types 
inheritErrorHandler as boolean (CAMEL-24696)
               loadRoutes '''
   ```



-- 
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]

Reply via email to