Fix HttpClient timeout for long-running tools without event stream store (#1268)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: halter73 <54385+halter73@users.noreply.github.com>
This commit is contained in:
parent
ec2983b29f
commit
fb2daf2f0d
1 changed files with 172 additions and 41 deletions
|
|
@ -81,7 +81,7 @@ public abstract class OAuthTestBase : KestrelInMemoryTest, IAsyncDisposable
|
|||
}
|
||||
}
|
||||
|
||||
protected async Task<WebApplication> StartMcpServerAsync(string path = "", string? authScheme = null)
|
||||
protected async Task<WebApplication> StartMcpServerAsync(string path = "", string? authScheme = null, Action<WebApplication>? configureMiddleware = null)
|
||||
{
|
||||
// Wait for the OAuth server to be ready before starting the MCP server.
|
||||
// This prevents race conditions in CI where the OAuth server may not be
|
||||
|
|
@ -94,6 +94,10 @@ public abstract class OAuthTestBase : KestrelInMemoryTest, IAsyncDisposable
|
|||
});
|
||||
|
||||
var app = Builder.Build();
|
||||
|
||||
// Allow tests to add custom middleware before MapMcp
|
||||
configureMiddleware?.Invoke(app);
|
||||
|
||||
app.MapMcp(path).RequireAuthorization(new AuthorizeAttribute
|
||||
{
|
||||
AuthenticationSchemes = authScheme
|
||||
|
|
|
|||
Loading…
Reference in a new issue