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

Commit 6c99be7

Browse files
committed
fixed bug with total explored fair steps not calculated properly
1 parent eb7aac0 commit 6c99be7

File tree

1 file changed

+12
-16
lines changed

1 file changed

+12
-16
lines changed

Source/TestingServices/Scheduling/BugFindingScheduler.cs

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -424,31 +424,27 @@ internal TestReport GetReport()
424424
if (this.Strategy.IsFair())
425425
{
426426
report.NumOfExploredFairSchedules++;
427+
report.TotalExploredFairSteps += this.ScheduledSteps;
427428

428-
if (this.Strategy.HasReachedMaxSchedulingSteps())
429+
if (report.MinExploredFairSteps < 0 ||
430+
report.MinExploredFairSteps > this.ScheduledSteps)
429431
{
430-
report.MaxFairStepsHitInFairTests++;
432+
report.MinExploredFairSteps = this.ScheduledSteps;
431433
}
432434

433-
if (this.ScheduledSteps >= report.Configuration.MaxUnfairSchedulingSteps)
435+
if (report.MaxExploredFairSteps < this.ScheduledSteps)
434436
{
435-
report.MaxUnfairStepsHitInFairTests++;
437+
report.MaxExploredFairSteps = this.ScheduledSteps;
436438
}
437439

438-
if (!this.Strategy.HasReachedMaxSchedulingSteps())
440+
if (this.Strategy.HasReachedMaxSchedulingSteps())
439441
{
440-
report.TotalExploredFairSteps += this.ScheduledSteps;
441-
442-
if (report.MinExploredFairSteps < 0 ||
443-
report.MinExploredFairSteps > this.ScheduledSteps)
444-
{
445-
report.MinExploredFairSteps = this.ScheduledSteps;
446-
}
442+
report.MaxFairStepsHitInFairTests++;
443+
}
447444

448-
if (report.MaxExploredFairSteps < this.ScheduledSteps)
449-
{
450-
report.MaxExploredFairSteps = this.ScheduledSteps;
451-
}
445+
if (this.ScheduledSteps >= report.Configuration.MaxUnfairSchedulingSteps)
446+
{
447+
report.MaxUnfairStepsHitInFairTests++;
452448
}
453449
}
454450
else

0 commit comments

Comments
 (0)