apache / apache/grails-intellij-plugin

Grails integration tests are failing to run in an "integration" context - fail immediatly

Open
#313 0 comments 0 reactions 0 assignees View on GitHub
bug imported-from-youtrack
Dominant language
Java
Stars
17
Forks
4
Avg merge
5d 15h
Merged PRs (30d)
4

Description

[https://intellij-support.jetbrains.com/hc/en-us/community/posts/115000474324-Grails-integration-tests-incorrectly-running-as-unit-tests-since-last-intellij-update-2017-2-1-causing-No-transactionManager-was-specified-errors?page=1#community_comment_115000402384](https://intellij-support.jetbrains.com/hc/en-us/community/posts/115000474324-Grails-integration-tests-incorrectly-running-as-unit-tests-since-last-intellij-update-2017-2-1-causing-No-transactionManager-was-specified-errors?page=1#community_comment_115000402384)

Some details from the forum above. Test case project attached. Steps:

1. Open project (grails 3.2.11) as gradle with auto import
2. Right click on src/integration-tests -> Run All Tests
Immediate failure:
```
java.lang.IllegalStateException: No transactionManager was specified. Using @Transactional or @Rollback requires a valid configured transaction manager. If you are running in a unit test ensure the test has been properly configured and that you run the test suite not an individual test method.

at grails.transaction.GrailsTransactionTemplate.(GrailsTransactionTemplate.groovy:60)
at PersonIntegrationSpec.Creating people should work(PersonIntegrationSpec.groovy)
```
- It appears that the grails integration environment isn't starting, and the test is running as though it were a unit test, which it is not.
- grails test-app works fine

Host System:
IntelliJ IDEA Ultimate 2017.2.1 Build #IU-172.3544.35 July 31 / JRE 1.8.0_152-release-915b6 x86_64
java 8u131-zulu
grails 3.2.11
macOS Sierra 10.12.6

---

*Imported from [IDEA-176984](https://youtrack.jetbrains.com/issue/IDEA-176984) · Type: Bug · Votes: 1*
*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

Reproduce the failure by opening the Grails 3.2.11 project and running all tests from src/integration-tests, then compare it with the successful grails test-app run. Trace how the IntelliJ run action launches PersonIntegrationSpec.groovy and verify that it starts the integration environment rather than a unit-test context. Done means the integration tests run without the missing transactionManager error.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
devtools, testing, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.