apache / apache/grails-intellij-plugin
Error running Grails tests from inside IntelliJ
- Dominant language
- Java
- Stars
- 17
- Forks
- 4
- Avg merge
- 5d 15h
- Merged PRs (30d)
- 4
Description
When I try to run the tests in my Grails 3.3.5 app from inside IntelliJ, I get the following error:
```
FAILURE: Build failed with an exception.
* What went wrong:
Could not read initialization script '/private/var/folders/h4/lrdc182d29n70jp52pm12l_h0000gn/T/ijtestinit.gradle' as it does not exist.
* Try:
Run with --info or --debug option to get more log output.
* Exception is:
org.gradle.api.resources.MissingResourceException: Could not read initialization script '/private/var/folders/h4/lrdc182d29n70jp52pm12l_h0000gn/T/ijtestinit.gradle' as it does not exist.
at org.gradle.internal.resource.UriTextResource.getAsReader(UriTextResource.java:110)
```
I have no problem doing either of the following
* Running the application from inside IntelliJ
* Running the test from the command-line
The problem was resolved by restarting IntelliJ, but I was asked to create this issue by a JetBrains employee because:
> I can implement more stable fix recreating this file if it is missing.
[Discussion of this issue in the Grails Slack channel](https://grails.slack.com/archives/C0NC33WQ0/p1524665244000142) with the aforementioned JetBrains employee (requires a Grails Slack account).
---
*Imported from [IDEA-190998](https://youtrack.jetbrains.com/issue/IDEA-190998) · Type: Bug · Votes: 0*
*Comments, attachments, dates and reporter are not part of the export — follow the link above for the full history.*
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing a Grails 3.3.5 test run from IntelliJ and tracing how the Gradle initialization script ijtestinit.gradle is created and consumed. The fix is done when the missing script is recreated reliably and the test runs successfully from IntelliJ without requiring a restart.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- groovy
- Domain
- build-system, testing-qa, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100