#399 - use only one tck timeout config. Rename it for clarity. Move documentation to running_the_tck doc. Signed-off-by: brunobat <brunobat@gmail.com> (commit: 18d1659)
Add a clarifying note on running retries on the same thread Avoid giving the impression that running retries on the same thread is valid in all cases. Signed-off-by: Andrew Rouse <anrouse@uk.ibm.com> (commit: f9b9492)
Add skipOn to CircuitBreaker Add the skipOn parameter to Circuit Breaker Update the spec and javadoc to specify the meaning of skipOn and how failOn and skipOn interact Update package minor version as adding a new parameter to an annotation is a minor breaking change. Signed-off-by: Andrew Rouse <anrouse@uk.ibm.com> (commit: b494df0)
Make TCKConfig methods accept longs rather than ints Most values within the tests are longs and ints can be automatically widened to longs without a cast. Signed-off-by: Andrew Rouse <anrouse@uk.ibm.com> (commit: 6f874a5)
Streamline adjusting annotation timeouts via config Add a helper which will generate the config for a single method using reflection. Signed-off-by: Andrew Rouse <anrouse@uk.ibm.com> (commit: 629d34e)
Pass the TCKConfig to the test application In the case of a managed or remote arquillian container, a system property set on the test process may not be set when a test application runs. We can't easily set system properties in all environments, so the easiest way to pass the config properties is to include them in the test application. The TCKConfigArchiveAppender adds a jar with a resource containing the configured multiplier and TCKConfig is updated to read this resource if it is present. I also consolidated our extension classes. Signed-off-by: Andrew Rouse <anrouse@uk.ibm.com> (commit: 79fcb04)
Fix timeout config in CircuitBreakerRetryTest * add timeout scaling to testCircuitOpenWithMultiTimeouts and testCircuitOpenWithFewRetriesAsync * fix a few cases where the timeout was scaled in the test code but wasn't scaled on the annotations on client classes Signed-off-by: Andrew Rouse <anrouse@uk.ibm.com> (commit: 186563d)
Fix timeout config in Bulkhead and Timeout metric tests These tests needed some adjustment because MetricsComparator.approxMillis was changed from a fixed margin of error to a percentage which also applied the scale factor from TCKConfig. Signed-off-by: Andrew Rouse <anrouse@uk.ibm.com> (commit: 2cb9ed2)
Test Historgrams using getValues rather than percentiles MP Metrics Historgrams can be weighted so that more recent values have a greater affect on the averages and percentiles than older ones. Unfortunately, this means that changing the timeouts in the test can change the results returned for averages and percentiles. When a longer timeout is used, results added earlier in the test are older at the point that the test takes a snapshot and so have a lower weighting when compared to the same test run with a shorter timeout. To avoid this unreliability, I have changed the tests to check the value of Snapshot.getValues() which simply returns the values added to the histogram. Since we're not trying to test the MP Metrics implementation, it's sufficient to test that the correct values have been added to the Histogram and not to test the computed averages. Signed-off-by: Andrew Rouse <anrouse@uk.ibm.com> (commit: 28d3056)
Make CircuitBreakerClientWithSyncBulkhead Dependent This bean is called asynchronously and there's no requirement for the request scope to be active on an async thread. Signed-off-by: Andrew Rouse <anrouse@uk.ibm.com> (commit: 70cfcde)
Move the test exception hierarchy into a common package To allow them to be reused for circuitbreaker tests Signed-off-by: Andrew Rouse <anrouse@uk.ibm.com> (commit: 7a3985c)
specify the meaning of overlapping retryOn and abortOn This is already specified in the `@Retry` javadoc. This commit adds the same wording to the specification text. Signed-off-by: Ladislav Thon <lthon@redhat.com> (commit: 085c967)
Add CB exception hierarchy tests Check that failOn and skipOn are implemented correctly. Signed-off-by: Andrew Rouse <anrouse@uk.ibm.com> (commit: 09d9370)
Update the CircuitBreaker spec with more examples I've moved around the text a bit so that the examples are next to the part of the spec that they're demonstrating. Signed-off-by: Andrew Rouse <anrouse@uk.ibm.com> (commit: b82f08e)
Removed references to config from TimeoutTest TimeoutTest had some code to configure timeouts, but it was all inactive. Allowing the user to configure timeouts here would somewhat undermine what the test is trying to do (check that Timeout works with default values, and when configured with larger and smaller values). If we need to make the timeouts in this test configurable, we would have to reconsider whether testing all of the scenarios in this test class is necessary. Signed-off-by: Andrew Rouse <anrouse@uk.ibm.com> (commit: 5d4b0e8)
Remove strict timing check from testRestryWithNoDelayAndJitter We're not trying to test performance and the strict timing check isn't necessary here. Also strengthen the check for `positiveDelays()` by discarding the first delay which would be the time between object creation and first method execution. (I'd _expect_ the RetryClientWithNoDelayAndJitter object to be created just before the serviceA method is first called, but it's not obvious to me that that _must_ be the case). Signed-off-by: Andrew Rouse <anrouse@uk.ibm.com> (commit: 8cecc00)
Restructure the CircuitBreaker spec section I've tried to reduce repetition and structure the content under logical headings. Signed-off-by: Andrew Rouse <anrouse@uk.ibm.com> (commit: 53705bd)
Adding awaitility to the first refactor test is using a thread to wait issue https://github.com/eclipse/microprofile-fault-tolerance/issues/271 Signed-off-by: Carlos Andres De La Rosa <kusanagi12002@gmail.com> (commit: 8793532)
First refactor of bulkhead test: -- removing thread sleeps and replaced with awaitility library -- code formatting fixes and code readability improvement -- improving static methods importation with per demand static imports issue https://github.com/eclipse/microprofile-fault-tolerance/issues/271 Signed-off-by: Carlos Andres De La Rosa <kusanagi12002@gmail.com> (commit: dee41fd)
Indentation fix and some code improvements issue https://github.com/eclipse/microprofile-fault-tolerance/issues/271 Signed-off-by: Carlos Andres De La Rosa <kusanagi12002@gmail.com> (commit: fff4590)
while loop removed replaced with await method issue https://github.com/eclipse/microprofile-fault-tolerance/issues/271 Signed-off-by: Carlos Andres De La Rosa <kusanagi12002@gmail.com> (commit: 35a0b6a)
removing unused variable issue https://github.com/eclipse/microprofile-fault-tolerance/issues/271 Signed-off-by: Carlos Andres De La Rosa <kusanagi12002@gmail.com> (commit: fbe6f3f)
review fixes issue https://github.com/eclipse/microprofile-fault-tolerance/issues/271 Signed-off-by: Carlos Andres De La Rosa <kusanagi12002@gmail.com> (commit: 48b706f)
review fixes issue https://github.com/eclipse/microprofile-fault-tolerance/issues/271 Signed-off-by: Carlos Andres De La Rosa <kusanagi12002@gmail.com> (commit: 9bdf7df)
Fix FallbackExceptionHierarchyTest.java Fixed a typo where 'InvokeServiceC' was calling 'ServiceB' instead. Signed-off-by: Joseph Cass <joseph.cass@ibm.com> (commit: ec34671)
review fixes and copy right adjustments issue https://github.com/eclipse/microprofile-fault-tolerance/issues/271 Signed-off-by: Carlos Andres De La Rosa <kusanagi12002@gmail.com> (commit: d56ed00)
review fixes and copy right adjustments issue https://github.com/eclipse/microprofile-fault-tolerance/issues/271 Signed-off-by: Carlos Andres De La Rosa <kusanagi12002@gmail.com> (commit: fed1eeb)
Clarify behaviour of Bulkhead and CompletionStage Updates the spec to say that the method execution isn't considered complete until the returned completion stage completes. Adds a note to point out the implications for Bulkhead and Timeout. Signed-off-by: Andrew Rouse <anrouse@uk.ibm.com> (commit: 92e8a9a)
fix the timeout metrics test When the `microprofile-config.properties` file, generated by `ConfigAnnotationAsset`, is put into `META-INF`, the archive needs to be a JAR. That JAR can then be put into a WAR. All tests that use `ConfigAnnotationAsset` follow this pattern, except `TimeoutMetricTest`, where the file is put directly into the WAR. From there, it can't be read, as `META-INF` inside a WAR is not on classpath. This commit fixes `TimeoutMetricTest` to follow the same pattern: put everything into a JAR, and that JAR into a WAR. Signed-off-by: Ladislav Thon <lthon@redhat.com> (commit: afb09db)
#274 RequestScope context should be active on asynchrous method invocation - spec and javadoc clarification Signed-off-by: Emily Jiang <emijiang6@googlemail.com> (commit: 0779b4f)
#274 RequestScope context should be active on asynchrous method invocation - spec and javadoc clarification Signed-off-by: Emily Jiang <emijiang6@googlemail.com> (commit: 9c8102c)
Add configuration tests for parameters new in 2.1 * Test that Fallback applyOn and skipOn can be configured * Test that CircuitBreaker skipOn can be configured Signed-off-by: Andrew Rouse <anrouse@uk.ibm.com> (commit: a74928c)
Revert "move from Java EE 8 to Jakarta EE 8 specification artifacts" This reverts commit 8dc5b0f75b515c8535e0954deb975c25d2caa9dc. Signed-off-by: Ladislav Thon <lthon@redhat.com> (commit: f77cb7c)
Use separate methods in CircuitBreaker tests Change the CircuitBreakerExceptionHierarchyTest to use a different service method for each test. This requires the service method to be replicated lots of times, but allows the lifetime of the circuit breaker to be tied to the method itself rather than to the bean instance. Signed-off-by: Andrew Rouse <anrouse@uk.ibm.com> (commit: b27296d)
add bean-defining annotations to beans in TCK This is to make sure the TCK can pass on Quarkus, which requires all beans to have bean-defining annotations. (commit: 24097dc)
Revert "Revert "move from Java EE 8 to Jakarta EE 8 specification artifacts"" This reverts commit f77cb7c182bdcc5a713d4f0f9e8e46363a879fe8. Signed-off-by: Ladislav Thon <lthon@redhat.com> (commit: c6dafad)
Updated AllMetricsBean * Increased the Timeout duration to 1 minute * Scaled all the FT values with the the TCKConfig baseMultiplier using the autoscaleMethod Signed-off-by: Joseph Cass <joseph.cass@ibm.com> (commit: f1d14fc)