diff --git a/src/WebJobs.Script/Workers/ProcessManagement/WorkerProcessCountOptions.cs b/src/WebJobs.Script/Workers/ProcessManagement/WorkerProcessCountOptions.cs
index b1bdb7c1d3..1e943ee716 100644
--- a/src/WebJobs.Script/Workers/ProcessManagement/WorkerProcessCountOptions.cs
+++ b/src/WebJobs.Script/Workers/ProcessManagement/WorkerProcessCountOptions.cs
@@ -10,7 +10,7 @@ public class WorkerProcessCountOptions
///
/// Gets or sets a value indicating whether to set FUNCTIONS_WORKER_PROCESS_COUNT to number of cpu cores on the host machine
///
- public bool SetWorkerCountToNumberOfCpuCores { get; set; }
+ public bool SetProcessCountToNumberOfCpuCores { get; set; }
///
/// Gets or sets number of worker processes to start. Default process count is 1
diff --git a/src/WebJobs.Script/Workers/Rpc/Configuration/RpcWorkerConfigFactory.cs b/src/WebJobs.Script/Workers/Rpc/Configuration/RpcWorkerConfigFactory.cs
index 3f3d6ed343..4c54329a50 100644
--- a/src/WebJobs.Script/Workers/Rpc/Configuration/RpcWorkerConfigFactory.cs
+++ b/src/WebJobs.Script/Workers/Rpc/Configuration/RpcWorkerConfigFactory.cs
@@ -167,7 +167,7 @@ internal WorkerProcessCountOptions GetWorkerProcessCount(JObject workerConfig)
workerProcessCount = workerProcessCount ?? new WorkerProcessCountOptions();
- if (workerProcessCount.SetWorkerCountToNumberOfCpuCores)
+ if (workerProcessCount.SetProcessCountToNumberOfCpuCores)
{
workerProcessCount.ProcessCount = _environment.GetEffectiveCoresCount();
// set Max worker process count to Number of effective cores if MaxProcessCount is less than MinProcessCount
diff --git a/test/WebJobs.Script.Tests/Workers/Rpc/RpcWorkerConfigFactoryTests.cs b/test/WebJobs.Script.Tests/Workers/Rpc/RpcWorkerConfigFactoryTests.cs
index 3822aef5c1..f9c4057138 100644
--- a/test/WebJobs.Script.Tests/Workers/Rpc/RpcWorkerConfigFactoryTests.cs
+++ b/test/WebJobs.Script.Tests/Workers/Rpc/RpcWorkerConfigFactoryTests.cs
@@ -171,13 +171,13 @@ public void ShouldAddProvider_Returns_Expected(string workerLanguage, string wor
[InlineData(false, false, false, 4, 15, "00:00:30")]
[InlineData(false, true, false, 4, 15, "00:00:30")]
[InlineData(false, true, true, 4, 8, "00:00:05")]
- public void GetWorkerProcessCount_Tests(bool defaultWorkerConfig, bool setWorkerCountToNumberOfCpuCores, bool setWorkerCountInEnv, int minProcessCount, int maxProcessCount, string processStartupInterval)
+ public void GetWorkerProcessCount_Tests(bool defaultWorkerConfig, bool setProcessCountToNumberOfCpuCores, bool setWorkerCountInEnv, int minProcessCount, int maxProcessCount, string processStartupInterval)
{
JObject processCount = new JObject();
processCount["ProcessCount"] = minProcessCount;
processCount["MaxProcessCount"] = maxProcessCount;
processCount["ProcessStartupInterval"] = processStartupInterval;
- processCount["SetWorkerCountToNumberOfCpuCores"] = setWorkerCountToNumberOfCpuCores;
+ processCount["SetProcessCountToNumberOfCpuCores"] = setProcessCountToNumberOfCpuCores;
JObject workerConfig = new JObject();
if (!defaultWorkerConfig)
@@ -199,7 +199,7 @@ public void GetWorkerProcessCount_Tests(bool defaultWorkerConfig, bool setWorker
Assert.Equal(10, result.MaxProcessCount);
Assert.Equal(1, result.ProcessCount);
Assert.Equal(TimeSpan.FromSeconds(10), result.ProcessStartupInterval);
- Assert.False(result.SetWorkerCountToNumberOfCpuCores);
+ Assert.False(result.SetProcessCountToNumberOfCpuCores);
return;
}
if (setWorkerCountInEnv)
@@ -208,11 +208,11 @@ public void GetWorkerProcessCount_Tests(bool defaultWorkerConfig, bool setWorker
}
else
{
- if (setWorkerCountInEnv && setWorkerCountToNumberOfCpuCores)
+ if (setWorkerCountInEnv && setProcessCountToNumberOfCpuCores)
{
Assert.Equal(7, result.ProcessCount);
}
- else if (setWorkerCountToNumberOfCpuCores)
+ else if (setProcessCountToNumberOfCpuCores)
{
Assert.Equal(_testEnvironment.GetEffectiveCoresCount(), result.ProcessCount);
}
@@ -228,7 +228,7 @@ public void GetWorkerProcessCount_ThrowsException_Tests()
processCount["ProcessCount"] = -4;
processCount["MaxProcessCount"] = 10;
processCount["ProcessStartupInterval"] = "00:10:00";
- processCount["SetWorkerCountToNumberOfCpuCores"] = false;
+ processCount["SetProcessCountToNumberOfCpuCores"] = false;
JObject workerConfig = new JObject();
workerConfig[WorkerConstants.ProcessCount] = processCount;