Skip to content

Conversation

@masih
Copy link
Member

@masih masih commented May 15, 2024

Assert that simulation priority queue used to order message delivery is behaving as expected:

  • queued messages are sorted in ascending order of their deliverAt.
  • removal of a message returns the one with earliest deliverAt.
  • conditional upsert is respected.
  • duplicate messages are allowed and ordered as expected.
  • queue is fully drained upon removing all messages.

Update misleading godoc for Pop receiver.

Addresses #209 (comment)

Assert that simulation priority queue used to order message delivery is
behaving as expected:

* queued messages are sorted in ascending order of their `deliverAt`.
* removal of a message returns the one with earliest `deliverAt`.
* conditional upsert is respected.
* duplicate messages are allowed and ordered as expected.
* queue is fully drained upon removing all messages.

Update misleading godoc for `Pop` receiver.

Addresses #209 (comment)
@masih masih force-pushed the masih/sim-msg-queue-tests branch from 711fba4 to fa96da7 Compare May 15, 2024 10:43
},
}
for _, test := range tests {
test := test
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we require Go 1.22? If so this is no longer required.

Copy link
Contributor

@Kubuxu Kubuxu May 15, 2024

Choose a reason for hiding this comment

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

Ok, no, looks like we are on Go 1.21

Copy link
Member Author

Choose a reason for hiding this comment

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

yep; can't wait.

@masih masih added this pull request to the merge queue May 15, 2024
Merged via the queue into main with commit 283c68b May 15, 2024
@masih masih deleted the masih/sim-msg-queue-tests branch May 15, 2024 14:49
Copy link
Member

@anorth anorth left a comment

Choose a reason for hiding this comment

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

Great, thank you!

@masih masih self-assigned this May 16, 2024
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.

4 participants