fix: bailed out tests triggering inconsistent duration check

This commit is contained in:
Miodec 2024-05-06 23:36:34 +02:00
parent 90a888f73f
commit e9a83d5a62

View file

@ -897,7 +897,14 @@ export async function finish(difficultyFailed = false): Promise<void> {
let tooShort = false;
//fail checks
const dateDur = (TestStats.end3 - TestStats.start3) / 1000;
if (ce.testDuration < dateDur - 0.05 || ce.testDuration > dateDur + 0.05) {
if (
Config.mode !== "zen" &&
!TestState.bailedOut &&
(ce.testDuration < dateDur - 0.05 || ce.testDuration > dateDur + 0.05)
) {
//dont bother checking this for zen mode or bailed out tests because
//the duration might be modified to remove trailing afk time
//its also not a big deal if the duration is off in those tests
Notifications.add("Test invalid - inconsistent test duration", 0);
TestStats.setInvalid();
dontSave = true;