Skip to content

[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

Merged
merged 5 commits into from
Feb 25, 2020
Merged

[TS Client] Test message size #15099

merged 5 commits into from
Feb 25, 2020

Conversation

BrennanConroy
Copy link
Member

As well as adding tests, reduced invoke, send, and stream message sizes by 15 bytes when no streaming parameters are present.

@BrennanConroy BrennanConroy added the area-signalr Includes: SignalR clients and servers label Oct 17, 2019
@BrennanConroy BrennanConroy added this to the 5.0.0-preview1 milestone Oct 17, 2019
@analogrelay
Copy link
Contributor

Wakey wakey.

@analogrelay
Copy link
Contributor

Let's just merge this for JSON.

@BrennanConroy
Copy link
Member Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@BrennanConroy BrennanConroy marked this pull request as ready for review February 25, 2020 16:44
@BrennanConroy BrennanConroy marked this pull request as ready for review February 25, 2020 16:45
@BrennanConroy BrennanConroy reopened this Feb 25, 2020
registerUnhandledRejectionHandler();

function createHubConnection(connection: IConnection, logger?: ILogger | null, protocol?: IHubProtocol | null) {
return HubConnection.create(connection, logger || NullLogger.instance, protocol || new JsonHubProtocol());
Copy link
Member

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.

Copy link
Member Author

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);
Copy link
Member

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?

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

@BrennanConroy BrennanConroy merged commit d5cf36a into master Feb 25, 2020
@BrennanConroy BrennanConroy deleted the brecon/size branch February 25, 2020 23:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-signalr Includes: SignalR clients and servers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants