-
Notifications
You must be signed in to change notification settings - Fork 10.4k
[TS Client] Test message size #15099
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
Conversation
Wakey wakey. |
ed772d2
to
d813946
Compare
Let's just merge this for JSON. |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
registerUnhandledRejectionHandler(); | ||
|
||
function createHubConnection(connection: IConnection, logger?: ILogger | null, protocol?: IHubProtocol | null) { | ||
return HubConnection.create(connection, logger || NullLogger.instance, protocol || new JsonHubProtocol()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are the TS tests for MessagePack? It looks like these are only testing JsonHubProtocol.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No tests for MessagePack, that's what we were talking about Friday when we decided to just get the PR in.
|
||
// Verify the message is sent | ||
expect(connection.sentData.length).toBe(2); | ||
expect((connection.sentData[1] as string).length).toEqual(29); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we verify the message type is what we expect before verifying the length?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
d813946
to
b147142
Compare
As well as adding tests, reduced invoke, send, and stream message sizes by 15 bytes when no streaming parameters are present.