Concurrently running several mock instances

Nov 12, 2015 at 12:40 PM
Edited Nov 12, 2015 at 12:44 PM

Thank you Svetoslav for developing TransMock!
I've finally managed to code working BizUnit test with mocking of external services.

But, I'm still having trouble mocking several instances (i.e. more than 2) of the same service in a test.

An incoming message in a MockSendStep to a service contains several messages that are debatched in the receive pipeline. Each of these messages are then routed to mock instances (MockRequestResponseStep) of another service.

When I increase the number of batched incoming messages to more than two I get error messages: "The agent process was stopped while the test was running' under Test Result Details
and in the Event Log:
"(QTAgent32.exe, PID 8356, Thread 99) Exception data being reported in Watson: Exception: IOException, Message: All pipe instances are busy."

I've done a lot of testing with different ordering of test step, concurrency and timeout values.
But, I have probably not set up the tests correctly.

I'm wondering how you would set up a test for the scenario mentioned above.
Let's say: one incoming batch message to service1 containing 10 messages , and then these 10 messages sent to 10 mock instances of service2.

I would appreciate some advice and assistance.

Dec 12, 2015 at 9:42 PM
Hi Tore, I am glad to hear that you, and hopefully the rest of the Bama team, are really taking TransMock to heart and are using it in your development cycle. The errors that you experience are good indicators that the framework does not behave correctly in this scenario i am afraid. I can assure you that I do not have a test case that covers this scenario which means only one thing - i have to sit down and write at least one such test.
I will soon crack on with this and will let you know of the outcome.

Thanks, Svetoslav