Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
icebob committed Apr 21, 2017
1 parent 7be7763 commit e0ec9f8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions benchmark/suites/serializers.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ function runTest(dataName) {
ctx.nodeID = "node-2-12345";
ctx.params = payload;

console.log("JSON length:", (new P.PacketRequest(brokerJSON.transit, "node-2-12345", ctx)).serialize().length);
console.log("Avro length:", (new P.PacketRequest(brokerAvro.transit, "node-2-12345", ctx)).serialize().length);
console.log("MsgPack length:", (new P.PacketRequest(brokerMsgPack.transit, "node-2-12345", ctx)).serialize().length);

bench2.ref("JSON", () => {
const packet = new P.PacketRequest(brokerJSON.transit, "node-2-12345", ctx);
return packet.serialize();
Expand Down
2 changes: 1 addition & 1 deletion test/integration/serializer.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ describe("Test Avro serializer", () => {
it("should serialize the request packet", () => {
const packet = new P.PacketRequest(broker.transit, "test-2", ctx);
const s = packet.serialize();
expect(s.length).toBe(75);
expect(s.length).toBe(76);

const res = P.Packet.deserialize(broker.transit, P.PACKET_REQUEST, s);
expect(res).toBeInstanceOf(P.PacketRequest);
Expand Down

0 comments on commit e0ec9f8

Please sign in to comment.