I am working to speed up a large number of integration tests in our environment.
The problem I am facing right now is that during teardown between tests one WCF service using msmq binding takes about 1 minute to close down.
I the teardown process we loop over our servicehosts calling the Close() method with a very short timeout, overriding the closeTimeout value in the WCF configuration. This works well for net.tcp bindings but the one service that uses msmq still takes 1 minute to close down. The closeTimeout doesn't seem to have any effect.
The config look like this for the test service:
<netMsmqBinding>
<binding name="NoMSMQSecurity" closeTimeout="00:00:01" timeToLive="00:00:05"
receiveErrorHandling="Drop" maxRetryCycles="2" retryCycleDelay="00:00:01" receiveRetryCount="2">
<security mode="None" />
</binding>
</netMsmqBinding>
And the closing call I use is straight forward like this:
service.Close(new TimeSpan(0, 0, 0, 0, 10));
Is there another approach I can take to close down the servicehost faster?
As this is an automated test that at this point has succeded or failed I don't want to wait for any other unprocessed messages or similar.
Best regards,
Per Salmi