Skip to content

Commit 9a6f6b9

Browse files
ReubenBondCopilot
andcommitted
Fix test compilation for AsyncTimerFactory TimeProvider parameter
Update all AsyncTimerFactory constructor calls in membership tests to pass TimeProvider.System as the new required parameter. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent c6ffc00 commit 9a6f6b9

4 files changed

Lines changed: 12 additions & 12 deletions

File tree

test/Orleans.Core.Tests/Membership/ClusterHealthMonitorTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -558,7 +558,7 @@ private ClusterHealthMonitorTestRig CreateClusterHealthMonitorTestRig(ClusterMem
558558
fatalErrorHandler: this.fatalErrorHandler,
559559
gossiper: this.membershipGossiper,
560560
log: this.loggerFactory.CreateLogger<MembershipTableManager>(),
561-
timerFactory: new AsyncTimerFactory(this.loggerFactory),
561+
timerFactory: new AsyncTimerFactory(this.loggerFactory, TimeProvider.System),
562562
this.lifecycle);
563563

564564
((ILifecycleParticipant<ISiloLifecycle>)manager).Participate(this.lifecycle);

test/Orleans.Core.Tests/Membership/MembershipAgentTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public MembershipAgentTests(ITestOutputHelper output)
8080
fatalErrorHandler: this.fatalErrorHandler,
8181
gossiper: this.membershipGossiper,
8282
log: this.loggerFactory.CreateLogger<MembershipTableManager>(),
83-
timerFactory: new AsyncTimerFactory(this.loggerFactory),
83+
timerFactory: new AsyncTimerFactory(this.loggerFactory, TimeProvider.System),
8484
this.lifecycle);
8585
((ILifecycleParticipant<ISiloLifecycle>)this.manager).Participate(this.lifecycle);
8686

test/Orleans.Core.Tests/Membership/MembershipTableManagerTests.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ public async Task MembershipTableManager_Restarted()
223223
fatalErrorHandler: this.fatalErrorHandler,
224224
gossiper: this.membershipGossiper,
225225
log: this.loggerFactory.CreateLogger<MembershipTableManager>(),
226-
timerFactory: new AsyncTimerFactory(this.loggerFactory),
226+
timerFactory: new AsyncTimerFactory(this.loggerFactory, TimeProvider.System),
227227
this.lifecycle);
228228

229229
// Validate that the initial snapshot is valid and contains the local silo.
@@ -319,7 +319,7 @@ public async Task MembershipTableManager_Superseded()
319319
fatalErrorHandler: this.fatalErrorHandler,
320320
gossiper: this.membershipGossiper,
321321
log: this.loggerFactory.CreateLogger<MembershipTableManager>(),
322-
timerFactory: new AsyncTimerFactory(this.loggerFactory),
322+
timerFactory: new AsyncTimerFactory(this.loggerFactory, TimeProvider.System),
323323
this.lifecycle);
324324

325325
((ILifecycleParticipant<ISiloLifecycle>)manager).Participate(this.lifecycle);
@@ -361,7 +361,7 @@ public async Task MembershipTableManager_AlreadyDeclaredDead()
361361
fatalErrorHandler: this.fatalErrorHandler,
362362
gossiper: this.membershipGossiper,
363363
log: this.loggerFactory.CreateLogger<MembershipTableManager>(),
364-
timerFactory: new AsyncTimerFactory(this.loggerFactory),
364+
timerFactory: new AsyncTimerFactory(this.loggerFactory, TimeProvider.System),
365365
this.lifecycle);
366366

367367
((ILifecycleParticipant<ISiloLifecycle>)manager).Participate(this.lifecycle);
@@ -399,7 +399,7 @@ public async Task MembershipTableManager_DeclaredDead_AfterJoining()
399399
fatalErrorHandler: this.fatalErrorHandler,
400400
gossiper: this.membershipGossiper,
401401
log: this.loggerFactory.CreateLogger<MembershipTableManager>(),
402-
timerFactory: new AsyncTimerFactory(this.loggerFactory),
402+
timerFactory: new AsyncTimerFactory(this.loggerFactory, TimeProvider.System),
403403
siloLifecycle: this.lifecycle);
404404
((ILifecycleParticipant<ISiloLifecycle>)manager).Participate(this.lifecycle);
405405
await this.lifecycle.OnStart();
@@ -445,7 +445,7 @@ public async Task MembershipTableManager_TrySuspectOrKill_ButIAmKill()
445445
fatalErrorHandler: this.fatalErrorHandler,
446446
gossiper: this.membershipGossiper,
447447
log: this.loggerFactory.CreateLogger<MembershipTableManager>(),
448-
timerFactory: new AsyncTimerFactory(this.loggerFactory),
448+
timerFactory: new AsyncTimerFactory(this.loggerFactory, TimeProvider.System),
449449
siloLifecycle: this.lifecycle);
450450
((ILifecycleParticipant<ISiloLifecycle>)manager).Participate(this.lifecycle);
451451
await this.lifecycle.OnStart();
@@ -487,7 +487,7 @@ public async Task MembershipTableManager_TrySuspectOrKill_AlreadyDead()
487487
fatalErrorHandler: this.fatalErrorHandler,
488488
gossiper: this.membershipGossiper,
489489
log: this.loggerFactory.CreateLogger<MembershipTableManager>(),
490-
timerFactory: new AsyncTimerFactory(this.loggerFactory),
490+
timerFactory: new AsyncTimerFactory(this.loggerFactory, TimeProvider.System),
491491
siloLifecycle: this.lifecycle);
492492
((ILifecycleParticipant<ISiloLifecycle>)manager).Participate(this.lifecycle);
493493
await this.lifecycle.OnStart();
@@ -519,7 +519,7 @@ public async Task MembershipTableManager_TrySuspectOrKill_DeclareDead_SmallClust
519519
fatalErrorHandler: this.fatalErrorHandler,
520520
gossiper: this.membershipGossiper,
521521
log: this.loggerFactory.CreateLogger<MembershipTableManager>(),
522-
timerFactory: new AsyncTimerFactory(this.loggerFactory),
522+
timerFactory: new AsyncTimerFactory(this.loggerFactory, TimeProvider.System),
523523
siloLifecycle: this.lifecycle);
524524
((ILifecycleParticipant<ISiloLifecycle>)manager).Participate(this.lifecycle);
525525
await this.lifecycle.OnStart();
@@ -561,7 +561,7 @@ public async Task MembershipTableManager_TrySuspectOrKill_ClocksNotSynchronized(
561561
fatalErrorHandler: this.fatalErrorHandler,
562562
gossiper: this.membershipGossiper,
563563
log: this.loggerFactory.CreateLogger<MembershipTableManager>(),
564-
timerFactory: new AsyncTimerFactory(this.loggerFactory),
564+
timerFactory: new AsyncTimerFactory(this.loggerFactory, TimeProvider.System),
565565
siloLifecycle: this.lifecycle);
566566

567567
// Rig the local clock.
@@ -634,7 +634,7 @@ public async Task MembershipTableManager_TrySuspectOrKill_DeclareDead_LargerClus
634634
fatalErrorHandler: this.fatalErrorHandler,
635635
gossiper: this.membershipGossiper,
636636
log: this.loggerFactory.CreateLogger<MembershipTableManager>(),
637-
timerFactory: new AsyncTimerFactory(this.loggerFactory),
637+
timerFactory: new AsyncTimerFactory(this.loggerFactory, TimeProvider.System),
638638
siloLifecycle: this.lifecycle);
639639
((ILifecycleParticipant<ISiloLifecycle>)manager).Participate(this.lifecycle);
640640
await this.lifecycle.OnStart();

test/Orleans.Core.Tests/Membership/SiloHealthMonitorTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public SiloHealthMonitorTests(ITestOutputHelper output)
8585
fatalErrorHandler: fatalErrorHandler,
8686
gossiper: membershipGossiper,
8787
log: _loggerFactory.CreateLogger<MembershipTableManager>(),
88-
timerFactory: new AsyncTimerFactory(_loggerFactory),
88+
timerFactory: new AsyncTimerFactory(_loggerFactory, TimeProvider.System),
8989
lifecycle);
9090

9191
_probeResults = Channel.CreateBounded<ProbeResult>(new BoundedChannelOptions(1) { FullMode = BoundedChannelFullMode.Wait });

0 commit comments

Comments
 (0)