fix flaky participation_test.exs #238

Merged
floatingghost merged 1 commits from ilja/akkoma:fix_erratic_participation_test into develop 2022-11-01 14:37:07 +00:00
Contributor

It was tested if the updated_at after marking as "read" was equal as the updated_at at insertion, but that seems wrong.
Firstly, if a record is updated, you expect the updated_at to also update.
Secondly, the insert and update happen almost at the same time, so it's flaky regardless.

Here I make sure it has a much older updated_at during insert so we can clealy see the effect after update.
I also check that the updated_at is actually updated because I expect that this is the expected behaviour and it's also the current behaviour.

It was tested if the updated_at after marking as "read" was equal as the updated_at at insertion, but that seems wrong. Firstly, if a record is updated, you expect the updated_at to also update. Secondly, the insert and update happen almost at the same time, so it's flaky regardless. Here I make sure it has a much older updated_at during insert so we can clealy see the effect after update. I also check that the updated_at is actually updated because I expect that this is the expected behaviour and it's also the current behaviour.
ilja added 1 commit 2022-10-23 10:41:29 +00:00
ci/woodpecker/pr/woodpecker Pipeline is pending Details
e6ceea3553
fix flaky participation_test.exs
It was tested if the updated_at after marking as "read" was equal as the updated_at at insertion, but that seems wrong.
Firstly, if a record is updated, you expect the updated_at to also update.
Secondly, the insert and update happen almost at the same time, so it's flaky regardless.

Here I make sure it has a much older updated_at during insert so we can clealy see the effect after update.
I also check that the updated_at is actually updated because I expect that this is the expected behaviour and it's also the current behaviour.

honestly i'm not sure if we even need to check updated_at here, since we only really care about the read attribute

but hey, it works 🤷

honestly i'm not sure if we even need to check updated_at here, since we only really care about the `read` attribute but hey, it works :shrug:
floatingghost merged commit 479542c692 into develop 2022-11-01 14:37:07 +00:00
floatingghost deleted branch fix_erratic_participation_test 2022-11-01 14:37:07 +00:00
Sign in to join this conversation.
No description provided.