spockframework / spockframework/spock
ConfineMetaClassChanges leaks metaClass change
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 3.6k
- Forks
- 483
- PR merge metrics
- No merged PRs in 30d
Description
Issue description
A clear and concise description.
Make sure you choose the correct label as well (bug or enhancement)
A metaClass change that should be confined with ConfineMetaClassChanges leaks and causes a test failure in other tests
How to reproduce:
- clone https://github.com/secretescapes/grails-test-bug
- ensure you're running Grails 2
- grails test-app unit: spock.bug.FooSpec spock.bug.BarSpec spock.bug.BazSpec
Link to a gist or similar (optional)
Commit with the relevant snippets:
https://github.com/secretescapes/grails-test-bug/commit/a65fa39f8db2179a14ca8e5b95b3e7ad1fe0fab7
Additional Environment information
Version of your build tool(if used), Java, Groovy, IDE, OS etc
Grails 2
Java/JDK
openjdk version "1.8.0_111"
OpenJDK Runtime Environment (build 1.8.0_111-8u111-b14-2ubuntu0.16.10.2-b14)
OpenJDK 64-Bit Server VM (build 25.111-b14, mixed mode)
Groovy version
Note that versions older than 2.0 are no longer supported.
2.4.6
Build tool version
Grails 2.5.5
Operating System
Linux
Grails 2 is unsupported, but this error should be impossible, whatever framework one is using. I hoped that the Grails developers would be able to shine some light upon the machinery that's causing ConfineMetaClassChanges to not work as expected, but maybe the sample project is enough for you to understand what's going wrong?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Clone the linked grails-test-bug project and run the provided Grails test-app command to reproduce the failure. Read the referenced commit and investigate ConfineMetaClassChanges around the failing specifications; done means the confined metaClass change no longer leaks and the listed tests pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- groovy, java
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100