@@ -324,13 +324,14 @@ public async Task StartAsync_SetsCorrectActiveHost_RefreshesLanguageWorkerOption
324324 // We want it to start first, but finish last, so unstick it in a couple seconds.
325325 Task ignore = Task . Delay ( 3000 ) . ContinueWith ( _ => _pauseAfterStandbyHostBuild . Release ( ) ) ;
326326
327+ var expectedPowerShellVersion = "7.2" ;
327328 IWebHost host = builder . Build ( ) ;
328329 var scriptHostService = host . Services . GetService < WebJobsScriptHostService > ( ) ;
329330 var channelFactory = host . Services . GetService < IRpcWorkerChannelFactory > ( ) ;
330331 var workerOptionsPlaceholderMode = host . Services . GetService < IOptions < LanguageWorkerOptions > > ( ) ;
331332 Assert . Equal ( 4 , workerOptionsPlaceholderMode . Value . WorkerConfigs . Count ) ;
332333 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 ) ;
334335
335336
336337 // TestServer will block in the constructor so pull out the StandbyManager and use it
@@ -346,7 +347,7 @@ public async Task StartAsync_SetsCorrectActiveHost_RefreshesLanguageWorkerOption
346347 _environment . SetEnvironmentVariable ( EnvironmentSettingNames . AzureWebsiteContainerReady , "1" ) ;
347348 _environment . SetEnvironmentVariable ( EnvironmentSettingNames . AzureWebsitePlaceholderMode , "0" ) ;
348349 _environment . SetEnvironmentVariable ( RpcWorkerConstants . FunctionWorkerRuntimeSettingName , "powershell" ) ;
349- _environment . SetEnvironmentVariable ( RpcWorkerConstants . FunctionWorkerRuntimeVersionSettingName , "7" ) ;
350+ _environment . SetEnvironmentVariable ( RpcWorkerConstants . FunctionWorkerRuntimeVersionSettingName , expectedPowerShellVersion ) ;
350351
351352 var specializeTask = Task . Run ( async ( ) => await standbyManager . SpecializeHostAsync ( ) ) ;
352353
@@ -358,7 +359,7 @@ public async Task StartAsync_SetsCorrectActiveHost_RefreshesLanguageWorkerOption
358359 var workerOptionsAtJobhostLevel = scriptHostService . Services . GetService < IOptions < LanguageWorkerOptions > > ( ) ;
359360 Assert . Equal ( 1 , workerOptionsAtJobhostLevel . Value . WorkerConfigs . Count ) ;
360361 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 ) ;
362363 }
363364
364365 /// <summary>
0 commit comments