-
Notifications
You must be signed in to change notification settings - Fork 235
Open
Labels
bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behaviortriageThis issue is yet to be triaged by a maintainerThis issue is yet to be triaged by a maintainer
Description
Version information:
- OS: Windows
- PactNet Version: 5.0.0-beta.3
- .Net Version: .Net 8
Describe the bug
We're seeing intermittent issues, both locally and in CI, on Windows whereby the messaging provider fails to start, with the error:
PactNet.Exceptions.PactFailureException : Unable to start the internal messaging server
---- System.Net.HttpListenerException : The process cannot access the file because it is being used by another process
Stack Trace:
at PactNet.Verifier.Messaging.MessagingProvider.Start(JsonSerializerOptions settings) in /_/src/PactNet/Verifier/Messaging/MessagingProvider.cs:line 85
at PactNet.Tests.Verifier.Messaging.MessagingProviderTests..ctor(ITestOutputHelper output) in D:\a\pact-net\pact-net\tests\PactNet.Tests\Verifier\Messaging\MessagingProviderTests.cs:line 45
----- Inner Stack Trace -----
at System.Net.HttpListener.AddAllPrefixes()
at System.Net.HttpListener.Start()
at PactNet.Verifier.Messaging.MessagingProvider.Start(JsonSerializerOptions settings) in /_/src/PactNet/Verifier/Messaging/MessagingProvider.cs:line 75
Steps To Reproduce
Intermittently happens when running messaging tests
Expected behavior
The messaging server finds a free port and starts successfully
Additional context
Doesn't seem to happen on non-Windows systems
clazarr
Metadata
Metadata
Assignees
Labels
bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behaviortriageThis issue is yet to be triaged by a maintainerThis issue is yet to be triaged by a maintainer