|
|
|
[
Permlink
| « Hide
]
James Davis - 04/May/09 01:14 AM
This test case can be used to duplicate this bug. I was unable to duplicate a crash with it as yet (test is still running though). The first 10 passes ran somewhat quickly, but after 10, they get very very slow. Each new one takes as long as the previous one plus more time (I don't think it's quite exponential, but it doesn't seem right at all). The test has been running for about 5 minutes and only gotten upto 15 iterations.
The test case I submitted has some simple case objects. In my actual project I'm working on, the objects are much larger and it crashes on a similar test after about 4-5 executions. It may be related to overall size of the classes.
I don't know if this will be of any usefulness, but I've also attached the java crash report.
Thanks man, especially the attached testcase made this bug easy to spot.
The reason for this behavior is the following: During the execution of methods on mock objects, parameters and return values are cloned (using a custom written deep-clone mechanism): this way, we can compare with the objects at invocation time when doing asserts and output the values at invocation time in error messages. Since in your test the return value is a mock object itself, and the mock object contains a reference to the 'Scenario' object, which in turn contains a reference to all cloned values, the amount of objects that is copied doubles during each iteration in your loop. I will fix this issue asap. Filip I can confirm this is fixed in 2.3.
Thanks, this really helps. |
||||||||||||||||||||||||||||||||||||||||||||||||||||