Skip to content

Test unread counts in pushes#224

Merged
dbkr merged 5 commits intodevelopfrom
dbkr/push_badges
Apr 11, 2016
Merged

Test unread counts in pushes#224
dbkr merged 5 commits intodevelopfrom
dbkr/push_badges

Conversation

@dbkr
Copy link
Member

@dbkr dbkr commented Apr 7, 2016

Tests that unread counts increase and decrease correctly once messages and read receipts are sent respectively. Tests existing behaviour but uses event_id field added in https://github.com/matrix-org/synapse/pull/705/files

dbkr added 3 commits April 7, 2016 15:50
This doesn't work because the check for the zero badge push looks like it's getting the content from the previous poke. Inspecting the pokes with -C, I can see they're correct. There are also more lost sequence futures than normal I think.
Turns out I was just confused and asserting the wrong thing. Also this changes the await_event so we wait for the receipt to be sent before continuing.
matrix_join_room( $bob, $room_id )
})->then( sub {
await_event_for( $alice, filter => sub {
return 1;
Copy link
Contributor

Choose a reason for hiding this comment

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

You probably don't want to wait for any possible event, because that leads to fragile tests that get upset about things like spurious m.presence updates. Consider looking for just m.room.receipt events maybe?

dbkr added 2 commits April 8, 2016 15:33
Otherwise we risk flakiness because of getting presence events
Rather than an empty body, since this will set content-length etc for us. Also fix in the place I copied from...
@dbkr
Copy link
Member Author

dbkr commented Apr 8, 2016

ptal! :)

@leonerd
Copy link
Contributor

leonerd commented Apr 8, 2016

LGTM. Though Jenkins appears unhappy.

@dbkr
Copy link
Member Author

dbkr commented Apr 8, 2016

yeah, it needs matrix-org/synapse#705 so will wait until that's merged

@dbkr dbkr merged commit ad85515 into develop Apr 11, 2016
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