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

fix(doc): Warn about flat test classpath and decorators with old versions of Quarkus #112

Closed

Conversation

edeweerd1A
Copy link
Contributor

There is a flackiness with QuarkusTest and usage of Processor decorators. It is generating randomly ClassNotFoundException.
The solution is to force a flat class path for tests. The configuration property is activated for all users of the library with a definition in the microprofile-config.properties file of quarkus-kafka-streams-processor-impl.

@edeweerd1A edeweerd1A requested a review from a team as a code owner October 3, 2024 13:43
@@ -769,6 +769,19 @@ You can also, as a regular CDI bean, inject any another CDI bean reference to be
Such a decorator will automatically been taken into account by CDI through the combination of `Decorator` and `Priority` annotations.
The priority will control at which point your decorator will be called among all other decorators.

[WARNING]
====
For Quarkus version prior to 3.11.0, you might notice a random failure of your QuarkusTest with a `ClassNotFoundException` of your custom decorator class.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [vale] reported by reviewdog 🐶
[RedHat.TermsErrors] Use 'concept' rather than 'notion'.

It can be mitigated by adding the following configuration:

[source,properties]
----
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [vale] reported by reviewdog 🐶
[RedHat.Spelling] Verify the word 'instrumentated'. It is not in the American English spelling dictionary used by Vale.

@edeweerd1A edeweerd1A force-pushed the custom-payload-type branch from 72f4d77 to bd6ebd0 Compare October 3, 2024 13:56
@@ -769,13 +769,26 @@ You can also, as a regular CDI bean, inject any another CDI bean reference to be
Such a decorator will automatically been taken into account by CDI through the combination of `Decorator` and `Priority` annotations.
The priority will control at which point your decorator will be called among all other decorators.

[WARNING]
====
For Quarkus version prior to 3.11.0, you might notice a random failure of your QuarkusTest with a `ClassNotFoundException` of your custom decorator class.
Copy link
Member

@rquinio1A rquinio1A Oct 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It could be worth referencing quarkusio/quarkus#43245, indeed now I see it mentions "flat classloading" in the description

…ions of Quarkus

We noticed flackiness with QuarkusTest and usage of `Processor` decorators.
It is generating randomly ClassNotFoundException.
The solution is to force a flat class path for tests.
The configuration property is activated for all users of the library with a definition in the `microprofile-config.properties` file of `quarkus-kafka-streams-processor-impl`.
@edeweerd1A edeweerd1A force-pushed the custom-payload-type branch from bd6ebd0 to b2f3ca8 Compare October 7, 2024 11:22
This is fixed in the following https://github.com/quarkusio/quarkus/pull/43245[PR].
It can be mitigated by adding the following configuration:

[source,properties]
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [vale] reported by reviewdog 🐶
[RedHat.Spelling] Verify the word 'instrumentated'. It is not in the American English spelling dictionary used by Vale.

@edeweerd1A edeweerd1A closed this Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants