Description
All 15 tests in CopilotChatClientTests fail with the same root cause:
System.NotSupportedException: CopilotChatClient requires async disposal. Use 'await using' or call DisposeAsync() directly.
The error is thrown from CopilotChatClient.Dispose() (line 245 of Agents/Infrastructure/CopilotChatClient.cs). The synchronous Dispose() method throws NotSupportedException, causing every test that constructs a CopilotChatClient and disposes it synchronously to fail.
Failing Tests
All in CobolToQuarkusMigration.Tests/Agents/Infrastructure/CopilotChatClientTests.cs:
- Constructor tests
- Metadata tests
- Service resolution tests
- Disposal tests
Suggested Fix
Update the test fixtures to use await using or call DisposeAsync() instead of relying on synchronous Dispose(). Alternatively, implement a non-throwing synchronous Dispose() that delegates to DisposeAsync() if the tests need to support both patterns.
Context
Discovered during review of PR #67. These failures are pre-existing and unrelated to that PR's changes.
Description
All 15 tests in
CopilotChatClientTestsfail with the same root cause:The error is thrown from
CopilotChatClient.Dispose()(line 245 ofAgents/Infrastructure/CopilotChatClient.cs). The synchronousDispose()method throwsNotSupportedException, causing every test that constructs aCopilotChatClientand disposes it synchronously to fail.Failing Tests
All in
CobolToQuarkusMigration.Tests/Agents/Infrastructure/CopilotChatClientTests.cs:Suggested Fix
Update the test fixtures to use
await usingor callDisposeAsync()instead of relying on synchronousDispose(). Alternatively, implement a non-throwing synchronousDispose()that delegates toDisposeAsync()if the tests need to support both patterns.Context
Discovered during review of PR #67. These failures are pre-existing and unrelated to that PR's changes.