Skip to content

Commit

Permalink
Remove flakyness from test
Browse files Browse the repository at this point in the history
  • Loading branch information
Christdej committed Feb 13, 2025
1 parent 1063582 commit a5cbac6
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -271,12 +271,20 @@ await missionRunThreeResponse.Content.ReadFromJsonAsync<MissionRun>(
SerializerOptions
);

// Next mission can be any of these three missions due to timing
var possibleNextMissionRuns = new List<string>
{
missionRunOne!.Id,
missionRunTwo!.Id,
missionRunThree!.Id,
};

Assert.True(nextMissionResponse.IsSuccessStatusCode);
Assert.NotNull(nextMissionRun);
Assert.Equal(missionRunOne!.MissionId, activeMissionRun.MissionId);
Assert.Equal(missionRunTwo!.MissionId, activeMissionRun.MissionId);
Assert.Equal(missionRunThree!.MissionId, activeMissionRun.MissionId);
Assert.True(nextMissionRun.Id == missionRunTwo.Id);
Assert.Contains(nextMissionRun.Id, possibleNextMissionRuns);
}

[Fact]
Expand Down

0 comments on commit a5cbac6

Please sign in to comment.