Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New problem: distinct resources sharing a dev service will cause test failures #45786

Open
holly-cummins opened this issue Jan 22, 2025 · 2 comments

Comments

@holly-cummins
Copy link
Contributor

holly-cummins commented Jan 22, 2025

If two distinct @QuarkusTestResources share the same dev service, one of them will fail (bad!). We shut down the dev service when we stop the application, but we start the dev service during augmentation, not during startup so there's an asymmetry. The second test will check during augmentation, see an existing dev service, and think it can share a dev service with the first one, but it can't, because it will be shut down at the end of the first test.

I don't think we have a test that exposes this, but one can be created trivially. For example, in integration-tests/oidc, duplicate WebsocketOidcTestCase and KeycloakXTestResourceLifecycleManager, prefix both names with Another, and adjust the linking:

@QuarkusTest
@QuarkusTestResource(AnotherKeycloakXTestResourceLifecycleManager.class)
public class AnotherWebsocketOidcTestCase {

Either the new test or one of the original tests will fail.

The proper solution for this is #45785 , but that's invasive, so this issue covers adding the test and identifying a tactical workaround.

Copy link

quarkus-bot bot commented Jan 22, 2025

/cc @geoand (devservices), @stuartwdouglas (devservices)

@holly-cummins
Copy link
Contributor Author

As part of the fix for this, the workaround in RedisInstrumentationDisabledProfile of setting a unique port should be removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

1 participant