Commit 4b257f0
committed
CAMEL-23223 - improve assertion failure message to help investigation on
flaky test ManagedMessageHistoryAutoConfigIT
instead of
```
org.opentest4j.AssertionFailedError: expected: <true> but was: <false>
```
there will now be a message like:
```
ManagedMessageHistoryAutoConfigIT.testMessageHistory:120->assertMetricDataHasNodeId:130
Expecting any elements of:
[ImmutableHistogramPointData{getStartEpochNanos=1776755336333536296,
getEpochNanos=1776755336415229081,
getAttributes={camelContext="camel-1", kind="CamelMessageHistory",
nodeId="foo", routeId="route1"}, getSum=1.0, getCount=5, hasMin=true,
getMin=0.0, hasMax=true, getMax=1.0, getBoundaries=[0.0, 5.0, 10.0,
25.0, 50.0, 75.0, 100.0, 250.0, 500.0, 750.0, 1000.0, 2500.0, 5000.0,
7500.0, 10000.0], getCounts=[4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0], getExemplars=[]},
ImmutableHistogramPointData{getStartEpochNanos=1776755336333480676,
getEpochNanos=1776755336415229081,
getAttributes={camelContext="camel-1", kind="CamelMessageHistory",
nodeId="bar", routeId="route2"}, getSum=1.0, getCount=5, hasMin=true,
getMin=0.0, hasMax=true, getMax=1.0, getBoundaries=[0.0, 5.0, 10.0,
25.0, 50.0, 75.0, 100.0, 250.0, 500.0, 750.0, 1000.0, 2500.0, 5000.0,
7500.0, 10000.0], getCounts=[4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0], getExemplars=[]},
ImmutableHistogramPointData{getStartEpochNanos=1776755336334308001,
getEpochNanos=1776755336415229081,
getAttributes={camelContext="camel-1", kind="CamelMessageHistory",
nodeId="baz", routeId="route2"}, getSum=0.0, getCount=5, hasMin=true,
getMin=0.0, hasMax=true, getMax=0.0, getBoundaries=[0.0, 5.0, 10.0,
25.0, 50.0, 75.0, 100.0, 250.0, 500.0, 750.0, 1000.0, 2500.0, 5000.0,
7500.0, 10000.0], getCounts=[5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0], getExemplars=[]}]
to match 'No metric data found for node invalidToCheckErrorMessageof
route route2 ' predicate but none did.
```
Signed-off-by: Aurélien Pupier <apupier@ibm.com>1 parent 2de2902 commit 4b257f0
2 files changed
Lines changed: 15 additions & 7 deletions
File tree
- components/camel-opentelemetry-metrics
- src/test/java/org/apache/camel/opentelemetry/metrics/integration/messagehistory
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
87 | 92 | | |
88 | 93 | | |
89 | 94 | | |
| |||
Lines changed: 10 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
| |||
113 | 114 | | |
114 | 115 | | |
115 | 116 | | |
116 | | - | |
117 | | - | |
118 | | - | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
119 | 120 | | |
120 | 121 | | |
121 | 122 | | |
122 | 123 | | |
123 | 124 | | |
124 | 125 | | |
125 | 126 | | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
130 | 133 | | |
131 | 134 | | |
132 | 135 | | |
| |||
0 commit comments