-
Notifications
You must be signed in to change notification settings - Fork 55
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
Fix tests of /initialSync to work when the response is being cached #124
Conversation
|
||
matrix_initialsync( $user )->then( sub { | ||
})->then( sub { | ||
matrix_initialsync( $user ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather that this, use the same limit
trick as before. At the top of the file put something like
# An incrementing parameter for initialSync to defeat the caching mechanism and ensure fresh results every time
my $initial_sync_limit = 1;
Then change every occurance of matrix_initialsync( $user )
to
matrix_initialsync( $user, limit => $initial_sync_limit++ );
@@ -32,7 +34,7 @@ | |||
check => sub { | |||
my ( $user ) = @_; | |||
|
|||
matrix_initialsync( $user )->then( sub { | |||
matrix_initialsync( $user, limit => $initial_sync_limit++ )->then( sub { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you add a comment to say what the limit is for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done 897709a
Leo's batshit whitespace conventions always catch me out, so I've probably missed something, but looks fine except for some nits |
Work around the changes in matrix-org/synapse#457
897709a
to
6945bee
Compare
Fix tests of /initialSync to work when the response is being cached Work around the changes in matrix-org/synapse#457
Posthoc LGTM |
Work around the changes in matrix-org/synapse#457