Skip to content

Commit

Permalink
Order tests ascending (#1034)
Browse files Browse the repository at this point in the history
  • Loading branch information
campersau authored Oct 27, 2024
1 parent 0dce660 commit 55221cc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion TUnit.Engine/Services/TestGrouper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ internal class TestGrouper
public GroupedTests OrganiseTests(DiscoveredTest[] testCases)
{
var allTestsOrderedByClass = testCases
.OrderBy(x => x.TestDetails.Order)
.GroupBy(x => x.TestDetails.ClassType)
.SelectMany(x => x)
.OrderByDescending(x => x.TestDetails.Order)
.ToList();

var notInParallel = new Queue<DiscoveredTest>();
Expand Down
2 changes: 1 addition & 1 deletion TUnit.Engine/Services/TestsExecutor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ await testsToProcess
private async Task ProcessGroup(ITestExecutionFilter? filter, ExecuteRequestContext context,
IEnumerable<NotInParallelTestCase> tests)
{
foreach (var test in tests.OrderBy(x => x.Test.TestDetails.Order))
foreach (var test in tests)
{
var keys = test.ConstraintKeys;

Expand Down

0 comments on commit 55221cc

Please sign in to comment.