Open richardebeling opened 2 months ago
same thing with seed 1116753744
at test_remove_participants_proportional_reward_points
here
we discarded the approach in #2229 because it seemed implementation specific. Instead, we want a contextmanager which disconnects the signal directly.
See discussion in https://github.com/e-valuation/EvaP/issues/1361.
Our two weak notification receivers (grep
weak=True
) were intended to only be active while the current request is being handled. However, we can not assume this, as garbage collection is not guaranteed. We've had at least two sporadic test failures in the last weeks due to this. To replicate, run the tests with a patchedmanage.py
where you addedto the top and run the tests with
--shuffle=3290553936
(any shuffle where theuser_edit
view is accessed at least once before theevaluation_edit
view test that removes participants and triggers reward point granting.I don't know yet how to properly implement the behavior we intended to have. If may suffice to unregister the signal receiver at the end of the view.
Edit: While we're at it, I think the
grant_reward_points_after_delete
function could use aassert not grantings
in theif reverse
in theif granting
case -- we only expectgrantings
to be set once, otherwise, overwriting of the old value ofgrantings
would be unexpected.