Introduce $kind as a pivot point for uncaught errors #1078
GitHub Actions / Test Report (macos-latest)
failed
Aug 14, 2024 in 1s
261 passed, 2 failed and 0 skipped
βΒ ./test-results.xml
263 tests were completed in 7s with 261 passed, 2 failed and 0 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
tests/cleanup.test.ts | 14β | 553ms | ||
tests/context.test.ts | 2β | 43ms | ||
tests/disconnects.test.ts | 8β | 217ms | ||
tests/e2e.test.ts | 40β | 2β | 2s | |
tests/fixtures/observable.test.ts | 4β | 6ms | ||
tests/handler.test.ts | 11β | 6ms | ||
tests/negative.test.ts | 6β | 71ms | ||
tests/serialize.test.ts | 4β | 4ms | ||
tests/typescript-stress.test.ts | 9β | 6ms | ||
codec/codec.test.ts | 14β | 5ms | ||
tracing/tracing.test.ts | 4β | 37ms | ||
transport/events.test.ts | 5β | 4ms | ||
transport/impls/ws/ws.test.ts | 5β | 695ms | ||
transport/message.test.ts | 7β | 3ms | ||
transport/rateLimit.test.ts | 8β | 2ms | ||
transport/sessionStateMachine/stateMachine.test.ts | 70β | 49ms | ||
transport/transforms/messageFraming.test.ts | 6β | 7ms | ||
transport/transport.test.ts | 44β | 5s |
β Β tests/cleanup.test.ts
β
procedures should clean up after themselves ('ws' transport, 'naive' codec) > closing a transport from the client cleans up connection on the server
β
procedures should clean up after themselves ('ws' transport, 'naive' codec) > closing a transport from the server cleans up connection on the client
β
procedures should clean up after themselves ('ws' transport, 'naive' codec) > rpc
β
procedures should clean up after themselves ('ws' transport, 'naive' codec) > stream
β
procedures should clean up after themselves ('ws' transport, 'naive' codec) > subscription
β
procedures should clean up after themselves ('ws' transport, 'naive' codec) > upload
β
procedures should clean up after themselves ('ws' transport, 'naive' codec) > shouldn't send messages across stale sessions
β
procedures should clean up after themselves ('ws' transport, 'binary' codec) > closing a transport from the client cleans up connection on the server
β
procedures should clean up after themselves ('ws' transport, 'binary' codec) > closing a transport from the server cleans up connection on the client
β
procedures should clean up after themselves ('ws' transport, 'binary' codec) > rpc
β
procedures should clean up after themselves ('ws' transport, 'binary' codec) > stream
β
procedures should clean up after themselves ('ws' transport, 'binary' codec) > subscription
β
procedures should clean up after themselves ('ws' transport, 'binary' codec) > upload
β
procedures should clean up after themselves ('ws' transport, 'binary' codec) > shouldn't send messages across stale sessions
β Β tests/context.test.ts
β
should handle incompatabilities > should pass extended context to procedure
β
should handle incompatabilities > should pass extended context to initializeState
β Β tests/disconnects.test.ts
β
procedures should handle unexpected disconnects ('ws' transport, 'naive' codec) > rpc
β
procedures should handle unexpected disconnects ('ws' transport, 'naive' codec) > stream
β
procedures should handle unexpected disconnects ('ws' transport, 'naive' codec) > subscription
β
procedures should handle unexpected disconnects ('ws' transport, 'naive' codec) > upload
β
procedures should handle unexpected disconnects ('ws' transport, 'binary' codec) > rpc
β
procedures should handle unexpected disconnects ('ws' transport, 'binary' codec) > stream
β
procedures should handle unexpected disconnects ('ws' transport, 'binary' codec) > subscription
β
procedures should handle unexpected disconnects ('ws' transport, 'binary' codec) > upload
βΒ tests/e2e.test.ts
β
client <-> server integration test ('ws' transport, 'naive' codec) > rpc
β
client <-> server integration test ('ws' transport, 'naive' codec) > fallible rpc
β
client <-> server integration test ('ws' transport, 'naive' codec) > rpc with binary (uint8array)
β
client <-> server integration test ('ws' transport, 'naive' codec) > stream
β
client <-> server integration test ('ws' transport, 'naive' codec) > stream empty
β
client <-> server integration test ('ws' transport, 'naive' codec) > stream idempotent close
β
client <-> server integration test ('ws' transport, 'naive' codec) > stream with init message
β client <-> server integration test ('ws' transport, 'naive' codec) > fallible stream
AssertionError: expected { ok: false, payload: { β¦(3) } } to strictly equal { ok: false, payload: { β¦(2) } }
β
client <-> server integration test ('ws' transport, 'naive' codec) > subscription
β
client <-> server integration test ('ws' transport, 'naive' codec) > subscription idempotent close
β
client <-> server integration test ('ws' transport, 'naive' codec) > upload
β
client <-> server integration test ('ws' transport, 'naive' codec) > upload empty
β
client <-> server integration test ('ws' transport, 'naive' codec) > upload with init message
β
client <-> server integration test ('ws' transport, 'naive' codec) > message order is preserved in the face of disconnects
β
client <-> server integration test ('ws' transport, 'naive' codec) > concurrent rpcs
β
client <-> server integration test ('ws' transport, 'naive' codec) > concurrent streams
β
client <-> server integration test ('ws' transport, 'naive' codec) > eagerlyConnect should actually eagerly connect
β
client <-> server integration test ('ws' transport, 'naive' codec) > client reconnects even after session grace
β
client <-> server integration test ('ws' transport, 'naive' codec) > client doesn't reconnect after session grace if connectOnInvoke is false
β
client <-> server integration test ('ws' transport, 'naive' codec) > works with non-object schemas
β
client <-> server integration test ('ws' transport, 'naive' codec) > procedure can use metadata
β
client <-> server integration test ('ws' transport, 'binary' codec) > rpc
β
client <-> server integration test ('ws' transport, 'binary' codec) > fallible rpc
β
client <-> server integration test ('ws' transport, 'binary' codec) > rpc with binary (uint8array)
β
client <-> server integration test ('ws' transport, 'binary' codec) > stream
β
client <-> server integration test ('ws' transport, 'binary' codec) > stream empty
β
client <-> server integration test ('ws' transport, 'binary' codec) > stream idempotent close
β
client <-> server integration test ('ws' transport, 'binary' codec) > stream with init message
β client <-> server integration test ('ws' transport, 'binary' codec) > fallible stream
AssertionError: expected { ok: false, payload: { β¦(3) } } to strictly equal { ok: false, payload: { β¦(2) } }
β
client <-> server integration test ('ws' transport, 'binary' codec) > subscription
β
client <-> server integration test ('ws' transport, 'binary' codec) > subscription idempotent close
β
client <-> server integration test ('ws' transport, 'binary' codec) > upload
β
client <-> server integration test ('ws' transport, 'binary' codec) > upload empty
β
client <-> server integration test ('ws' transport, 'binary' codec) > upload with init message
β
client <-> server integration test ('ws' transport, 'binary' codec) > message order is preserved in the face of disconnects
β
client <-> server integration test ('ws' transport, 'binary' codec) > concurrent rpcs
β
client <-> server integration test ('ws' transport, 'binary' codec) > concurrent streams
β
client <-> server integration test ('ws' transport, 'binary' codec) > eagerlyConnect should actually eagerly connect
β
client <-> server integration test ('ws' transport, 'binary' codec) > client reconnects even after session grace
β
client <-> server integration test ('ws' transport, 'binary' codec) > client doesn't reconnect after session grace if connectOnInvoke is false
β
client <-> server integration test ('ws' transport, 'binary' codec) > works with non-object schemas
β
client <-> server integration test ('ws' transport, 'binary' codec) > procedure can use metadata
β Β tests/fixtures/observable.test.ts
β
Observable > should set initial value correctly
β
Observable > should update value correctly
β
Observable > should notify listeners when value changes
β
Observable > should unsubscribe from notifications
β Β tests/handler.test.ts
β
server-side test > rpc basic
β
server-side test > rpc initial state
β
server-side test > fallible rpc
β
server-side test > stream basic
β
server-side test > stream empty
β
server-side test > stream with initialization
β
server-side test > fallible stream
β
server-side test > subscriptions
β
server-side test > uploads
β
server-side test > uploads empty
β
server-side test > uploads with initialization
β Β tests/negative.test.ts
β
should handle incompatabilities > throws when sending after close
β
should handle incompatabilities > retrying single connection attempt should hit retry limit reached
β
should handle incompatabilities > calling connect consecutively should reuse the same connection
β
should handle incompatabilities > incorrect client handshake
β
should handle incompatabilities > seq number in the future should close connection
β
should handle incompatabilities > mismatched protocol version
β Β tests/serialize.test.ts
β
serialize server to jsonschema > serialize entire service schema
β
serialize service to jsonschema > serialize basic service
β
serialize service to jsonschema > serialize service with binary
β
serialize service to jsonschema > serialize service with errors
β Β tests/typescript-stress.test.ts
β
ensure typescript doesn't give up trying to infer the types for large services > service with many procedures hits typescript limit
β
ensure typescript doesn't give up trying to infer the types for large services > server client should support many services with many procedures
β
Output<> type > it unwraps rpc outputs correctly
β
Output<> type > it unwraps stream outputs correctly
β
Output<> type > it unwraps subscription outputs correctly
β
Output<> type > it unwraps upload outputs correctly
β
ResultUwrap types > it unwraps Ok correctly
β
ResultUwrap types > it unwraps Err correctly
β
Handshake > custom handhshake types should work
β Β codec/codec.test.ts
β
codec -- 'naive' > empty object
β
codec -- 'naive' > simple test
β
codec -- 'naive' > encodes null properly
β
codec -- 'naive' > skips optional fields
β
codec -- 'naive' > deeply nested test
β
codec -- 'naive' > buffer test
β
codec -- 'naive' > invalid json returns null
β
codec -- 'binary' > empty object
β
codec -- 'binary' > simple test
β
codec -- 'binary' > encodes null properly
β
codec -- 'binary' > skips optional fields
β
codec -- 'binary' > deeply nested test
β
codec -- 'binary' > buffer test
β
codec -- 'binary' > invalid json returns null
β Β tracing/tracing.test.ts
β
Basic tracing tests > createSessionTelemetryInfo
β
Basic tracing tests > createHandlerSpan
β
Integrated tracing tests ('ws' transport, 'naive' codec) > Traces sessions and connections across network boundary
β
Integrated tracing tests ('ws' transport, 'binary' codec) > Traces sessions and connections across network boundary
β Β transport/events.test.ts
β
EventDispatcher > notifies all handlers in order they were registered
β
EventDispatcher > does not notify removed handlers
β
EventDispatcher > does not notify handlers added while notifying another handler
β
EventDispatcher > does notify handlers removed while notifying another handler
β
EventDispatcher > removes all listeners
β Β transport/impls/ws/ws.test.ts
β
sending and receiving across websockets works > basic send/receive
β
sending and receiving across websockets works > sending respects to/from fields
β
sending and receiving across websockets works > hanging ws connection with no handshake is cleaned up after grace
β
sending and receiving across websockets works > ws connection is recreated after unclean disconnect
β
sending and receiving across websockets works > ws connection always calls the close callback
β Β transport/message.test.ts
β
message helpers > ack
β
message helpers > streamOpen
β
message helpers > streamClose
β
message helpers > handshakeRequestMessage
β
message helpers > handshakeResponseMessage
β
message helpers > default message has no control flags set
β
message helpers > combining control flags works
β Β transport/rateLimit.test.ts
β
LeakyBucketRateLimit > should return 0 backoff time for new user
β
LeakyBucketRateLimit > should return 0 budget consumed for new user
β
LeakyBucketRateLimit > should consume budget correctly
β
LeakyBucketRateLimit > keeps growing until startRestoringBudget
β
LeakyBucketRateLimit > stops restoring budget when we consume budget again
β
LeakyBucketRateLimit > respects maximum backoff time
β
LeakyBucketRateLimit > backoff increases
β
LeakyBucketRateLimit > reports remaining budget correctly
β Β transport/sessionStateMachine/stateMachine.test.ts
β
session state machine > initial state > no connection
β
session state machine > initial state > connecting
β
session state machine > initial state > handshaking
β
session state machine > initial state > connected
β
session state machine > initial state > pending identification
β
session state machine > state transitions > no connection -> backing off
β
session state machine > state transitions > backing off -> connecting
β
session state machine > state transitions > connecting -> handshaking
β
session state machine > state transitions > handshaking -> connected
β
session state machine > state transitions > waiting (no existing session) -> connected
β
session state machine > state transitions > waiting (existing session) -> connected
β
session state machine > state transitions > backing off -> no connection
β
session state machine > state transitions > connecting (conn failed) -> no connection
β
session state machine > state transitions > connecting (conn ok) -> no connection
β
session state machine > state transitions > handshaking -> no connection
β
session state machine > state transitions > connected -> no connection
β
session state machine > state transitions preserve buffer, seq, ack > no connection -> backing off
β
session state machine > state transitions preserve buffer, seq, ack > backing off -> connecting
β
session state machine > state transitions preserve buffer, seq, ack > connecting -> handshaking
β
session state machine > state transitions preserve buffer, seq, ack > handshaking -> connected
β
session state machine > state transitions preserve buffer, seq, ack > backing off -> no connection
β
session state machine > state transitions preserve buffer, seq, ack > connecting -> no connection
β
session state machine > state transitions preserve buffer, seq, ack > handshaking -> no connection
β
session state machine > state transitions preserve buffer, seq, ack > connected -> no connection
β
session state machine > state transitions deal with session grace period appropriately > no connection -> backing off: partially consumed grace period
β
session state machine > state transitions deal with session grace period appropriately > no connection -> backing off -> connecting: partially consumed grace period
β
session state machine > state transitions deal with session grace period appropriately > no connection -> backing off -> connecting -> handshaking: partially consumed grace period
β
session state machine > state transitions deal with session grace period appropriately > no connection -> backing off -> connecting -> handshaking -> connected: partially consumed grace period
β
session state machine > state transitions deal with session grace period appropriately > backing off -> no connection: partially consumed grace period
β
session state machine > state transitions deal with session grace period appropriately > connecting -> no connection: partially consumed grace period
β
session state machine > state transitions deal with session grace period appropriately > handshaking -> no connection: partially consumed grace period
β
session state machine > state transitions deal with session grace period appropriately > handshaking -> connected: connected should clear grace timer
β
session state machine > stale handles post-transition > no connection -> backing off: stale handle
β
session state machine > stale handles post-transition > backing off -> connecting: stale handle
β
session state machine > stale handles post-transition > connecting -> handshaking: stale handle
β
session state machine > stale handles post-transition > handshaking -> connected: stale handle
β
session state machine > stale handles post-transition > waiting -> connected: stale handle
β
session state machine > stale handles post-transition > backing off -> no connection: stale handle
β
session state machine > stale handles post-transition > connecting -> no connection: stale handle
β
session state machine > stale handles post-transition > handshaking -> no connection: stale handle
β
session state machine > stale handles post-transition > connected -> no connection: stale handle
β
session state machine > close cleanup > no connection
β
session state machine > close cleanup > backing off
β
session state machine > close cleanup > connecting
β
session state machine > close cleanup > connecting finish after close
β
session state machine > close cleanup > handshaking
β
session state machine > close cleanup > connected
β
session state machine > close cleanup > pending identification
β
session state machine > event listeners > no connection event listeners: onSessionGracePeriodElapsed
β
session state machine > event listeners > backing off event listeners: onBackoffFinished
β
session state machine > event listeners > backing off event listeners: onSessionGracePeriodElapsed
β
session state machine > event listeners > connecting event listeners: connectionEstablished
β
session state machine > event listeners > connecting event listeners: connectionFailed
β
session state machine > event listeners > connecting event listeners: connectionTimeout
β
session state machine > event listeners > connecting event listeners: sessionGracePeriodElapsed
β
session state machine > event listeners > handshaking event listeners: connectionErrored
β
session state machine > event listeners > handshaking event listeners: connectionClosed
β
session state machine > event listeners > handshaking event listeners: onHandshakeData
β
session state machine > event listeners > handshaking event listeners: handshakeTimeout
β
session state machine > event listeners > handshaking event listeners: sessionGracePeriodElapsed
β
session state machine > event listeners > pending identification event listeners: connectionErrored
β
session state machine > event listeners > pending identification event listeners: connectionClosed
β
session state machine > event listeners > pending identification event listeners: onHandshakeData
β
session state machine > event listeners > pending identification event listeners: handshakeTimeout
β
session state machine > event listeners > connected event listeners: connectionErrored
β
session state machine > event listeners > connected event listeners: connectionClosed
β
session state machine > event listeners > connected event listeners: onMessageData
β
session state machine > heartbeats > active heartbeating works and is cleared on state transition
β
session state machine > heartbeats > passive heartbeating echoes back acks
β
session state machine > heartbeats > does not dispatch acks
β Β transport/transforms/messageFraming.test.ts
β
MessageFramer > basic transform
β
MessageFramer > handles partial messages across chunks
β
MessageFramer > multiple messages in a single chunk
β
MessageFramer > max buffer size exceeded
β
MessageFramer > incomplete message at stream end
β
MessageFramer > consistent byte length calculation with emojis and unicode
β Β transport/transport.test.ts
β
transport connection behaviour tests ('ws' transport, 'naive' codec) > connection is recreated after clean client disconnect
β
transport connection behaviour tests ('ws' transport, 'naive' codec) > misbehaving clients get their sessions recreated after reconnect
β
transport connection behaviour tests ('ws' transport, 'naive' codec) > idle transport cleans up nicely
β
transport connection behaviour tests ('ws' transport, 'naive' codec) > idle transport stays alive
β
transport connection behaviour tests ('ws' transport, 'naive' codec) > heartbeats should not interrupt normal operation
β
transport connection behaviour tests ('ws' transport, 'naive' codec) > sending right after session event should not cause invalid handshake
β
transport connection behaviour tests ('ws' transport, 'naive' codec) > seq numbers should be persisted across transparent reconnects
β
transport connection behaviour tests ('ws' transport, 'naive' codec) > both client and server transport get connect/disconnect notifs
β
transport connection behaviour tests ('ws' transport, 'naive' codec) > transport connection is not recreated after destroy
β
transport connection behaviour tests ('ws' transport, 'naive' codec) > multiple connections works
β
transport connection behaviour tests ('ws' transport, 'binary' codec) > connection is recreated after clean client disconnect
β
transport connection behaviour tests ('ws' transport, 'binary' codec) > misbehaving clients get their sessions recreated after reconnect
β
transport connection behaviour tests ('ws' transport, 'binary' codec) > idle transport cleans up nicely
β
transport connection behaviour tests ('ws' transport, 'binary' codec) > idle transport stays alive
β
transport connection behaviour tests ('ws' transport, 'binary' codec) > heartbeats should not interrupt normal operation
β
transport connection behaviour tests ('ws' transport, 'binary' codec) > sending right after session event should not cause invalid handshake
β
transport connection behaviour tests ('ws' transport, 'binary' codec) > seq numbers should be persisted across transparent reconnects
β
transport connection behaviour tests ('ws' transport, 'binary' codec) > both client and server transport get connect/disconnect notifs
β
transport connection behaviour tests ('ws' transport, 'binary' codec) > transport connection is not recreated after destroy
β
transport connection behaviour tests ('ws' transport, 'binary' codec) > multiple connections works
β
transport disabling transparent reconnect ('ws' transport, 'naive' codec) > reconnecting with grace period of 0 should result in hard reconnect
β
transport disabling transparent reconnect ('ws' transport, 'binary' codec) > reconnecting with grace period of 0 should result in hard reconnect
β
transport handshake grace period tests ('ws' transport, 'naive' codec) > handshake grace period of 0 should lead to closed connections
β
transport handshake grace period tests ('ws' transport, 'binary' codec) > handshake grace period of 0 should lead to closed connections
β
transport connection edge cases ('ws' transport, 'naive' codec) > reconnecting before grace period ends should leave session intact
β
transport connection edge cases ('ws' transport, 'naive' codec) > session grace elapses during long reconnect loop
β
transport connection edge cases ('ws' transport, 'naive' codec) > messages should not be resent when the client loses all state and reconnects to the server
β
transport connection edge cases ('ws' transport, 'naive' codec) > messages should not be resent when client reconnects to a different instance of the server
β
transport connection edge cases ('ws' transport, 'naive' codec) > recovers from phantom disconnects
β
transport connection edge cases ('ws' transport, 'binary' codec) > reconnecting before grace period ends should leave session intact
β
transport connection edge cases ('ws' transport, 'binary' codec) > session grace elapses during long reconnect loop
β
transport connection edge cases ('ws' transport, 'binary' codec) > messages should not be resent when the client loses all state and reconnects to the server
β
transport connection edge cases ('ws' transport, 'binary' codec) > messages should not be resent when client reconnects to a different instance of the server
β
transport connection edge cases ('ws' transport, 'binary' codec) > recovers from phantom disconnects
β
transport handshake tests ('ws' transport, 'naive' codec) > handshakes and stores parsed metadata in session
β
transport handshake tests ('ws' transport, 'naive' codec) > client checks request schema on construction
β
transport handshake tests ('ws' transport, 'naive' codec) > server checks request schema on receive
β
transport handshake tests ('ws' transport, 'naive' codec) > server gets previous parsed metadata on reconnect
β
transport handshake tests ('ws' transport, 'naive' codec) > parse can reject connection
β
transport handshake tests ('ws' transport, 'binary' codec) > handshakes and stores parsed metadata in session
β
transport handshake tests ('ws' transport, 'binary' codec) > client checks request schema on construction
β
transport handshake tests ('ws' transport, 'binary' codec) > server checks request schema on receive
β
transport handshake tests ('ws' transport, 'binary' codec) > server gets previous parsed metadata on reconnect
β
transport handshake tests ('ws' transport, 'binary' codec) > parse can reject connection
Annotations
Check failure on line 0 in ./test-results.xml
github-actions / Test Report (macos-latest)
__tests__/e2e.test.ts βΊ client <-> server integration test ('ws' transport, 'naive' codec) > fallible stream
Failed test found in:
./test-results.xml
Error:
AssertionError: expected { ok: false, payload: { β¦(3) } } to strictly equal { ok: false, payload: { β¦(2) } }
Raw output
AssertionError: expected { ok: false, payload: { β¦(3) } } to strictly equal { ok: false, payload: { β¦(2) } }
β― __tests__/e2e.test.ts:333:23
Check failure on line 0 in ./test-results.xml
github-actions / Test Report (macos-latest)
__tests__/e2e.test.ts βΊ client <-> server integration test ('ws' transport, 'binary' codec) > fallible stream
Failed test found in:
./test-results.xml
Error:
AssertionError: expected { ok: false, payload: { β¦(3) } } to strictly equal { ok: false, payload: { β¦(2) } }
Raw output
AssertionError: expected { ok: false, payload: { β¦(3) } } to strictly equal { ok: false, payload: { β¦(2) } }
β― __tests__/e2e.test.ts:333:23
Loading