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

Async Chat Handling #1

Open
ColoredCarrot opened this issue Oct 20, 2022 · 0 comments
Open

Async Chat Handling #1

ColoredCarrot opened this issue Oct 20, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@ColoredCarrot
Copy link
Owner

Currently, tests dealing with chat (like testing that a player has received a message) sometimes fail non-deterministically, always relating to a client not having received an expected message.
For examples, see ChatTest in the example module.

This happens because Spigot tends not to handle chat on the primary thread. syncPackets() might return before the clientbound chat packet has been picked up by the packet snooper, and therefore before the server-side clientbound packet count has been incremented.

AC:

  • Chat-related tests have deterministic results.
  • Invocations of syncPackets() guarantee that all relevant chat messages will have been sent to and received by the client.
@ColoredCarrot ColoredCarrot added the bug Something isn't working label Oct 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant