Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit 931a1ec

Browse files
committed
modify test program to allow configurable task count
1 parent 7fd4b18 commit 931a1ec

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/ServiceStack.Text.TestsConsole/Program.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ static void Main(string[] args)
2929
}
3030

3131
var tasks = new List<Task>();
32-
for (int jj = 0; jj < 3; jj++)
32+
var tasksCount = args.Length > 0 ? int.Parse(args[0]) : 3;
33+
for (int jj = 0; jj < tasksCount; jj++)
3334
{
3435
int j = jj;
3536
tasks.Add(Task.Run(() => {
@@ -48,7 +49,7 @@ static void Main(string[] args)
4849
}
4950
tasks.ForEach(task => task.Wait());
5051

51-
Console.WriteLine($"There were {violations} viloations");
52+
Console.WriteLine($"There were {violations} viloations, running {tasksCount} Tasks");
5253
}
5354
}
5455
}

0 commit comments

Comments
 (0)