Hello guys, Do you know if MockRepository is thread-safe?
I have some code here using an instance of MockRepository (new MockRepository()) to set some Ordered and Unordered expectations. The expectations are meant to be met by some code that will call the mocks in parallel (using .NET 4 features). My code and (especially) my tests work fine when I run them in a single core environment (and test pass), but when I run them on a multi-core machine, the expectations are not met (and test fail). Is it supposed to work? Is it a known issue? Could I be doing something wrong? My test flow is as follows: - create mockRepository and mocks - set expectations (ordered and unordered) - mockRepository.ReplayAll() - call the expected methods on the mocks - in parallel (and here I'm sure I am calling all the expected methods) - wait for a bit (surely enough for the parallel threads to finish) - mockRepository.VerifyAll() - expectations FAIL Thanks, Caio -- You received this message because you are subscribed to the Google Groups "Rhino.Mocks" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rhinomocks?hl=en.
