Skip to content
Snippets Groups Projects
Commit e89aad02 authored by David Garcia Quintas's avatar David Garcia Quintas
Browse files

updated node interop server

parent dacce7a1
Branches
Tags
No related merge requests found
......@@ -45,9 +45,6 @@ var testProto = grpc.load({
var ECHO_INITIAL_KEY = 'x-grpc-test-echo-initial';
var ECHO_TRAILING_KEY = 'x-grpc-test-echo-trailing-bin';
var incompressible_data = fs.readFileSync(
__dirname + '/../../../test/cpp/interop/rnd.dat');
/**
* Create a buffer filled with size zeroes
* @param {number} size The length of the buffer
......@@ -88,15 +85,7 @@ function getEchoTrailer(call) {
}
function getPayload(payload_type, size) {
if (payload_type === 'RANDOM') {
payload_type = ['COMPRESSABLE',
'UNCOMPRESSABLE'][Math.random() < 0.5 ? 0 : 1];
}
var body;
switch (payload_type) {
case 'COMPRESSABLE': body = zeroBuffer(size); break;
case 'UNCOMPRESSABLE': incompressible_data.slice(size); break;
}
var body = zeroBuffer(size);
return {type: payload_type, body: body};
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment