#28 Create opportunity to disable SingleThread checks

EasyMock (33)

In earlier versions of Easymock, it was possible to call a mock from different threads concurrently. This is now no longer possible: Either it is checked whether the mock is called only from a single thread, or all mock calls are synchronized.
This is bad if one wants to test the threading behaviour of an object which calls methods on a second (mocked) object. To check whether synchronisation is correct, the mock needs to have the same threading behavior as the mocked object. One common case is that there is no synchronisation in the mocked object, and this behaviour cannot be produced in the mocks any more.
My suggestion would be to add a disableThreadChecks(boolean disable) method to the IMocksControl object, which would be used to disable the thread checks if the mock is not synchronized.


  • Henri Tremblay

    Henri Tremblay - 2009-08-18

    This method does exist. It's called checkIsUsedInOneThread.

  • SourceForge Robot

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 14 days (the time period specified by
    the administrator of this Tracker).


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks