JetBrains / lincheck

Framework for testing concurrent data structures
Mozilla Public License 2.0
576 stars 33 forks source link

UnsupportedOperationException: class redefinition failed: attempted to change the schema (add/remove fields) #334

Closed lukaszkalnik closed 2 months ago

lukaszkalnik commented 3 months ago

I integrated the example BasicCounterTest from the tutorial into my Android project and when trying to run it I get the following exception: java.lang.UnsupportedOperationException: class redefinition failed: attempted to change the schema (add/remove fields)

I have the dependency for lincheck 2.32 and JUnit 5.10.2. I'm on Kotlin 2.0.

When I create a new project with the same dependencies, the test works as expected. My current project setup is quite complex, although I don't have any problems with other JUnit5 and JUnit4 tests there.

I have useJUnitPlatform() in my build.gradle.kts android block.

Any hints on what I should look into to fix the issue? Thank you!

ndkoval commented 3 months ago

Hi @lukaszkalnik, do you use Java agents when running the tests?

ndkoval commented 2 months ago

@lukaszkalnik, could you please provide a reproducer, please?

lukaszkalnik commented 2 months ago

Unfortunately not, it is a big Android project with a mix of Junit 4 & 5 and Kotest tests, where I just added lincheck tests for one helper class. I've since removed the helper class along with lincheck.

ndkoval commented 2 months ago

@lukaszkalnik, I would be happy to help with your issue, but it is difficult without a reproducer or any specific input about the environment. Since the issue does not look relevant to you at the moment, and the required information cannot be provided, I'm closing it.