-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
mvn test: Failed to resolve 'FakeType' into class, java.lang.AssertionError: expected ... found .. #4589
Comments
The We can not reproduce your failed test building with java 11+ with command |
The command was |
Thanks for details, reopening as issue is reproducible when building/testing with Java 21+. Issue is related to not ignored |
fixed in #4597 |
Branch v.2.2.20 mvn test throws errors here
19:08:28.211 [main] ERROR i.s.v3.core.util.ReflectionUtils - Failed to resolve 'FakeType' into class java.lang.ClassNotFoundException: FakeType at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521) at io.swagger.v3.core.util.ReflectionUtils.loadClassByName(ReflectionUtils.java:53) at io.swagger.v3.core.util.ReflectionUtils.typeFromString(ReflectionUtils.java:35) at io.swagger.v3.core.util.reflection.ReflectionUtilsTest.typeFromStringTest(ReflectionUtilsTest.java:38)
19:08:28.216 [main] ERROR i.s.v3.core.util.ReflectionUtils - Failed to resolve 'null' into class java.lang.NullPointerException: null at java.base/java.lang.Class.forName0(Native Method) at java.base/java.lang.Class.forName(Class.java:383) at java.base/java.lang.Class.forName(Class.java:376) at io.swagger.v3.core.util.ReflectionUtils.loadClassByName(ReflectionUtils.java:51) at io.swagger.v3.core.util.ReflectionUtils.typeFromString(ReflectionUtils.java:35) at io.swagger.v3.core.util.reflection.ReflectionUtilsTest.typeFromStringTest(ReflectionUtilsTest.java:39) Tests run: 429, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 6.922 sec <<< FAILURE!
testBooleanAdditionalPropertiesSerialization(io.swagger.v3.core.serialization.OpenAPI3_1SerializationTest) Time elapsed: 0.014 sec <<< FAILURE!
java.lang.AssertionError: expected [openapi: 3.1.0
components:
schemas:
test:
type: object
additionalProperties: true
] but found [openapi: 3.1.0
components:
schemas:
test:
type: object
additionalProperties: true
]
at org.testng.Assert.fail(Assert.java:111)
at org.testng.Assert.failNotEquals(Assert.java:1578)
at org.testng.Assert.assertEqualsImpl(Assert.java:150)
at org.testng.Assert.assertEquals(Assert.java:132)
at org.testng.Assert.assertEquals(Assert.java:656)
at org.testng.Assert.assertEquals(Assert.java:666) io.swagger.v3.core.serialization.OpenAPI3_1SerializationTest.testBooleanAdditionalPropertiesSerialization(OpenAPI3_1SerializationTest.java:1471)'
Results :
Failed tests: testBooleanAdditionalPropertiesSerialization(io.swagger.v3.core.serialization.OpenAPI3_1SerializationTes(..)expected [openapi: 3.1.0
Tests run: 429, Failures: 1, Errors: 0, Skipped: 0
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for swagger-project 2.2.20:
[INFO]
[INFO] swagger-project .................................... SUCCESS [ 0.205 s]
[INFO] swagger-annotations ................................ SUCCESS [ 1.834 s]
[INFO] swagger-models ..................................... SUCCESS [ 4.175 s]
[INFO] swagger-core ....................................... FAILURE [ 10.747 s]
Since this is the stable release, what I am doing wrong in the initial build?
The text was updated successfully, but these errors were encountered: