@@ -324,13 +324,14 @@ public async Task StartAsync_SetsCorrectActiveHost_RefreshesLanguageWorkerOption
324
324
// We want it to start first, but finish last, so unstick it in a couple seconds.
325
325
Task ignore = Task . Delay ( 3000 ) . ContinueWith ( _ => _pauseAfterStandbyHostBuild . Release ( ) ) ;
326
326
327
+ var expectedPowerShellVersion = "7.2" ;
327
328
IWebHost host = builder . Build ( ) ;
328
329
var scriptHostService = host . Services . GetService < WebJobsScriptHostService > ( ) ;
329
330
var channelFactory = host . Services . GetService < IRpcWorkerChannelFactory > ( ) ;
330
331
var workerOptionsPlaceholderMode = host . Services . GetService < IOptions < LanguageWorkerOptions > > ( ) ;
331
332
Assert . Equal ( 4 , workerOptionsPlaceholderMode . Value . WorkerConfigs . Count ) ;
332
333
var rpcChannelInPlaceholderMode = ( GrpcWorkerChannel ) channelFactory . Create ( "/" , "powershell" , null , 0 , workerOptionsPlaceholderMode . Value . WorkerConfigs ) ;
333
- Assert . Equal ( "7" , rpcChannelInPlaceholderMode . Config . Description . DefaultRuntimeVersion ) ;
334
+ Assert . Equal ( expectedPowerShellVersion , rpcChannelInPlaceholderMode . Config . Description . DefaultRuntimeVersion ) ;
334
335
335
336
336
337
// TestServer will block in the constructor so pull out the StandbyManager and use it
@@ -346,7 +347,7 @@ public async Task StartAsync_SetsCorrectActiveHost_RefreshesLanguageWorkerOption
346
347
_environment . SetEnvironmentVariable ( EnvironmentSettingNames . AzureWebsiteContainerReady , "1" ) ;
347
348
_environment . SetEnvironmentVariable ( EnvironmentSettingNames . AzureWebsitePlaceholderMode , "0" ) ;
348
349
_environment . SetEnvironmentVariable ( RpcWorkerConstants . FunctionWorkerRuntimeSettingName , "powershell" ) ;
349
- _environment . SetEnvironmentVariable ( RpcWorkerConstants . FunctionWorkerRuntimeVersionSettingName , "7" ) ;
350
+ _environment . SetEnvironmentVariable ( RpcWorkerConstants . FunctionWorkerRuntimeVersionSettingName , expectedPowerShellVersion ) ;
350
351
351
352
var specializeTask = Task . Run ( async ( ) => await standbyManager . SpecializeHostAsync ( ) ) ;
352
353
@@ -358,7 +359,7 @@ public async Task StartAsync_SetsCorrectActiveHost_RefreshesLanguageWorkerOption
358
359
var workerOptionsAtJobhostLevel = scriptHostService . Services . GetService < IOptions < LanguageWorkerOptions > > ( ) ;
359
360
Assert . Equal ( 1 , workerOptionsAtJobhostLevel . Value . WorkerConfigs . Count ) ;
360
361
var rpcChannelAfterSpecialization = ( GrpcWorkerChannel ) channelFactory . Create ( "/" , "powershell" , null , 0 , workerOptionsAtJobhostLevel . Value . WorkerConfigs ) ;
361
- Assert . Equal ( "7" , rpcChannelAfterSpecialization . Config . Description . DefaultRuntimeVersion ) ;
362
+ Assert . Equal ( expectedPowerShellVersion , rpcChannelAfterSpecialization . Config . Description . DefaultRuntimeVersion ) ;
362
363
}
363
364
364
365
/// <summary>
0 commit comments