Hi I have a pact consumer unit test that very oft...
# general
c
Hi I have a pact consumer unit test that very often and somewhat randomly thows the error "Unable to start mock server". The corresponding error trace would look like this:
Copy code
Error Message:

   System.InvalidOperationException : Unable to start mock server

  Stack Trace:

     at PactNet.Drivers.HttpPactDriver.CreateMockServer(String host, Nullable`1 port, Boolean tls)

   at PactNet.PactBuilder.StartMockServer()

   at PactNet.PactBuilder.VerifyAsync(Func`2 interact)

   at MyConsumer.PactConsumer.MyConsumerPactTest.GetUsersByValidParam() in /pact/MyConsumer.PactConsumer/MyConsumerPactTest.cs:line 93

   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_0(Object state)
I'm not sure whether the source of this error is in Pact.NET library or in deeper non .NET pact libraries involved. I have asked this question also in Pact.NET forum with a test project to reproduce the problem: https://pact-foundation.slack.com/archives/C9UTHV2AD/p1676368784117769