GeezerVison is showing github.com — update java for cli images #2201 by bissquit · Pull Request #2203 · UnitTestBot/UTBotJava
Conversation
bissquit
commented
May 12, 2023
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Description
Upgrade Java from 11 to 17 for CLI Docker images
Fixes #2201
How to test
Automated tests
Not applicable
Manual tests
Try to run tests generation using new images
Self-check list
- I've set the proper labels for my PR (at least, for category and component).
- PR title and description are clear and intelligible.
- I've added enough comments to my code, particularly in hard-to-understand areas.
- The functionality I've repaired, changed or added is covered with automated tests.
- Manual tests have been provided optionally.
- The documentation for the functionality I've been working on is up-to-date.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
New JS image produce the following error:
Status Code: TEST_GENERATION_FAILED
TEST GENERATION: FAILED
WARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact performance.
09:44:06.660 | INFO | JsGenerateTestsCommand | Generating tests for [/var/utbot/processing/utbot-javascript-773819/source.js] - started
09:44:06.920 | ERROR | JsGenerateTestsCommand | An error has occurred while generating tests for file /var/utbot/processing/utbot-javascript-773819/source.js : java.io.IOException: Cannot run program ""node"" (in directory "/var/utbot/processing/utbot-javascript-773819/utbotJs"): error=2, No such file or directory
java.io.IOException: Cannot run program ""node"" (in directory "/var/utbot/processing/utbot-javascript-773819/utbotJs"): error=2, No such file or directory
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1143)
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1073)
at utils.JsCmdExec.runCommand(JsCmdExec.kt:20)
at service.TernService.runTypeInferencer(TernService.kt:79)
at service.TernService.<init>(TernService.kt:64)
at api.JsTestGenerator.run(JsTestGenerator.kt:127)
at org.utbot.cli.js.JsGenerateTestsCommand.run(JsGenerateTestsCommand.kt:102)
at com.github.ajalt.clikt.parsers.Parser.parse(Parser.kt:204)
at com.github.ajalt.clikt.parsers.Parser.parse(Parser.kt:213)
at com.github.ajalt.clikt.parsers.Parser.parse(Parser.kt:17)
at com.github.ajalt.clikt.core.CliktCommand.parse(CliktCommand.kt:396)
at com.github.ajalt.clikt.core.CliktCommand.parse$default(CliktCommand.kt:393)
at com.github.ajalt.clikt.core.CliktCommand.main(CliktCommand.kt:411)
at com.github.ajalt.clikt.core.CliktCommand.main(CliktCommand.kt:436)
at org.utbot.cli.js.ApplicationKt.main(Application.kt:31)
Caused by: java.io.IOException: error=2, No such file or directory
at java.base/java.lang.ProcessImpl.forkAndExec(Native Method)
at java.base/java.lang.ProcessImpl.<init>(ProcessImpl.java:314)
at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:244)
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1110)
... 14 more
And Python as well:
TEST GENERATION: FAILED
WARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact performance.
Error: no such option: "--visit-only-specified-source"
TEST RUN: ERROR OCCURRED
[object Object]: no details
But new Java is Ok
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
For Python when running CLI without --visit-only-specified-source, there's an error in docker container with CLI:
# java -jar utbot-cli.jar generate_python ./example.py -s . -p /usr/bin/python3.9 -o ./tests.py --coverage ./coverage.py --install-requirements
WARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact performance.
13:20:26.009 | INFO | PythonGenerateTestsCommand | Checking requirements...
java.io.IOException: Cannot run program "/usr/bin/python3.9": error=2, No such file or directory
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1143)
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1073)
at org.utbot.python.utils.ProcessUtilsKt.startProcess(ProcessUtils.kt:14)
at org.utbot.python.utils.ProcessUtilsKt.runCommand(ProcessUtils.kt:40)
at org.utbot.python.utils.ProcessUtilsKt.runCommand$default(ProcessUtils.kt:39)
at org.utbot.python.utils.RequirementsUtils.requirementsAreInstalled(RequirementsUtils.kt:22)
at org.utbot.python.utils.RequirementsUtils.requirementsAreInstalled(RequirementsUtils.kt:16)
at org.utbot.python.PythonTestGenerationProcessor.processTestGeneration(PythonTestGenerationProcessor.kt:74)
at org.utbot.python.PythonTestGenerationProcessor.processTestGeneration$default(PythonTestGenerationProcessor.kt:39)
at org.utbot.cli.language.python.PythonGenerateTestsCommand.run(PythonGenerateTestsCommand.kt:232)
at com.github.ajalt.clikt.parsers.Parser.parse(Parser.kt:204)
at com.github.ajalt.clikt.parsers.Parser.parse(Parser.kt:213)
at com.github.ajalt.clikt.parsers.Parser.parse(Parser.kt:17)
at com.github.ajalt.clikt.core.CliktCommand.parse(CliktCommand.kt:396)
at com.github.ajalt.clikt.core.CliktCommand.parse$default(CliktCommand.kt:393)
at com.github.ajalt.clikt.core.CliktCommand.main(CliktCommand.kt:411)
at com.github.ajalt.clikt.core.CliktCommand.main(CliktCommand.kt:436)
at org.utbot.cli.language.python.ApplicationKt.main(Application.kt:31)
Caused by: java.io.IOException: error=2, No such file or directory
at java.base/java.lang.ProcessImpl.forkAndExec(Native Method)
at java.base/java.lang.ProcessImpl.<init>(ProcessImpl.java:314)
at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:244)
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1110)
... 17 more
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
…egor-vasiliev/2201-upgrade-java-cli
Reviewers
At least 2 approving reviews are required to merge this pull request.
Uh oh!
There was an error while loading. Please reload this page.
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Upgrade Java in utbot-cli images
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.