@@ -126,7 +126,7 @@ public async Task TestRunAsync()
126
126
127
127
} ) ;
128
128
129
- hc . EnqueueInstance < IJobDispatcher > ( _jobDispatcher . Object ) ;
129
+ hc . SetSingleton < IJobDispatcher > ( _jobDispatcher . Object ) ;
130
130
131
131
_configStore . Setup ( x => x . IsServiceConfigured ( ) ) . Returns ( false ) ;
132
132
//Act
@@ -309,7 +309,7 @@ public async Task TestRunOnce()
309
309
310
310
} ) ;
311
311
312
- hc . EnqueueInstance < IJobDispatcher > ( _jobDispatcher . Object ) ;
312
+ hc . SetSingleton < IJobDispatcher > ( _jobDispatcher . Object ) ;
313
313
314
314
_configStore . Setup ( x => x . IsServiceConfigured ( ) ) . Returns ( false ) ;
315
315
//Act
@@ -413,7 +413,7 @@ public async Task TestRunOnceOnlyTakeOneJobMessage()
413
413
414
414
} ) ;
415
415
416
- hc . EnqueueInstance < IJobDispatcher > ( _jobDispatcher . Object ) ;
416
+ hc . SetSingleton < IJobDispatcher > ( _jobDispatcher . Object ) ;
417
417
418
418
_configStore . Setup ( x => x . IsServiceConfigured ( ) ) . Returns ( false ) ;
419
419
//Act
@@ -503,7 +503,7 @@ public async Task TestRunOnceHandleUpdateMessage()
503
503
504
504
} ) ;
505
505
506
- hc . EnqueueInstance < IJobDispatcher > ( _jobDispatcher . Object ) ;
506
+ hc . SetSingleton < IJobDispatcher > ( _jobDispatcher . Object ) ;
507
507
508
508
_configStore . Setup ( x => x . IsServiceConfigured ( ) ) . Returns ( false ) ;
509
509
//Act
@@ -578,7 +578,7 @@ public async Task TestReportAuthMigrationTelemetry()
578
578
hc . SetSingleton < IConfigurationStore > ( _configStore . Object ) ;
579
579
hc . SetSingleton < ICredentialManager > ( _credentialManager . Object ) ;
580
580
hc . EnqueueInstance < IErrorThrottler > ( _acquireJobThrottler . Object ) ;
581
- hc . EnqueueInstance < IJobDispatcher > ( _jobDispatcher . Object ) ;
581
+ hc . SetSingleton < IJobDispatcher > ( _jobDispatcher . Object ) ;
582
582
583
583
runner . Initialize ( hc ) ;
584
584
var settings = new RunnerSettings
@@ -679,7 +679,7 @@ public async Task TestRunnerJobRequestMessageFromPipeline()
679
679
hc . SetSingleton < ICredentialManager > ( _credentialManager . Object ) ;
680
680
hc . EnqueueInstance < IErrorThrottler > ( _acquireJobThrottler . Object ) ;
681
681
hc . EnqueueInstance < IActionsRunServer > ( _actionsRunServer . Object ) ;
682
- hc . EnqueueInstance < IJobDispatcher > ( _jobDispatcher . Object ) ;
682
+ hc . SetSingleton < IJobDispatcher > ( _jobDispatcher . Object ) ;
683
683
684
684
runner . Initialize ( hc ) ;
685
685
var settings = new RunnerSettings
@@ -780,7 +780,7 @@ public async Task TestRunnerJobRequestMessageFromRunService()
780
780
hc . SetSingleton < ICredentialManager > ( _credentialManager . Object ) ;
781
781
hc . EnqueueInstance < IErrorThrottler > ( _acquireJobThrottler . Object ) ;
782
782
hc . EnqueueInstance < IRunServer > ( _runServer . Object ) ;
783
- hc . EnqueueInstance < IJobDispatcher > ( _jobDispatcher . Object ) ;
783
+ hc . SetSingleton < IJobDispatcher > ( _jobDispatcher . Object ) ;
784
784
785
785
runner . Initialize ( hc ) ;
786
786
var settings = new RunnerSettings
@@ -880,7 +880,7 @@ public async Task TestRunnerJobRequestMessageFromRunService_AuthMigrationFallbac
880
880
hc . SetSingleton < ISelfUpdater > ( _updater . Object ) ;
881
881
hc . SetSingleton < ICredentialManager > ( _credentialManager . Object ) ;
882
882
hc . EnqueueInstance < IErrorThrottler > ( _acquireJobThrottler . Object ) ;
883
- hc . EnqueueInstance < IJobDispatcher > ( _jobDispatcher . Object ) ;
883
+ hc . SetSingleton < IJobDispatcher > ( _jobDispatcher . Object ) ;
884
884
hc . EnqueueInstance < IRunServer > ( _runServer . Object ) ;
885
885
hc . EnqueueInstance < IRunServer > ( _runServer . Object ) ;
886
886
0 commit comments