I have the following problem: one of my JUnit tests gets stuck in eclipse doing nothing, but the blue arrow indicating that this test is currently running persists.
There definitely isn't any infinite loop in my code, and everything in the tested method that gets stuck is in the following for
loop:
for (int i = 0; i < this.length(); i += 3) {
// do some stuff
}
Also, when debugging, the method properly terminates and does not let me step any more.
In the setUp()
I am initializing my fields and the class under test.
This seems like some weird JUnit/Eclipse bug. I am running Eclipse 3.7.2 and JUnit 4 under Ubuntu 12.04 using oracle-java-7.
Any tips how to troubleshoot this problem?
If the test is still running, you can look at the active threads in the debug
tab and suspend them by pressing the pause button. That will tell you where the test is stuck.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With