fix existing flakiness + cut runtime closes #533 #544

Merged
moritz merged 11 commits from issue/mitgliederverwaltung-533 into main 2026-06-16 18:30:14 +02:00

11 commits

Author SHA1 Message Date
84e1cf1cb8 Merge branch 'main' into issue/mitgliederverwaltung-533
Some checks reported errors
continuous-integration/drone/push Build was killed
continuous-integration/drone/promote/production Build is passing
# Conflicts:
#	test/mv_web/member_live/index_test.exs
2026-06-16 18:13:03 +02:00
6d7ece20a8 docs(changelog): record member-creation deadlock fix under Unreleased 2026-06-16 17:55:24 +02:00
3d792e8b04 docs(testing): document create_member deadlock fix and async-test-safety 2026-06-16 17:54:32 +02:00
c0f40a13ce test(member-live): keep deadlock-prone member tests synchronous
These member/group/custom-field LiveView tests stay async: false. With the
foreign keys now deferrable the create_member deadlock no longer forces it, so
the rationale is updated: they remain synchronous as a deferred scope decision,
and index_groups_url_params/member_filter_component additionally have separate
async-isolation issues that must be fixed before they can run in parallel.
2026-06-16 17:53:59 +02:00
5e84c342b7 test(repo): assert member/user foreign keys are deferrable 2026-06-16 17:53:25 +02:00
ef94d2ef10 fix(repo): make member/user foreign keys deferrable to avoid create_member deadlock
Concurrent create_member transactions took FK FOR KEY SHARE (MultiXact) locks
on shared rows across members/users/membership_fee_types and could form a
cross-transaction cycle, producing intermittent PostgreSQL deadlocks (40P01)
under load. Making the three foreign keys DEFERRABLE INITIALLY DEFERRED moves
the check to commit time and breaks the cycle, without weakening integrity
(NOT NULL and ON DELETE RESTRICT are unaffected).
2026-06-16 17:52:51 +02:00
cb54c2c46e test(member-live): build date-filter property bounds without a reject-filter
The bound-pair generator filtered out ~1/4 of generated values, so unlucky
seeds hit StreamData's FilterTooNarrowError under full property runs.
Construct an at-least-one-bound-set pair directly instead, preserving the
exact domain with no rejection.
2026-06-16 17:52:17 +02:00
655fd80524 test: wait on observable state instead of blind sleeps
Replace the fixed Process.sleep waits in the import, members-PDF and
field-visibility tests with event-based / bounded-poll waits on the
observable condition, removing a known flakiness vector.
2026-06-16 17:51:43 +02:00
ccd1f81e3e test(member-live): assert rendered behavior instead of socket internals in the index view
Replace :sys.get_state assertions on the LiveView socket with assertions on
rendered output, so the tests pin user-visible behavior rather than internal
state; the few sites with no observable equivalent are kept and annotated.
2026-06-16 17:50:57 +02:00
3bd55fbfec test(seeds): drop the dead per-process seeds-run guard 2026-06-16 17:50:24 +02:00
18fb954f73 test(membership-fees): share create_fee_type and create_cycle fixtures
Replace the create_fee_type/create_cycle helpers duplicated across 18/8
membership-fee test files with a single shared definition in Mv.Fixtures,
reconciling the divergent local signatures (including the reversed
argument order) into one superset so behavior is unchanged.
2026-06-16 17:49:50 +02:00