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

Make most archives not testable #545

Merged
merged 1 commit into from
Aug 24, 2022

Conversation

Azquelt
Copy link
Member

@Azquelt Azquelt commented Aug 23, 2022

A "testable" archive is one that arquillian adds extra framework code to
in order to run tests within the server runtime environment.

Most of the MP OpenAPI test classes don't include any tests which run on
the server side, they deploy an app and then query the /openapi endpoint
from the client side.

In addition, it causes problems when using the new arquillian REST 3.0
protocol. When using this protocol, an additional REST resource is
deployed within testable deployments which is scanned and added to the
openapi documentation which causes some of the tests to fail.

Fixes #546

A "testable" archive is one that arquillian adds extra framework code to
in order to run tests within the server runtime environment.

Most of the MP OpenAPI test classes don't include any tests which run on
the server side, they deploy an app and then query the /openapi endpoint
from the client side.

In addition, it causes problems when using the new arquillian REST 3.0
protocol. When using this protocol, an additional REST resource is
deployed within testable deployments which is scanned and added to the
openapi documentation which causes some of the tests to fail.
@MikeEdgar
Copy link
Contributor

This seems to cause the SmallRye DeploymentProcessor to no longer be executed. The ArquillianExtension is still called, which is where the processor is registered. Any idea why that might be the case?

@Azquelt
Copy link
Member Author

Azquelt commented Aug 24, 2022

Yeah, I'd noticed that and have just been poking through the arquillian code. It looks like a registered ApplicationArchiveProcessor is only called for a testable archive.

You're using DeploymentProcessor to actually add your implementation into the deployed application, right? So you need to do that to all archives, not just testable ones.

I'm having a look to see if we can observe BeforeDeploy and update the archive there instead.

@MikeEdgar
Copy link
Contributor

That's right. From what I can tell, BeforeDeploy provides read-only access to the archive.

@Azquelt
Copy link
Member Author

Azquelt commented Aug 24, 2022

It seems to allow me to edit it: smallrye/smallrye-open-api#1224

@Azquelt Azquelt merged commit 0ef9172 into microprofile:master Aug 24, 2022
@Azquelt Azquelt deleted the non-testable-archives branch August 24, 2022 12:26
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.

Allow the TCK to work using the new arquillian REST protocol
2 participants