Skip to content

Commit fa9f0c5

Browse files
imadityaaAditya Abhishek
andauthored
Do not consider unsupported components in case of ParallelLoopExecution (#471)
* resolve parallel loop * fix * Add other component --------- Co-authored-by: Aditya Abhishek <[email protected]>
1 parent 0fe3d43 commit fa9f0c5

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

src/VirtualClient/VirtualClient.Contracts/ParallelExecution.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,12 @@ protected override Task ExecuteAsync(EventContext telemetryContext, Cancellation
3838
List<Task> componentTasks = new List<Task>();
3939
foreach (VirtualClientComponent component in this)
4040
{
41+
if (!VirtualClientComponent.IsSupported(component))
42+
{
43+
this.Logger.LogMessage($"{nameof(ParallelExecution)} {component.TypeName} not supported on current platform: {this.PlatformArchitectureName}", LogLevel.Information, telemetryContext);
44+
continue;
45+
}
46+
4147
if (!string.IsNullOrWhiteSpace(component.Scenario))
4248
{
4349
this.Logger.LogMessage($"{nameof(ParallelExecution)} Component = {component.TypeName} (scenario={component.Scenario})", LogLevel.Information, telemetryContext);

src/VirtualClient/VirtualClient.Contracts/ParallelLoopExecution.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,12 @@ protected override Task ExecuteAsync(EventContext telemetryContext, Cancellation
5353
this.timeoutTask = Task.Delay(this.Duration, cancellationToken);
5454
foreach (VirtualClientComponent component in this)
5555
{
56+
if (!VirtualClientComponent.IsSupported(component))
57+
{
58+
this.Logger.LogMessage($"{nameof(ParallelLoopExecution)} {component.TypeName} not supported on current platform: {this.PlatformArchitectureName}", LogLevel.Information, telemetryContext);
59+
continue;
60+
}
61+
5662
// Wrap each component execution in a loop, and ensure we respect the timeout.
5763
componentTasks.Add(this.ExecuteComponentLoopAsync(component, telemetryContext, cancellationToken));
5864
}

0 commit comments

Comments
 (0)