-
Notifications
You must be signed in to change notification settings - Fork 82
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
OASFactoryErrorTest TCK test fails when it runs as the first test in the testsuite #655
Comments
The reason why the wrong exception (IllegalStateException instead of IllegalArgumentException) is throw from I'm not quite sure if the
It could well be a problem in the Wildfly integration code, which is not doing something it should be doing. A "fix" I was thinking about is to alter the OASFactoryErrorTest in a way that would satisfy those listed conditions, e.g. adding a REST class or a reader/filter configuration into the test deployment. Not sure if that's the right thing to do though. |
I found this ticket that looks related: #413 Now it looks more like a problem in the TCK test to me. Why should the |
#413 limits the cases where the endpoint is required to be active, but it doesn't say anything about whether That said, I think it's reasonable to change this test to be a more typical use-case where a reader is included. |
This is observed in the 3.1 stream, I didn't test the 4.0 stream but I think the issue is present there too.
The OASFactoryErrorTest seems to not be self-sufficient, depends on initialization done by OASScanConfigTests.
This can result in test failures when the tests run in a wrong order. The test order is however random / undefined.
How the test fails
The actual exceptions look like:
Reproduction
I can reproduce the problem on current Wildfly. Pre-build the project with following command:
Then:
mvn test -pl :wildfly-ts-integ-mp-openapi -DallTests -Dtest=OASFactoryErrorTest
mvn test -pl :wildfly-ts-integ-mp-openapi -DallTests
Note: I'm enforcing the order in the third example by introducing a suite.xml file:
and then configuring the surefire plugin to use that file:
With that, the two tests in given order are run with
mvn test -pl :wildfly-ts-integ-mp-openapi -DallTests
.What I think can be wrong with the test
The OpenAPI Spec states following in the section 5.1 (https://download.eclipse.org/microprofile/microprofile-open-api-3.1.1/microprofile-openapi-spec-3.1.1.html#_overview):
Note the last point - the app uses JAX-RS.
Checking the OASFactoryErrorTest, it uses an empty deployment, where where there are no REST annotations present:
I don't think any of the other conditions are configured either.
The text was updated successfully, but these errors were encountered: