Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parallel Runner Issue Fixed #3807

Merged
merged 2 commits into from
Jul 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 11 additions & 13 deletions Ginger/GingerCoreNET/Run/GingerExecutionEngine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,6 @@ public void RunRunner(bool doContinueRun = false)
mErrorPostExecutionActionFlowBreaker = false;
}


}
}

Expand Down Expand Up @@ -830,20 +829,19 @@ private void SetupVirtualAgents()
}
/// <summary>
/// logic for if need to assign virtual agent
/// Second condition for If any runner have same agent multiple times then for that runner it will not launch multiple agent within same runner
/// third condition if any agent is used in different agent then only it will create virtual agent for that specific agent
/// Second condition if any agent is used in different agent then only it will create virtual agent for that specific agent
/// </summary>
if (agent.SupportVirtualAgent() && runSetConfig.ActiveAgentListWithRunner.Where(entry => entry.Key == mGingerRunner.Guid).Select(y => y.Value).Where(y => y != null).Any(x => (x.Any(k => ((Agent)k).Guid != agent.Guid))) && runSetConfig.ActiveAgentListWithRunner.Where(entry => entry.Key != mGingerRunner.Guid).Select(y => y.Value).Where(y => y != null).Any(x => (x.Any(k => ((Agent)k).Guid == agent.Guid || (((Agent)k).ParentGuid != null && ((Agent)k).ParentGuid == agent.Guid)))))
if (agent.SupportVirtualAgent() && runSetConfig.ActiveAgentListWithRunner.Where(entry => entry.Key != mGingerRunner.Guid).Select(y => y.Value).Where(y => y != null).Any(x => (x.Any(k => ((Agent)k).Guid == agent.Guid || (((Agent)k).ParentGuid != null && ((Agent)k).ParentGuid == agent.Guid)))))
{
var virtualagent = agent.CreateCopy(true) as Agent;
virtualagent.AgentOperations = new AgentOperations(virtualagent);
virtualagent.ParentGuid = agent.Guid;
virtualagent.Name = agent.Name + " Virtual";
virtualagent.IsVirtual = true;
virtualagent.DriverClass = agent.DriverClass;
virtualagent.DriverType = agent.DriverType;
applicationAgent.Agent = virtualagent;
virtualagent.DriverConfiguration = agent.DriverConfiguration;
var virtualagent = agent.CreateCopy(true) as Agent;
virtualagent.AgentOperations = new AgentOperations(virtualagent);
virtualagent.ParentGuid = agent.Guid;
virtualagent.Name = agent.Name + " Virtual";
virtualagent.IsVirtual = true;
virtualagent.DriverClass = agent.DriverClass;
virtualagent.DriverType = agent.DriverType;
applicationAgent.Agent = virtualagent;
virtualagent.DriverConfiguration = agent.DriverConfiguration;
}
}

Expand Down
2 changes: 1 addition & 1 deletion Ginger/GingerCoreNET/RunLib/AgentOperations.cs
Original file line number Diff line number Diff line change
Expand Up @@ -863,7 +863,7 @@ public void WaitForAgentToBeReady()
Counter++;

int waitingTime = 30;// 30 seconds
if (Driver.DriverLoadWaitingTime > 0)
if (Driver != null && Driver.DriverLoadWaitingTime > 0)
{
waitingTime = Driver.DriverLoadWaitingTime;
}
Expand Down
Loading