question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Metrics-related in-container TCK tests import org.hamcrest classes but don't include these in the deployment archive

See original GitHub issue

This 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:closed
  • Created 5 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
Azqueltcommented, Dec 11, 2018

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.

0reactions
Azqueltcommented, Dec 19, 2018

Here’s the question I opened on the forums, I haven’t got a response yet: https://developer.jboss.org/thread/279333

Read more comments on GitHub >

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

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found