GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Plugin fails with an exception if no SDK is configured for the test module · Issue #399 · UnitTestBot/UTBotJava

Plugin fails with an exception if no SDK is configured for the test module #399

New issue
Copy link
New issue
Copy link
Closed
#424
Closed
Plugin fails with an exception if no SDK is configured for the test module#399
#424
Copy link
Assignees
Vassiliy-Kudryashov
Labels
comp-uiImprovements of plugin UI appearence and functionalityImprovements of plugin UI appearence and functionalityctg-bugIssue is a bugIssue is a bug

Description

@dtim
dtim
opened on Jul 4, 2022
Issue body actions

Description

If the test module has no Java SDK configured, the plugin fails when it tries to get JDK version in UtTestsDialogProcessor::createDialog.

To Reproduce

In "Project Settings" dialogue set Project SDK as "No SDK", test module SDK as "No SDK". Try to generate tests for a class or a method.

Expected behavior

No tests are generated. Either a dialogue is open with an error message, or a stand-alone error message is displayed.

Actual behavior

A stand-alone error message is displayed (supposedly by Idea), the plugin fails with an IllegalStateException.

Visual proofs (screenshots, logs, images)

2022-07-04 18:17:50,954 [  25595]  ERROR - llij.ide.plugins.PluginManager - Failed to obtain JDK version of the project 
java.lang.IllegalStateException: Failed to obtain JDK version of the project
	at org.utbot.intellij.plugin.ui.ErrorNotifier.notify(Notifications.kt:51)
	at org.utbot.intellij.plugin.ui.Notifier.notify$default(Notifications.kt:29)
	at org.utbot.intellij.plugin.ui.utils.ModuleUtilsKt.jdkVersionBy(ModuleUtils.kt:243)
	at org.utbot.intellij.plugin.ui.utils.ModuleUtilsKt.jdkVersion(ModuleUtils.kt:43)
	at org.utbot.intellij.plugin.ui.UtTestsDialogProcessor.createDialog(UtTestsDialogProcessor.kt:72)
	at org.utbot.intellij.plugin.ui.UtTestsDialogProcessor.createDialogAndGenerateTests(UtTestsDialogProcessor.kt:55)
	at org.utbot.intellij.plugin.ui.actions.GenerateTestsAction.actionPerformed(GenerateTestsAction.kt:29)
	at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:282)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher$1.performAction(IdeKeyEventDispatcher.java:610)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.lambda$processAction$3(IdeKeyEventDispatcher.java:670)
	at com.intellij.openapi.application.TransactionGuardImpl.performUserActivity(TransactionGuardImpl.java:94)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processAction(IdeKeyEventDispatcher.java:669)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processAction(IdeKeyEventDispatcher.java:620)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processActionOrWaitSecondStroke(IdeKeyEventDispatcher.java:517)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.inInitState(IdeKeyEventDispatcher.java:471)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.dispatchKeyEvent(IdeKeyEventDispatcher.java:220)
	at com.intellij.ide.IdeEventQueue.dispatchKeyEvent(IdeEventQueue.java:888)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:833)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:450)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:744)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$9(IdeEventQueue.java:449)
	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:802)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:503)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
2022-07-04 18:17:50,955 [  25596]  ERROR - llij.ide.plugins.PluginManager - IntelliJ IDEA 2020.2  Build #IC-202.6397.94 
2022-07-04 18:17:50,955 [  25596]  ERROR - llij.ide.plugins.PluginManager - JDK: 11.0.7; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o. 
2022-07-04 18:17:50,955 [  25596]  ERROR - llij.ide.plugins.PluginManager - OS: Windows 10 
2022-07-04 18:17:50,955 [  25596]  ERROR - llij.ide.plugins.PluginManager - Plugin to blame: UnitTestBot version: 1.0-SNAPSHOT 
2022-07-04 18:17:50,955 [  25596]  ERROR - llij.ide.plugins.PluginManager - Last Action: org.utbot.intellij.plugin.ui.actions.GenerateTestsAction 

Environment

A Gradle project imported in Idea, configured to use no SDK.

Activity

  1. dtim
    added
    ctg-bugIssue is a bugIssue is a bug
    comp-uiImprovements of plugin UI appearence and functionalityImprovements of plugin UI appearence and functionality
    on Jul 4, 2022
  2. dtim
    assigned
    Vassiliy-Kudryashov
    on Jul 4, 2022
  3. Vassiliy-Kudryashov
    added this to UTBot Javaon Jul 5, 2022
  4. Vassiliy-Kudryashov
    moved this to Todo in UTBot Javaon Jul 5, 2022
  5. Vassiliy-Kudryashov
    moved this from Todo to In Progress in UTBot Javaon Jul 5, 2022
  6. Vassiliy-Kudryashov
    added a commit that references this issue on Jul 5, 2022

    Plugin fails with an exception if no SDK is configured for the test m…

    78f9194
  7. Vassiliy-Kudryashov
    linked a pull request that will close this issuePlugin fails with an exception if no SDK is configured for the test m… #424on Jul 5, 2022
  8. Vassiliy-Kudryashov
    closed this as completedin #424on Jul 5, 2022
  9. Vassiliy-Kudryashov
    added a commit that references this issue on Jul 5, 2022

    Plugin fails with an exception if no SDK is configured for the test m…

    65d95c1
  10. Repository owner moved this from In Progress to Done in UTBot Javaon Jul 5, 2022
  11. rudolf101
    added a commit that references this issue on Jul 8, 2022

    Squashed commit of the following:

    bf2e0e7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @Vassiliy-Kudryashov
    Vassiliy-Kudryashov

Labels

comp-uiImprovements of plugin UI appearence and functionalityImprovements of plugin UI appearence and functionalityctg-bugIssue is a bugIssue is a bug

Type

No type

Projects

  • UTBot Java
    Status
    Done
    Show more project fields

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.