Skip to content

Update TestNG Version #2582

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

Merged
merged 3 commits into from
Apr 3, 2019
Merged

Update TestNG Version #2582

merged 3 commits into from
Apr 3, 2019

Conversation

jmini
Copy link
Member

@jmini jmini commented Apr 2, 2019

PR checklist

  • Read the contribution guidelines.
  • Ran the shell script under ./bin/ to update Petstore sample so that CIs can verify the change. (For instance, only need to run ./bin/{LANG}-petstore.sh, ./bin/openapi3/{LANG}-petstore.sh if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in .\bin\windows\.
  • Filed the PR against the correct branch: master, 3.4.x, 4.0.x. Default: master.
  • Copied the technical committee to review the pull request if your PR is targeting a particular programming language. @OpenAPITools/generator-core-team

Description of the PR

To remove follwing Stacktrace:

[main] WARN  i.s.parser.util.DeserializationUtils - Error snake-parsing yaml content
io.swagger.parser.util.DeserializationUtils$SnakeException: Exception safe-checking yaml content  (maxDepth 2000)
	at io.swagger.parser.util.DeserializationUtils$CustomSnakeYamlConstructor.getSingleData(DeserializationUtils.java:300)
	at org.yaml.snakeyaml.Yaml.loadFromReader(Yaml.java:450)
	at org.yaml.snakeyaml.Yaml.load(Yaml.java:369)
	at io.swagger.parser.util.DeserializationUtils.readYamlTree(DeserializationUtils.java:137)
	at io.swagger.parser.Swagger20Parser.deserializeYaml(Swagger20Parser.java:83)
	at io.swagger.parser.Swagger20Parser.readWithInfo(Swagger20Parser.java:64)
	at io.swagger.parser.SwaggerParser.readWithInfo(SwaggerParser.java:32)
	at io.swagger.v3.parser.converter.SwaggerConverter.readLocation(SwaggerConverter.java:92)
	at io.swagger.parser.OpenAPIParser.readLocation(OpenAPIParser.java:19)
	at org.openapitools.codegen.config.CodegenConfigurator.toClientOptInput(CodegenConfigurator.java:606)
	at org.openapitools.codegen.cmd.Generate.run(Generate.java:367)
	at org.openapitools.codegen.OpenAPIGenerator.main(OpenAPIGenerator.java:60)
Caused by: java.lang.IllegalAccessError: tried to access field org.yaml.snakeyaml.constructor.BaseConstructor.composer from class io.swagger.parser.util.DeserializationUtils$CustomSnakeYamlConstructor
	at io.swagger.parser.util.DeserializationUtils$CustomSnakeYamlConstructor.getSingleData(DeserializationUtils.java:279)
	... 11 common frames omitted

That is due to an outdated version of org.yaml:snakeyaml, we need to update TestNG.

Before the change, our TestNG version 6.9.6 (very old) requires version 1.15 of org.yaml:snakeyaml as compile dependency.

I took the opportunity of this PR to also remove the JUnit stuff that was configured and used in some of our tests.

Copy link
Member

@wing328 wing328 left a comment

Choose a reason for hiding this comment

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

LGTM

@jmini jmini merged commit d42b6d9 into OpenAPITools:master Apr 3, 2019
@jmini jmini added this to the 4.0.0 milestone Apr 3, 2019
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