File tree Expand file tree Collapse file tree
test/Orleans.Reminders.Tests/TimerTests Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -262,7 +262,7 @@ public async Task SiloStatusListenerBarrier_WaitsForCurrentMembershipVersion()
262262 var initialSilo = Assert . Single ( fixture . HostedCluster . Silos ) ;
263263 using var cancellation = CancellationTokenSource . CreateLinkedTokenSource ( TestContext . Current . CancellationToken ) ;
264264 cancellation . CancelAfter ( TestConstants . InitTimeout ) ;
265- var listener = new BlockingSiloStatusListener ( initialSilo . SiloAddress ) ;
265+ using var listener = new BlockingSiloStatusListener ( initialSilo . SiloAddress ) ;
266266 var statusOracle = initialSilo . ServiceProvider . GetRequiredService < ISiloStatusOracle > ( ) ;
267267 Assert . True ( statusOracle . SubscribeToSiloStatusEvents ( listener ) ) ;
268268 Task < List < InProcessSiloHandle > > ? startTask = null ;
@@ -591,7 +591,7 @@ public override async ValueTask DisposeAsync()
591591 }
592592 }
593593
594- private sealed class BlockingSiloStatusListener ( SiloAddress localSilo ) : ISiloStatusListener
594+ private sealed class BlockingSiloStatusListener ( SiloAddress localSilo ) : ISiloStatusListener , IDisposable
595595 {
596596 private readonly TaskCompletionSource _blocked = new ( TaskCreationOptions . RunContinuationsAsynchronously ) ;
597597 private readonly ManualResetEventSlim _release = new ( ) ;
@@ -614,6 +614,8 @@ public Task WaitUntilBlockedAsync(CancellationToken cancellationToken)
614614 => _blocked . Task . WaitAsync ( cancellationToken ) ;
615615
616616 public void Release ( ) => _release . Set ( ) ;
617+
618+ public void Dispose ( ) => _release . Dispose ( ) ;
617619 }
618620
619621 private sealed class NullReturningReminderTable : IReminderTable
You can’t perform that action at this time.
0 commit comments