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

Bugfix: pending waiter #497

Merged
merged 5 commits into from
Aug 28, 2024
Merged

Bugfix: pending waiter #497

merged 5 commits into from
Aug 28, 2024

Conversation

DnlLrssn
Copy link
Member

Checklist

Squash commit message

Fixes bug where something added to state.pending after emptying, but before emptying of resthandler.pending would not wait as expected.

Info

Optional informative text (not to be included in commit message) relevant to reviewers.

Copy link
Contributor

@atluq atluq left a comment

Choose a reason for hiding this comment

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

Looks good! One question and one joke ⬇️

@@ -20,7 +20,7 @@ type (
)

// NewHandler new instance of PendingHandler
func NewHandler(size int) Handler {
func NewHandler() Handler {
Copy link
Contributor

Choose a reason for hiding this comment

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

sizedoes not matter 😉

Comment on lines +408 to +410
func TestPendingWaiter(t *testing.T) {
counters := &statistics.ExecutionCounters{}
state := New(context.Background(), "", 120, nil, 1, 1, "", false, counters)
Copy link
Contributor

Choose a reason for hiding this comment

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

Did this simple test break the old one? If so, good! If not it would be a good idea to create such a test.

Copy link
Member Author

Choose a reason for hiding this comment

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

yes I created it as a failing test with old one, and doesn't fail with new implementation

@DnlLrssn DnlLrssn merged commit 8e5dfd9 into master Aug 28, 2024
3 checks passed
@DnlLrssn DnlLrssn deleted the bugfix/1470-PendingWaiter branch August 28, 2024 13:30
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