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

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

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

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

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

Loading…
Cancel
Save