Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test to ensure push/notifications work after room purge #1361

Merged
merged 2 commits into from
Jul 28, 2023

Conversation

erikjohnston
Copy link
Member

@erikjohnston erikjohnston force-pushed the erikj/check_push_works_after_purge branch from 311c9c2 to 5f99718 Compare July 26, 2023 13:05
@erikjohnston erikjohnston changed the title Erikj/check push works after purge Add test to ensure push/notifications work after room purge Jul 26, 2023
@erikjohnston erikjohnston marked this pull request as ready for review July 26, 2023 14:07
@erikjohnston erikjohnston requested a review from a team as a code owner July 26, 2023 14:07
tests/48admin.pl Outdated Show resolved Hide resolved
Comment on lines +574 to +576
# We expect notification count to be 2, as we'll still see two events:
# the first being $last_event_id and the second the "new message"
assert_eq( $room->{unread_notifications}{"notification_count"}, 2 );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So do we expect a purge to force re-calculation of notification counts?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, good question. I guess what I really want to test is that the notification count increases. Though given this is a Synapse only test I'm not hugely bothered if we test Synapse specific stuff here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess that makes sense. I think if you still have a event push summary on a purged event then it will increase properly? Not 100% sure on that though.

tests/48admin.pl Outdated Show resolved Hide resolved
@erikjohnston erikjohnston requested a review from clokep July 28, 2023 08:39
@clokep
Copy link
Member

clokep commented Jul 28, 2023

Looks like a test might have flaked though?

@erikjohnston
Copy link
Member Author

Looks like a test might have flaked though?

Ugh, yes. I'm failing to track that down.

@erikjohnston erikjohnston merged commit 27a3d1f into develop Jul 28, 2023
6 of 9 checks passed
@erikjohnston erikjohnston deleted the erikj/check_push_works_after_purge branch July 28, 2023 12:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants