test: finished testing 30 players joining#272
Merged
AlexanderHeffernan merged 2 commits intomainfrom Oct 5, 2025
Merged
Conversation
AlexanderHeffernan
approved these changes
Oct 5, 2025
Contributor
AlexanderHeffernan
left a comment
There was a problem hiding this comment.
🛡️ Pull Request Review
Status: Not ready—address blockers
Blockers: 2
Suggestions: 2
Reviewed: December 14, 2025
The PR introduces a load test for player joining, which is a good initiative. However, the test currently lacks assertions and proper asynchronous handling, meaning it doesn't effectively verify the functionality.
✅ Strengths
- Targeted attempt to verify lobby capacity handling in
backend/test/api.test.ts.
🟡 Suggestions
- The loop
i <= 30creates 31 connections (0 to 30). Confirm if this off-by-one behavior is intentional or if it should bei < 30. Ref:backend/test/api.test.ts:224. - Avoid hardcoding
ws://localhost:3000. Use a dynamic port/URL from the test environment configuration to ensure CI reliability. Ref:backend/test/api.test.ts:226.
🔴 Blockers
- [Critical] No Assertions: The test merely initiates connections but verifies nothing. You must assert that the lobby player count reached 30 or that the connections were successful. Ref:
backend/test/api.test.ts:223. - [Critical] Async Handling:
new WebSocket(...)does not await the connection. The test will likely exit before connections are established. You need to wait for theopenevent or use a promisified client to ensure connections are active before asserting.
This review was generated by Pull Request Reviewer, an AI agent operating on the Autohive platform.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.