davsclaus commented on code in PR #29517:
URL: https://github.com/apache/camel/pull/29517#discussion_r4518423876
##########
components/camel-chaos/src/main/java/org/apache/camel/component/chaos/ChaosExperiment.java:
##########
@@ -168,8 +194,20 @@ private JsonObject read(
jo.put("ruleTexts", texts);
jo.put("faults", faults);
jo.put("expectations", expectations);
- jo.put("verdict", unmet ? FAIL : !undecided ? PASS : ended ?
INCONCLUSIVE : PENDING);
+ if (lost > 0) {
+ jo.put("lostAtDeadLetterChannel", lost);
+ jo.put("lostAtDeadLetterChannelPerRule", lostAtDlq);
+ }
+ // nothing fired: the expectations were not put to the test (an unmet
one is still a FAIL, with its evidence)
+ boolean neverFired = firedAll == 0;
Review Comment:
That is on purpose: "never fired" says the experiment as a whole was not put
to the test. When one of its rules fired, the expectations still decide each
rule (one that cannot decide makes it inconclusive as not decided). Added a
comment that says so in 0339734764e6.
_Claude Code on behalf of davsclaus_
##########
components/camel-chaos/src/main/java/org/apache/camel/component/chaos/ChaosExperiment.java:
##########
@@ -168,8 +194,20 @@ private JsonObject read(
jo.put("ruleTexts", texts);
jo.put("faults", faults);
jo.put("expectations", expectations);
- jo.put("verdict", unmet ? FAIL : !undecided ? PASS : ended ?
INCONCLUSIVE : PENDING);
+ if (lost > 0) {
+ jo.put("lostAtDeadLetterChannel", lost);
+ jo.put("lostAtDeadLetterChannelPerRule", lostAtDlq);
+ }
+ // nothing fired: the expectations were not put to the test (an unmet
one is still a FAIL, with its evidence)
+ boolean neverFired = firedAll == 0;
+ String verdict = unmet || lost > 0
+ ? FAIL : !undecided && !neverFired ? PASS : ended ?
INCONCLUSIVE : PENDING;
+ jo.put("verdict", verdict);
+ if (INCONCLUSIVE.equals(verdict)) {
+ jo.put("reason", neverFired ? NEVER_FIRED : NOT_DECIDED);
Review Comment:
Added the comment in 0339734764e6.
_Claude Code on behalf of davsclaus_
--
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]