Multiple threads invoking mocks

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Multiple threads invoking mocks

Magno Machado
I have a situation where I have one thread calling a method on a mock, and another thread invoking another method on another mock, and it looks like spock always wait for previous invocations to finish, even though it's on another thread, is it right? Can I workaround this?

I have mocked a serial port and I'm testing how my code will work in the case of a write that never returns, so I programmed the mocked method to take a lot of time (20s) to return, so I can't have the test to just wait for it

--
You received this message because you are subscribed to the Google Groups "Spock Framework - User" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/spockframework.
For more options, visit https://groups.google.com/d/optout.