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

Tachyon system/serverStats #586

Merged

Conversation

L-e-x-o-n
Copy link
Collaborator

Completes #561

@L-e-x-o-n L-e-x-o-n requested a review from geekingfrog February 9, 2025 14:06
@L-e-x-o-n L-e-x-o-n linked an issue Feb 9, 2025 that may be closed by this pull request
Copy link
Collaborator

@geekingfrog geekingfrog left a comment

Choose a reason for hiding this comment

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

Some tiny comments.
But you are missing a test for the feature.
You should add a function server_stats in Support.Tachyon that sends the message and wait for the response. There are plenty of other function doing similar things, list_queues! for example.

Then you should create a new file under test/teiserver_web/tachyon/system_test.exs, that use TeiserverWeb.ConnCase.

Then, you can follow the same pattern as the pairing tests to have several user connected.
You can then test that the request returns the correct response, then disconnect a client and try again to see the count updated.
Keep in mind that you’ll need the response schema in the repo as well since the end to end tests are validating the response against the expected schema.

lib/teiserver/player/session_registry.ex Outdated Show resolved Hide resolved
lib/teiserver/player/tachyon_handler.ex Outdated Show resolved Hide resolved
@L-e-x-o-n L-e-x-o-n force-pushed the tachyon/system/serverStats branch from ccff6b9 to be1ba09 Compare February 9, 2025 19:40
@L-e-x-o-n L-e-x-o-n force-pushed the tachyon/system/serverStats branch 2 times, most recently from 3fb5513 to fcccaa7 Compare February 10, 2025 18:28
@L-e-x-o-n L-e-x-o-n force-pushed the tachyon/system/serverStats branch from fcccaa7 to 991b717 Compare February 10, 2025 19:15
@L-e-x-o-n L-e-x-o-n merged commit c79ee18 into beyond-all-reason:master Feb 10, 2025
3 checks passed
@L-e-x-o-n L-e-x-o-n deleted the tachyon/system/serverStats branch February 10, 2025 19:43
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.

[Feature]: implement tachyon system/serverStats event
2 participants