Skip to content
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

UnitTestBot incompatible with Idea 2022.2, with JBR 17 as runtime #481

Closed
alisevych opened this issue Jul 11, 2022 · 1 comment
Closed
Assignees
Labels
ctg-bug Issue is a bug priority-blocker Bug blocking some of the main features priority-top-focus Top priority chosen by dev team

Comments

@alisevych
Copy link
Member

Description

UnitTestBot does not work on Idea 2022.2 EAP, as it uses JBR 17 as its runtime.

To Reproduce

Steps to reproduce the behavior:

  1. Install next version of IntelliJ IDEA (to be yet released)
    https://www.jetbrains.com/ru-ru/idea/nextversion/#section=windows
  2. Install one of the latest UTBotJava plugins
  3. Open a project with JDK 8 with some Java class, Create tests with UTBot... for it with default settings
  4. Do the same for some project with JDK 11

Expected behavior

Tests are supposed to be generated.

Actual behavior
No tests are generated, the following exception is thrown:

java.lang.IllegalArgumentException: Unsupported class file major version 61
	at org.objectweb.asm.ClassReader.<init>(ClassReader.java:196)
	at org.objectweb.asm.ClassReader.<init>(ClassReader.java:177)
	at org.objectweb.asm.ClassReader.<init>(ClassReader.java:163)
	at org.objectweb.asm.ClassReader.<init>(ClassReader.java:284)
	at soot.asm.AsmClassSource.resolve(AsmClassSource.java:64)
	at soot.SootResolver.bringToHierarchyUnchecked(SootResolver.java:253)
	at soot.SootResolver.bringToHierarchy(SootResolver.java:221)
	at soot.SootResolver.bringToSignatures(SootResolver.java:292)
	at soot.SootResolver.bringToBodies(SootResolver.java:332)
	at soot.SootResolver.processResolveWorklist(SootResolver.java:171)
	at soot.SootResolver.resolveClass(SootResolver.java:141)
	at soot.Scene.tryLoadClass(Scene.java:965)
	at soot.Scene.loadBasicClasses(Scene.java:1670)
	at soot.Scene.loadNecessaryClasses(Scene.java:1770)
	at org.utbot.framework.plugin.api.SootUtilsKt.runSoot(SootUtils.kt:80)
	at org.utbot.framework.plugin.api.UtBotTestCaseGenerator.init(UtBotTestCaseGenerator.kt:111)
	at org.utbot.intellij.plugin.generator.CodeGenerator.<init>(CodeGenerator.kt:44)
	at org.utbot.intellij.plugin.generator.CodeGenerator.<init>(CodeGenerator.kt:36)
	at org.utbot.intellij.plugin.ui.UtTestsDialogProcessor$createTests$2$1.run(UtTestsDialogProcessor.kt:157)
	at com.intellij.openapi.progress.impl.CoreProgressManager.startTask(CoreProgressManager.java:442)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.startTask(ProgressManagerImpl.java:114)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcessWithProgressAsynchronously$5(CoreProgressManager.java:493)
	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$3(ProgressRunner.java:252)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:188)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$12(CoreProgressManager.java:608)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:683)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:639)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:607)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:175)
	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$4(ProgressRunner.java:252)
	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:702)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:699)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:699)
	at java.base/java.lang.Thread.run(Thread.java:833)

Environment

IntelliJ IDEA 2022.2 Beta (Ultimate Edition)
Build #IU-222.3345.16, built on July 7, 2022
Expiration date: August 6, 2022
Runtime version: 17.0.3+7-b469.19 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Linux 5.13.0-52-generic
GC: G1 Young Generation, G1 Old Generation
Memory: 16384M
Cores: 16
Non-Bundled Plugins:
com.jetbrains.grayTheme (1.3)
org.utbot.intellij.plugin.id (2022.7-beta)

Kotlin: 222-1.7.0-release-282-IJ3345.16
Current Desktop: ubuntu:GNOME

Originally posted by @dtim in #373 (comment)

@korifey korifey moved this to Todo in UTBot Java Jul 11, 2022
@alisevych alisevych added the ctg-bug Issue is a bug label Jul 11, 2022
@alisevych alisevych assigned dtim and denis-fokin and unassigned dtim Jul 11, 2022
@alisevych alisevych changed the title UnitTestBot does not work on Idea 2022.2 EAP, as it uses JBR 17 as its runtime UnitTestBot incompatible with upcoming Idea 2022.2 EAP, with JBR 17 as its runtime Jul 11, 2022
@alisevych alisevych changed the title UnitTestBot incompatible with upcoming Idea 2022.2 EAP, with JBR 17 as its runtime UnitTestBot incompatible with upcoming Idea 2022.2 EAP, with JBR 17 as runtime Jul 11, 2022
@alisevych alisevych added the priority-blocker Bug blocking some of the main features label Jul 27, 2022
@alisevych alisevych changed the title UnitTestBot incompatible with upcoming Idea 2022.2 EAP, with JBR 17 as runtime UnitTestBot incompatible with Idea 2022.2, with JBR 17 as runtime Jul 27, 2022
@alisevych alisevych added this to the Release preparation milestone Sep 7, 2022
@alisevych alisevych added the priority-top-focus Top priority chosen by dev team label Sep 7, 2022
@alisevych
Copy link
Member Author

The issue is irrelevant. #1021 was described that prevents UTBot to work on new IDEA.

@alisevych alisevych closed this as not planned Won't fix, can't repro, duplicate, stale Sep 28, 2022
Repository owner moved this from Todo to Done in UTBot Java Sep 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ctg-bug Issue is a bug priority-blocker Bug blocking some of the main features priority-top-focus Top priority chosen by dev team
Projects
Archived in project
Development

No branches or pull requests

3 participants