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

Long polling #541

Merged
merged 12 commits into from
Aug 16, 2023
Merged

Long polling #541

merged 12 commits into from
Aug 16, 2023

Conversation

mgordel
Copy link
Contributor

@mgordel mgordel commented Aug 7, 2023

No description provided.

@mgordel mgordel self-assigned this Aug 7, 2023
@mgordel mgordel marked this pull request as ready for review August 8, 2023 14:38
@@ -61,7 +62,10 @@ export class PaymentApiMock extends RequestorApi {
appSessionId?: string,
options?: AxiosRequestConfig,
): Promise<import("axios").AxiosResponse<InvoiceEvent[]>> {
return new Promise((res) => res({ data: global.expectedEvents } as AxiosResponse));
return new Promise(async (res) => {
await sleep(100, true);
Copy link
Contributor

Choose a reason for hiding this comment

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

why sleep(100) and why 100?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sleep is to simulate responses returned by long pooling. The current primitive implementation of this mock unfortunately enforces such workarounds to make it work properly

@mgordel mgordel merged commit d82e8cb into master Aug 16, 2023
17 checks passed
@mgordel mgordel deleted the feature/JST-83/long-polling branch August 16, 2023 12:49
@github-actions
Copy link

🎉 This PR is included in version 0.8.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants