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.

QuarkusTestResources all started no matter what

See original GitHub issue

Describe the bug I have 2 quarkus test and 2 seperate test resources (1 for starting a MySQL container and another for starting a LocalStack container). Each of the test classes are annotated with @QuarkusTestResource for there resource.

Expected behavior Since each test class is independent and has different resources I would expect to only see the resource assigned to that class to start

Actual behavior No matter which test I seem to run both QuarkusTestResourceLifecycleManager seems to start up

To Reproduce Steps to reproduce the behavior: 1. 2. 3.

Configuration

# Add your application.properties here, if applicable.

Screenshots (If applicable, add screenshots to help explain your problem.)

Environment (please complete the following information):

  • Output of uname -a or ver:
  • Output of java -version:
  • GraalVM version (if different from Java):
  • Quarkus version or git rev:
  • Build tool (ie. output of mvnw --version or gradlew --version):

Additional context (Add any other context about the problem here.)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:3
  • Comments:16 (14 by maintainers)

github_iconTop GitHub Comments

1reaction
famodcommented, Jun 23, 2020

Btw, back in 2017 there was an attempt to add custom sorting strategies to surefire: https://github.com/apache/maven-surefire/pull/169

1reaction
geoandcommented, Jun 23, 2020

It already works, take a look at the examples in the codebase.

What isn’t there is integration with QuarkusTestResourceLifecycleManager (which I doubt I’ll have time to get in for 1.6, but you never know)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Junit5 Tag Annotation together with Quarkus ... - Stack Overflow
Result: QuarkusTestResource are started even if no QuarkusTest is annotated with "unit", so it seems that Quarkus is not aware of the Tag ......
Read more >
Datasources - Quarkus
Don't configure a database URL, username and password - Quarkus will provide the database and you can just start coding without worrying about...
Read more >
Quarkus and Testcontainers - Gunnar Morling
And that's it! Note that all the test resources of the test module are detected and started up, before starting the first test....
Read more >
Design Proposal: @QuarkusIntegrationTest - Google Groups
In essence this will work almost exactly the same as our current native testing, except that it will test the generated application no...
Read more >
2020 quarkus-fascicle-understanding-v1.pdf
and start a new instance of a Java application? The answer is usually that, no matter how fast the orchestrator works, the JVM...
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