Removed extra log lines

pull/504/head
murgatroid99 10 years ago
parent 10ac96cb8f
commit d17d57aa39
  1. 1
      src/node/examples/math_server.js
  2. 1
      src/node/interop/interop_server.js
  3. 6
      src/node/src/client.js
  4. 9
      src/node/src/server.js
  5. 1
      src/node/test/end_to_end_test.js

@ -69,7 +69,6 @@ function mathDiv(call, cb) {
* @param {stream} stream The stream for sending responses.
*/
function mathFib(stream) {
console.log(stream);
// Here, call is a standard writable Node object Stream
var previous = 0, current = 1;
for (var i = 0; i < stream.request.limit; i++) {

@ -106,7 +106,6 @@ function handleStreamingOutput(call) {
testProto.PayloadType.COMPRESSABLE,
testProto.PayloadType.UNCOMPRESSABLE][Math.random() < 0.5 ? 0 : 1];
}
console.log('req:', req);
_.each(req.response_parameters, function(resp_param) {
call.write({
payload: {

@ -56,7 +56,6 @@ function ClientWritableStream(call, serialize) {
this.call = call;
this.serialize = common.wrapIgnoreNull(serialize);
this.on('finish', function() {
console.log('Send close from client');
var batch = {};
batch[grpc.opType.SEND_CLOSE_FROM_CLIENT] = true;
call.startBatch(batch, function() {});
@ -73,7 +72,6 @@ function ClientWritableStream(call, serialize) {
function _write(chunk, encoding, callback) {
var batch = {};
batch[grpc.opType.SEND_MESSAGE] = this.serialize(chunk);
console.log(batch);
this.call.startBatch(batch, function(err, event) {
if (err) {
throw err;
@ -153,7 +151,6 @@ function ClientDuplexStream(call, serialize, deserialize) {
var reading = false;
this.call = call;
this.on('finish', function() {
console.log('Send close from client');
var batch = {};
batch[grpc.opType.SEND_CLOSE_FROM_CLIENT] = true;
call.startBatch(batch, function() {});
@ -279,7 +276,6 @@ function makeClientStreamRequestFunction(method, serialize, deserialize) {
callback(err);
return;
}
console.log(response);
if (response.status.code != grpc.status.OK) {
callback(response.status);
return;
@ -323,7 +319,6 @@ function makeServerStreamRequestFunction(method, serialize, deserialize) {
}
var stream = new ClientReadableStream(call, deserialize);
var start_batch = {};
console.log('Starting server streaming request on', method);
start_batch[grpc.opType.SEND_INITIAL_METADATA] = metadata;
start_batch[grpc.opType.RECV_INITIAL_METADATA] = true;
start_batch[grpc.opType.SEND_MESSAGE] = serialize(argument);
@ -332,7 +327,6 @@ function makeServerStreamRequestFunction(method, serialize, deserialize) {
if (err) {
throw err;
}
console.log(response);
stream.emit('metadata', response.metadata);
});
var status_batch = {};

@ -95,7 +95,6 @@ function setUpWritable(stream, serialize) {
};
stream.serialize = common.wrapIgnoreNull(serialize);
function sendStatus() {
console.log('Server sending status');
var batch = {};
batch[grpc.opType.SEND_STATUS_FROM_SERVER] = stream.status;
stream.call.startBatch(batch, function(){});
@ -169,7 +168,6 @@ function ServerWritableStream(call, serialize) {
function _write(chunk, encoding, callback) {
var batch = {};
batch[grpc.opType.SEND_MESSAGE] = this.serialize(chunk);
console.log('Server writing', batch);
this.call.startBatch(batch, function(err, value) {
if (err) {
this.emit('error', err);
@ -207,14 +205,11 @@ function _read(size) {
return;
}
if (self.finished) {
console.log('Pushing null');
self.push(null);
return;
}
var data = event.read;
console.log(data);
if (self.push(self.deserialize(data)) && data != null) {
console.log('Reading again');
var read_batch = {};
read_batch[grpc.opType.RECV_MESSAGE] = true;
self.call.startBatch(read_batch, readCallback);
@ -276,7 +271,6 @@ function handleUnary(call, handler, metadata) {
}
function handleServerStreaming(call, handler, metadata) {
console.log('Handling server streaming call');
var stream = new ServerWritableStream(call, handler.serialize);
waitForCancel(call, stream);
var batch = {};
@ -360,7 +354,6 @@ function Server(getMetadata, options) {
* @param {grpc.Event} event The event to handle with tag SERVER_RPC_NEW
*/
function handleNewCall(err, event) {
console.log('Handling new call');
if (err) {
return;
}
@ -376,9 +369,7 @@ function Server(getMetadata, options) {
var deadline = details.deadline;
if (handlers.hasOwnProperty(method)) {
handler = handlers[method];
console.log(handler);
} else {
console.log(handlers);
var batch = {};
batch[grpc.opType.SEND_INITIAL_METADATA] = {};
batch[grpc.opType.SEND_STATUS_FROM_SERVER] = {

@ -148,7 +148,6 @@ describe('end-to-end', function() {
});
server.requestCall(function(err, call_details) {
console.log("Server received new call");
var new_call = call_details['new call'];
assert.notEqual(new_call, null);
assert.strictEqual(new_call.metadata.client_key[0].toString(),

Loading…
Cancel
Save