test(e2e): Remove flaky Psychosis low sanity test (#27946)

This commit is contained in:
Andrew
2026-10-03 20:49:34 -03:00
committed by GitHub
parent 7e309b7194
commit 486e692c82
2 changed files with 1 additions and 162 deletions
+1 -1
View File
@@ -165,7 +165,7 @@ go test -tags=e2e ./local/... -count=1 -v -timeout 30m -parallel 1
| instances/bind_reset | party tele; ritual summon | P2 | covered; post-reset summon `blocked-harness` (AcceptSummon after reset) | #10708 |
| instances/classic/stratholme | Timmy remains hidden while a relevant Square Scarlet lives, then emerges after the area is clear | P2 | covered (`TestAC_26363_TimmyEmergesAfterSquareCleared`) | #26363 |
| instances/classic/onyxias_lair | Onyxia's phase 2 whelps follow a retail sniff: 19 at liftoff (ten rookery points, a liftoff-only point, and the eight back-row eggs each new whelp hatches, 2s later), then each point respawns 30-60s after its own whelp dies and the eggs hatch again, 18 in wave two; no whelp casts Teleport Self at a bot it can walk to; at 40% she lands straight down in about 10s, first Bellowing Roar 2s after touchdown, and each landing Roar sets off the Lava Fissures near her, each fissure casting Eruption itself, and only a fissure above the lair floor passing it on to its neighbours in the same tick, so a Roar erupts a cluster around her and never the whole floor, with a crack animation per hit, never before a Roar lands and never twice inside a fissure's 10s cooldown | P2 | covered (`TestOnyxia_WhelpCadence`, `TestOnyxia_EruptionFollowsBellowingRoar`) | — |
| instances/ulduar | named tele; Freya wave interval; a Laughing Skull's Lunatic Gaze stops at the brain room's geometry instead of draining sanity through it; a wave of Elder Brightleaf's Unstable Sun Beams stays capped however many players stand in range; Psychosis and Malady of the Mind stop picking a player once they are at 40 Sanity or less; Algalon holds still for 3s once his Big Bang cast lands instead of resuming melee and Quantum Strike on the next tick; a Writhing Lasher stays up past 62947's own 10s summon duration, because the despawn type its AI sets in `IsSummonedBy` is no longer overwritten on the way out of the summon call; a wipe to Thorim's melee with a death-persistent damage shield on the last victim spawns no Cache of Storms while his hard-reset despawn runs, and a lethal hit on the respawned Thorim still yields, runs the outro to his teleport-out without an evade and leaves the saved encounter DONE; an Ancient Water Spirit whose Tidal Wave is kicked casts no damage-and-knockback follow-up; one Elder left alive spawns the one-Elder Freya's Gift, which is the chest whose emblem count the fix corrects; Ignis dying kills every Iron Construct including the dormant ones, and his Kill All Constructs instakill spares the player and every other creature in range; after a wipe exactly one Algalon comes back through his hard-reset respawn, arriving from the sky flagged immune before he lands, even when a player re-enters the raid inside the 20s respawn window, and it stays one past the 30s reload fallback; a Kick that lands on Flame Leviathan stops his Flame Vents channel | P2 | covered (`TestAC_27095_*`, `TestAC_27602_*`, `TestAC_27590_*`, `TestAC_27539_*`, `TestAC_27455_*`, `TestUlduar_BrightleafSunBeamsCappedPerWave`, `TestUlduar_FreyaWardLasherOutlivesSummonDuration`, `TestUlduar_ThorimEvadeDespawnDoesNotYield`, `TestUlduar_FreyaGiftMatchesElderCount`, `TestAC_27736_IgnisKillsAllConstructs`, `TestUlduar_AlgalonWipeRespawnsOnce`, `TestUlduar_FlameVentsInterruptedByKick`); Kologarn Charge `blocked-harness` (bridge Z after Charge); Freya's Gift emblem counts `blocked-harness` (a chest's loot opens only through SPELL_EFFECT_OPEN_LOCK, and CMSG_CAST_SPELL carries no TARGET_FLAG_GAMEOBJECT); Ignis constructs on 25-man `blocked-harness` (no way to set a bot's raid difficulty: CMSG_SET_RAID_DIFFICULTY is unexported and a `characters`.`instance_mode_mask` write is overwritten by the save on Relog's logout) | #26266 #27095 #27455 #27539 #27590 #27602 #27736 |
| instances/ulduar | named tele; Freya wave interval; a Laughing Skull's Lunatic Gaze stops at the brain room's geometry instead of draining sanity through it; a wave of Elder Brightleaf's Unstable Sun Beams stays capped however many players stand in range; Algalon holds still for 3s once his Big Bang cast lands instead of resuming melee and Quantum Strike on the next tick; a Writhing Lasher stays up past 62947's own 10s summon duration, because the despawn type its AI sets in `IsSummonedBy` is no longer overwritten on the way out of the summon call; a wipe to Thorim's melee with a death-persistent damage shield on the last victim spawns no Cache of Storms while his hard-reset despawn runs, and a lethal hit on the respawned Thorim still yields, runs the outro to his teleport-out without an evade and leaves the saved encounter DONE; an Ancient Water Spirit whose Tidal Wave is kicked casts no damage-and-knockback follow-up; one Elder left alive spawns the one-Elder Freya's Gift, which is the chest whose emblem count the fix corrects; Ignis dying kills every Iron Construct including the dormant ones, and his Kill All Constructs instakill spares the player and every other creature in range; after a wipe exactly one Algalon comes back through his hard-reset respawn, arriving from the sky flagged immune before he lands, even when a player re-enters the raid inside the 20s respawn window, and it stays one past the 30s reload fallback; a Kick that lands on Flame Leviathan stops his Flame Vents channel | P2 | covered (`TestAC_27095_*`, `TestAC_27602_*`, `TestAC_27539_*`, `TestAC_27455_*`, `TestUlduar_BrightleafSunBeamsCappedPerWave`, `TestUlduar_FreyaWardLasherOutlivesSummonDuration`, `TestUlduar_ThorimEvadeDespawnDoesNotYield`, `TestUlduar_FreyaGiftMatchesElderCount`, `TestAC_27736_IgnisKillsAllConstructs`, `TestUlduar_AlgalonWipeRespawnsOnce`, `TestUlduar_FlameVentsInterruptedByKick`); Kologarn Charge `blocked-harness` (bridge Z after Charge); Freya's Gift emblem counts `blocked-harness` (a chest's loot opens only through SPELL_EFFECT_OPEN_LOCK, and CMSG_CAST_SPELL carries no TARGET_FLAG_GAMEOBJECT); Ignis constructs on 25-man `blocked-harness` (no way to set a bot's raid difficulty: CMSG_SET_RAID_DIFFICULTY is unexported and a `characters`.`instance_mode_mask` write is overwritten by the save on Relog's logout) | #26266 #27095 #27455 #27539 #27602 #27736 |
| professions/trainers | every Engineering trainer group offers a visitor exactly the twelve TBC master-tier recipes its class can learn — and none of the others, so a broken class filter fails too. Eleven are class-restricted goggles: four classes cover all twelve across the eight groups, two characters per class cover the Horde/Alliance and Aldor/Scryer interaction splits, and the remaining five classes pin the armour-type sharing at Technician Mihila. Why a hidden recipe is hidden is pinned too: either the class cannot wear the goggle at all — the refusal read from SMSG_INVENTORY_CHANGE_FAILURE, which must be EQUIP_ERR_NO_REQUIRED_PROFICIENCY — or the goggle is another class's within the same armour type, which is why armour proficiency would be the wrong filter to gate on | P2 | covered (`TestAC_27146_*`) | #27146 |
| world/dalaran | Dalaran's faction guards eject a hostile player from the Silver Enclave and Sunreaver's Sanctuary, and from nowhere else — public mailboxes, the street, the sewers and the neutral inn are left alone. Both directions are asserted: only checking public ground would pass a build where the guards never fire. One case parks a pet inside a quarter with its owner outside, since every other case is a lone player and would not notice the guard reading the owner's position instead of the trespasser's | P2 | covered (`TestAC_4467_*`) | #4467 |
| world/gameevents | Call to Arms banners at the Dalaran portals belong to the side they stand on, and the already-correct Warsong set is unchanged. **Wants an exclusive realm**: starting a holiday re-anchors its schedule in the running worldserver until restart; holidays already running are left alone | P2 | covered (`TestAC_24380_*`); Shattrath's 23 positions `gap` | #24380 |
@@ -598,167 +598,6 @@ func TestUlduar_BrightleafSunBeamsCappedPerWave(t *testing.T) {
t.Logf("PASS %d sun beam(s) in one wave with %d players in range", len(wave), botCount)
}
// Issue: https://github.com/azerothcore/azerothcore-wotlk/issues/27590
// PR: https://github.com/azerothcore/azerothcore-wotlk/pull/27628
// Psychosis (63795) and Malady of the Mind (63830) must skip players sitting at 40 Sanity
// or less. Both pick a random enemy through TARGET_UNIT_SRC_AREA_ENEMY over a 50000 yd
// radius and AzerothCore never filtered that list, so the players closest to going insane
// kept being the ones picked.
//
// Sara is faction 35 and can never own an enemy list, so she cannot be the fixture caster.
// A Laughing Skull is the stand-in: faction 14, NullCreatureAI, no threat list, and the
// Lunatic Gaze test above already proves its spells select the bot as an enemy. Its own
// gaze is stripped first, otherwise the 2 sanity a second it drains drowns the oracle.
func TestAC_27590_PsychosisSkipsLowSanity(t *testing.T) {
meta.Begin(t, meta.TestMeta{
Tags: []string{"med", "instances", "issue"},
Runtime: "med",
Issue: 27590,
Category: "instances/northrend/ulduar",
})
const (
npcLaughingSkull = uint32(33990)
spellSanity = uint32(63050)
spellSanityWell = uint32(64169)
spellLunaticGaze = uint32(64167)
spellPsychosis = uint32(63795)
spellMalady = uint32(63830)
// Icecrown illusion chamber floor, the pad the Lunatic Gaze test spawns on.
padX, padY, padZ = float32(1930.0), float32(-120.0), float32(240.07)
// Threshold from the 2009-07-02 hotfix: at or below it neither spell may pick the player.
sanityFloor = 40
// Where the walk down starts. A Sanity Well tops up in steps of 20 from the single
// stack `.aura` creates, so 1 -> 21 -> 41 -> 61 lands here and Psychosis then steps
// 61 -> 52 -> 43 -> 34, straddling the threshold without overshooting it far.
sanityStart = 60
// 63795 is a 2.9s cast and target selection only runs once it completes. A cast that
// finds nobody expires quietly, so the no-drain half has to burn the whole window.
castWindow = 8 * time.Second
// Well ticks every 2s; this only has to outlast the three steps up to sanityStart.
rampWindow = 20 * time.Second
// Enough steps to walk sanityStart down past the threshold at 9 a hit, with room to spare.
maxPsychosisCasts = 20
)
bot := e2eharness.NewSolo(t, e2eharness.ScenarioOpts{
Prefix: "YoggPs", Race: e2eharness.RaceHuman, Level: 80,
})
// Stay GM through the raid enter (.go xyz onto 603 is ignored after .gm off).
bot.Teleport(t, padX, padY, padZ, e2eharness.MapUlduar)
if _, _, _, m := bot.Pos(); m != e2eharness.MapUlduar {
e2eharness.Preconditionf(t, "not in Ulduar after brain room tele map=%d", m)
}
skull := bot.Spawn(t, npcLaughingSkull, 30*time.Second)
// GM casts and aura edits both act on the current selection, so every one of them says
// out loud which unit it means.
selectUnit := func(label string, guid uint64) {
t.Helper()
if err := bot.World.SetTarget(guid); err != nil {
e2eharness.Preconditionf(t, "select %s 0x%X: %v", label, guid, err)
}
}
selectSkull := func() { t.Helper(); selectUnit("skull", skull) }
selectSelf := func() { t.Helper(); selectUnit("self", bot.World.CharGUID()) }
selectSkull()
bot.GM(t, fmt.Sprintf(".unaura %d", spellLunaticGaze))
// Drop GM so the spells can select the bot; god mode absorbs the damage half of Psychosis.
bot.CombatReady(t)
bot.CheatGod(t)
// Sanity carries AURA_INTERRUPT_FLAG_CHANGE_MAP, so apply it after the tele. `.aura`
// creates it at one stack, which is already under the threshold, so a Sanity Well
// buff tops it up the same way Freya's wells do in the fight.
bot.ApplyAura(t, spellSanity)
bot.ApplyAura(t, spellSanityWell)
rampDeadline := time.Now().Add(rampWindow)
for bot.AuraStacks(spellSanity) < sanityStart && time.Now().Before(rampDeadline) {
time.Sleep(250 * time.Millisecond)
}
// CMSG_CANCEL_AURA does not take the well off, so strip it server side.
selectSelf()
bot.GM(t, fmt.Sprintf(".unaura %d", spellSanityWell))
start := bot.AuraStacks(spellSanity)
if start <= sanityFloor {
e2eharness.Preconditionf(t, "Sanity ramped to %d stacks, need more than %d to drive the threshold", start, sanityFloor)
}
// Every later delta is attributed to the spell under test, so nothing else may be moving
// sanity now: this catches both a skull that still gazes and a well that never came off.
time.Sleep(3 * time.Second)
if quiet := bot.AuraStacks(spellSanity); quiet != start {
e2eharness.Preconditionf(t, "sanity still moving on its own before the first cast (%d -> %d), skull 0x%X", start, quiet, skull)
}
// `.cast self` makes the *selected* unit cast on itself. Psychosis and Malady take their
// real targets from the area around the caster, which is the same selection path Sara
// drives in phase 2. Returns the stacks the bot lost, 0 if the cast never reached it.
castFromSkull := func(spellID uint32) int {
t.Helper()
before := bot.AuraStacks(spellSanity)
selectSkull()
bot.GM(t, fmt.Sprintf(".cast self %d", spellID))
deadline := time.Now().Add(castWindow)
for time.Now().Before(deadline) {
if now := bot.AuraStacks(spellSanity); now != before {
return before - now
}
time.Sleep(200 * time.Millisecond)
}
return 0
}
// Fixture check: at full sanity the spell must reach the bot at all. Without this a
// mis-aimed `.cast self` (it falls back to the caster's own player when nothing is
// selected) would read as a clean pass on both of the assertions below.
if lost := castFromSkull(spellMalady); lost <= 0 {
e2eharness.Preconditionf(t, "fixture dead: Malady of the Mind drained nothing at %d sanity", bot.AuraStacks(spellSanity))
}
lastValid := 0
for i := 0; i < maxPsychosisCasts; i++ {
before := bot.AuraStacks(spellSanity)
if before <= sanityFloor {
break
}
lost := castFromSkull(spellPsychosis)
if lost <= 0 {
e2eharness.ConfirmedBugf(t, 27590,
"Psychosis drained nothing at %d sanity, which is above the %d threshold", before, sanityFloor)
}
lastValid = before
t.Logf("Psychosis at %d sanity drained %d -> %d", before, lost, bot.AuraStacks(spellSanity))
}
atFloor := bot.AuraStacks(spellSanity)
if atFloor > sanityFloor {
e2eharness.Preconditionf(t, "never reached the threshold, stuck at %d sanity after %d casts", atFloor, maxPsychosisCasts)
}
if lost := castFromSkull(spellPsychosis); lost > 0 {
e2eharness.ConfirmedBugf(t, 27590,
"Psychosis drained %d sanity from a player at %d, at or below the %d threshold", lost, atFloor, sanityFloor)
}
atFloor = bot.AuraStacks(spellSanity)
if lost := castFromSkull(spellMalady); lost > 0 {
e2eharness.ConfirmedBugf(t, 27590,
"Malady of the Mind drained %d sanity from a player at %d, at or below the %d threshold", lost, atFloor, sanityFloor)
}
t.Logf("PASS low sanity targeting: both spells landed down to %d sanity and neither reached the player at %d", lastValid, atFloor)
}
// Issue: https://github.com/azerothcore/azerothcore-wotlk/issues/27455
// An Ancient Water Spirit's Tidal Wave (62653, 25-man rank 62935) is a 2s cast that surges the
// spirit forward and knocks everything in its path off its feet with a second spell, 62654