Fix docker based integration tests to be more robust (#74)

* Fix docker based integration tests to be more robust
* Make docker based integration tests manual
This commit is contained in:
Peder Holdgaard Pedersen 2025-03-15 20:56:46 +01:00 • committed by GitHub
commit 7bf450e443
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -56,13 +56,16 @@ public class SseIntegrationTests
}
[Fact]
[Trait("Execution", "Manual")]
public async Task ConnectAndReceiveMessage_EverythingServerWithSse()
{
using var loggerFactory = Microsoft.Extensions.Logging.LoggerFactory.Create(builder =>
builder.AddConsole()
.SetMinimumLevel(LogLevel.Debug));
await using var fixture = new EverythingSseServerFixture();
int port = 3001;
await using var fixture = new EverythingSseServerFixture(port);
await fixture.StartAsync();
var defaultOptions = new McpClientOptions
@ -76,7 +79,7 @@ public class SseIntegrationTests
Name = "Everything",
TransportType = TransportTypes.Sse,
TransportOptions = [],
Location = "http://localhost:3001/sse"
Location = $"http://localhost:{port}/sse"
};
using var factory = new McpClientFactory(
@ -94,6 +97,7 @@ public class SseIntegrationTests
}
[Fact]
[Trait("Execution", "Manual")]
public async Task Sampling_Sse_EverythingServer()
{
// arrange
@ -101,7 +105,9 @@ public class SseIntegrationTests
builder.AddConsole()
.SetMinimumLevel(LogLevel.Debug));
await using var fixture = new EverythingSseServerFixture();
int port = 3002;
await using var fixture = new EverythingSseServerFixture(port);
await fixture.StartAsync();
var defaultOptions = new McpClientOptions
@ -123,7 +129,7 @@ public class SseIntegrationTests
Name = "Everything",
TransportType = TransportTypes.Sse,
TransportOptions = [],
Location = "http://localhost:3001/sse"
Location = $"http://localhost:{port}/sse"
};
using var factory = new McpClientFactory(