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(PM): close with timeout #133

Merged
merged 3 commits into from
Oct 11, 2024
Merged

fix(PM): close with timeout #133

merged 3 commits into from
Oct 11, 2024

Conversation

iapolya
Copy link
Collaborator

@iapolya iapolya commented Oct 9, 2024

No description provided.

@@ -203,8 +203,6 @@ export class Controller {
this.stateActions.removeFromQueue(slug);

this.updateProgressInfo(slug);

this.triggerNextPromo();
Copy link
Collaborator

Choose a reason for hiding this comment

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

This change dont break/fix any test. Can we add test for this?

Copy link
Collaborator Author

@iapolya iapolya Oct 9, 2024

Choose a reason for hiding this comment

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

No, this change breaks 8 tests for callback validation controller.subscribe(callback). They are corrected by emitChange calls here. triggerNextPromo is also called in this function

Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe we should make closePromoWithTimeout async and await result?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We still need to call addPromoToFinished and removeFromQueue before await result. It's unnecessary here

src/promo-manager/core/controller.ts Outdated Show resolved Hide resolved
@iapolya iapolya merged commit 5c0e9f8 into main Oct 11, 2024
2 checks passed
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