mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-10 17:52:36 +00:00
* Deduplicate hard delete and timer fail flaky tests better (#80817) `Flaky test create_and_destroy: /obj/item/organ/internal/ears hard deleted 1 times out of a total del count of 495` -> `Flaky hard delete: /obj/item/organ/internal/ears` `Flaky test monkey_business: Invalid timer: Timer: Timer: 2433 ([0x2100859b]), TTR: 328041, wait:2 Flags: TIMER_CLIENT_TIME, TIMER_STOPPABLE, callBack: [0x2105a831], callBack.object: /datum/looping_sound/showering[0x210085b4](/datum/looping_sound/showering), callBack.delegate:/datum/looping_sound/proc/start_sound_loop(), source: code/datums/looping_sounds/_looping_sound.dm:220Prev: NULL, Next: NULL, SPENT(328041), QDELETED, NO CALLBACK world.time: 942.5, head_offset: 600, practical_offset: 686, REALTIMEOFDAY: 328041` -> `Flaky test monkey_business: Invalid timer: /datum/looping_sound/proc/start_sound_loop() on /datum/looping_sound/showering` I will close every flaky test report with these patterns so that they are repopulated with the new deduplicated names. * Deduplicate hard delete and timer fail flaky tests better --------- Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
46 lines
1.4 KiB
JavaScript
46 lines
1.4 KiB
JavaScript
import { strict as assert } from "node:assert";
|
|
import fs from "node:fs";
|
|
import { extractDetails } from "./rerunFlakyTests.js";
|
|
|
|
function extractDetailsFromPayload(filename) {
|
|
return extractDetails(
|
|
fs.readFileSync(`tests/flakyTestPayloads/${filename}.txt`, {
|
|
encoding: "utf8",
|
|
})
|
|
);
|
|
}
|
|
|
|
const chatClient = extractDetailsFromPayload("chat_client");
|
|
assert.equal(
|
|
chatClient.title,
|
|
"Flaky hard delete: /datum/computer_file/program/chatclient"
|
|
);
|
|
assert.equal(chatClient.failures.length, 1);
|
|
|
|
const monkeyBusiness = extractDetailsFromPayload("monkey_business");
|
|
assert.equal(
|
|
monkeyBusiness.title,
|
|
"Flaky test monkey_business: Cannot execute null.resolve()."
|
|
);
|
|
assert.equal(monkeyBusiness.failures.length, 1);
|
|
|
|
const shapeshift = extractDetailsFromPayload("shapeshift");
|
|
assert.equal(
|
|
shapeshift.title,
|
|
"Multiple errors in flaky test shapeshift_spell"
|
|
);
|
|
assert.equal(shapeshift.failures.length, 16);
|
|
|
|
const multipleFailures = extractDetailsFromPayload("multiple_failures");
|
|
assert.equal(
|
|
multipleFailures.title,
|
|
"Multiple flaky test failures in more_shapeshift_spell, shapeshift_spell"
|
|
);
|
|
assert.equal(multipleFailures.failures.length, 2);
|
|
|
|
const invalidTimer = extractDetailsFromPayload("invalid_timer");
|
|
assert.equal(
|
|
invalidTimer.title,
|
|
"Flaky test monkey_business: Invalid timer: /datum/looping_sound/proc/start_sound_loop() on /datum/looping_sound/showering"
|
|
);
|