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

Tests for history purge transactional API #434

Merged
merged 2 commits into from
Mar 12, 2018
Merged

Conversation

richvdh
Copy link
Member

@richvdh richvdh commented Mar 8, 2018

purge_history now has a transactional API, which we should use and test.

(cf matrix-org/synapse#2962)

@richvdh
Copy link
Member Author

richvdh commented Mar 8, 2018

retest this please

purge_history now has a transactional API, which we should use and test.
assert_json_keys( $body, "status" );
Future->done( $body->{status} );
})
}, while => sub { $_[0]->get eq 'active' });
Copy link
Member

Choose a reason for hiding this comment

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

I'd use either repeat_until_true or retry_until_success helper functions, as they have a small backoff

Copy link
Member Author

Choose a reason for hiding this comment

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

well, I'm deliberately doing my own repeat so that I can distinguish between failure (request fails) and not ready yet (status == 'active').

I've added a backoff.

Copy link
Member

Choose a reason for hiding this comment

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

Ah ok, I just assumed one of those could be used. Ah well

@richvdh richvdh merged commit fea0552 into develop Mar 12, 2018
@richvdh richvdh deleted the rav/purge_history_txns branch March 12, 2018 16:34
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