Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 28, 2026

ServiceProvider instances in test methods were not being disposed, causing gRPC channel handle leaks across test runs.

Changes

  • Updated 8 test methods to use await using for ServiceProvider disposal
  • Changed affected test signatures from void to async Task
  • Refactored two tests that verify disposal behavior to use scoped using blocks

Example

Before:

[Fact]
public void UseDurableTaskScheduler_WithEndpointAndCredential_ShouldConfigureCorrectly()
{
    // ...
    ServiceProvider provider = services.BuildServiceProvider();
    // provider never disposed
}

After:

[Fact]
public async Task UseDurableTaskScheduler_WithEndpointAndCredential_ShouldConfigureCorrectly()
{
    // ...
    await using ServiceProvider provider = services.BuildServiceProvider();
    // automatically disposed when scope exits
}

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

… resources

Co-authored-by: torosent <17064840+torosent@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix GrpcChannel handle leak in AzureManaged backend Fix resource leaks in DurableTaskSchedulerWorkerExtensionsTests Jan 28, 2026
Copilot AI requested a review from torosent January 28, 2026 16:28
@torosent torosent marked this pull request as ready for review January 28, 2026 16:31
@torosent torosent merged commit d5d1151 into torosent/fix-grpc-channel-dispose Jan 28, 2026
3 checks passed
@torosent torosent deleted the copilot/sub-pr-625 branch January 28, 2026 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants