-
Notifications
You must be signed in to change notification settings - Fork 44
chore(core): fix conn/disconn tests for sse #1290
chore(core): fix conn/disconn tests for sse #1290
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Claude finished @NathanFlurry's task —— View job PR Review: SSE Connection/Disconnection Test FixesTodo List:
Summary of ChangesThis PR fixes connection/disconnection tests for Server-Sent Events (SSE) by addressing timing issues and test logic problems in Cloudflare Workers environment. File 1:
File 2:
Code Quality Assessment✅ Positive Aspects:
Performance Considerations
Security ConcernsNo security issues identified. The changes are limited to test configuration and test logic. Test CoverageImprovements Needed:
RecommendationsCritical Fixes Required: // Fix 1: Move newConn declaration before first usage
const newConn = handle.connect();
// Verify disconnection was tracked
await vi.waitFor(
async () => {
const disconnects = await newConn.getDisconnectionCount();
expect(disconnects).toBe(1);
},
{ timeout: 10_000, interval: 100 }
);
// Fix 2: Use correct connection reference
await vi.waitFor(async () => {
const connectionIds = await newConn.getConnectionIds(); // Changed from conn
expect(connectionIds.length).toBe(2);
});General Improvements:
The core approach of fixing SSE timing issues is sound, but the implementation has critical bugs that need to be addressed before merging. |
More templates
@rivetkit/actor
@rivetkit/cloudflare-workers
@rivetkit/core
@rivetkit/db
@rivetkit/framework-base
@rivetkit/next-js
@rivetkit/react
rivetkit
@rivetkit/sql-loader
commit: |
Merge activity
|

No description provided.