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

Fix tests of /initialSync to work when the response is being cached #124

Merged
merged 1 commit into from
Dec 23, 2015

Conversation

NegativeMjark
Copy link
Contributor

Work around the changes in matrix-org/synapse#457


matrix_initialsync( $user )->then( sub {
})->then( sub {
matrix_initialsync( $user );
Copy link
Contributor

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++ );

@NegativeMjark NegativeMjark assigned richvdh and unassigned leonerd Dec 23, 2015
@@ -32,7 +34,7 @@
check => sub {
my ( $user ) = @_;

matrix_initialsync( $user )->then( sub {
matrix_initialsync( $user, limit => $initial_sync_limit++ )->then( sub {
Copy link
Member

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done 897709a

@richvdh
Copy link
Member

richvdh commented Dec 23, 2015

Leo's batshit whitespace conventions always catch me out, so I've probably missed something, but looks fine except for some nits

@richvdh richvdh assigned NegativeMjark and unassigned richvdh Dec 23, 2015
NegativeMjark added a commit that referenced this pull request Dec 23, 2015
Fix tests of /initialSync to work when the response is being cached

Work around the changes in matrix-org/synapse#457
@NegativeMjark NegativeMjark merged commit 6a60df0 into develop Dec 23, 2015
@leonerd
Copy link
Contributor

leonerd commented Dec 24, 2015

Posthoc LGTM

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.

3 participants