Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
Currently, running unit tests for ambari-utility fails with the following error.
$ mvn clean test -f ambari-utility/pom.xml ... [ERROR] Tests run: 8, Failures: 0, Errors: 7, Skipped: 0, Time elapsed: 0.656 s <<< FAILURE! - in org.apache.ambari.swagger.AmbariSwaggerReaderTest ... [ERROR] Errors: [ERROR] AmbariSwaggerReaderTest.swaggerApiThatIsBothTopLevelAndNestedIsCountedAsTopLevel:171 » NoSuchMethod [ERROR] AmbariSwaggerReaderTest.swaggerBasicCase:71 » NoSuchMethod com.fasterxml.jacks... [ERROR] AmbariSwaggerReaderTest.swaggerConflictingNestedApis:86 » NoSuchMethod com.fas... [ERROR] AmbariSwaggerReaderTest.swaggerConflictingNestedApisWithBadPreferredParent:140 » NoSuchMethod [ERROR] AmbariSwaggerReaderTest.swaggerConflictingNestedApisWithPreferredParent:103 » NoSuchMethod [ERROR] AmbariSwaggerReaderTest.swaggerConflictingNestedApisWithSamePreferredParent:121 » NoSuchMethod [ERROR] AmbariSwaggerReaderTest.swaggerNestedApisWithOverwrite:156 » NoSuchMethod com.... [INFO] [ERROR] Tests run: 10, Failures: 0, Errors: 7, Skipped: 1 [INFO] [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------
This is because the old version of Swagger uses Jackson's getType method internally, which is deprecated and removed in v2.9, while we are using Jackson v2.12.
Upgrading Swagger to 1.6.2 or greater fixes this problem, just like the following case.
https://github.com/swagger-api/swagger-core/issues/3554#issuecomment-652366376
Attachments
Issue Links
- links to