Metrics-related in-container TCK tests import org.hamcrest classes but don't include these in the deployment archive
See original GitHub issueThis may result in java.lang.NoClassDefFoundError: org/hamcrest/Matchers
if using managed and remote Arquillian containers. A simple but not very convenient workaround is to use a custom AuxiliaryArchiveAppender
and add those classes manually.
TCK tests:
org.eclipse.microprofile.fault.tolerance.tck.metrics.RetryMetricTest.testRetryMetricSuccessfulImmediately
org.eclipse.microprofile.fault.tolerance.tck.metrics.RetryMetricTest.testRetryMetricUnsuccessful
org.eclipse.microprofile.fault.tolerance.tck.metrics.BulkheadMetricTest.bulkheadMetricHistogramTest
org.eclipse.microprofile.fault.tolerance.tck.metrics.BulkheadMetricTest.bulkheadMetricRejectionTest
org.eclipse.microprofile.fault.tolerance.tck.metrics.BulkheadMetricTest.bulkheadMetricTest
org.eclipse.microprofile.fault.tolerance.tck.metrics.FallbackMetricTest.fallbackMetricHandlerTest
org.eclipse.microprofile.fault.tolerance.tck.metrics.FallbackMetricTest.fallbackMetricMethodTest
org.eclipse.microprofile.fault.tolerance.tck.metrics.MetricsDisabledTest.testMetricsDisabled
org.eclipse.microprofile.fault.tolerance.tck.metrics.ClassLevelMetricTest.testRetryMetricSuccessfulAfterRetry
org.eclipse.microprofile.fault.tolerance.tck.metrics.ClassLevelMetricTest.testRetryMetricSuccessfulImmediately
org.eclipse.microprofile.fault.tolerance.tck.metrics.ClassLevelMetricTest.testRetryMetricUnsuccessful
org.eclipse.microprofile.fault.tolerance.tck.metrics.AllMetricsTest.testAllMetrics
org.eclipse.microprofile.fault.tolerance.tck.metrics.CircuitBreakerMetricTest.testCircuitBreakerMetric
org.eclipse.microprofile.fault.tolerance.tck.metrics.ClashingNameTest.testClashingName
org.eclipse.microprofile.fault.tolerance.tck.metrics.TimeoutMetricTest.testTimeoutHistogram
org.eclipse.microprofile.fault.tolerance.tck.metrics.TimeoutMetricTest.testTimeoutMetric
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
java - hamcrest tests always fail - Stack Overflow
The number generated was always less than 13 but the test always failed. Is there something I am doing wrong? This is the...
Read more >wildfly-parent : 22.0.1.Final - Maven Central Repository Search
... related to the directory from which testsuite modules that don't create their own dists should obtain the dist to test --> <!--...
Read more >Talend Component Kit Developer Guide - GitHub Pages
This tutorial walks you through the most common iteration steps to create a component with Talend Component Kit and to deploy it to...
Read more >Apache Tomcat 8 (8.5.84) - Changelog
Catalina · Fix: Update the memory leak protection code to support stopping application created executor threads when running on Java 19 and later ......
Read more >JUnit's Built-in Hamcrest Core Matcher Support - DZone
In the post Improving On assertEquals with JUnit and Hamcrest, I briefly discussed Hamcrest "core" matchers being "baked in" with modern ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
That’s interesting, although I know JUnit has had some close integration with hamcrest (which is being removed in JUnit 5) so maybe that was part of the reason?
For the moment, I intend to replicate your approach and include an AuxillaryArchiveAppender in the TCK which will add the hamcrest packages in a separate jar.
There are several classes in addition to the metrics tests in the master branch which also use hamcrest, so I thing it makes sense to have it be always added and an AuxillaryArchiveAppender seems a sensible way to accomplish that.
Here’s the question I opened on the forums, I haven’t got a response yet: https://developer.jboss.org/thread/279333