mirror of https://github.com/grpc/grpc-node.git
Fixed ordering assumptions in server_streaming interop test
This commit is contained in:
parent
9ecee83d9a
commit
6664d4ad01
|
@ -154,13 +154,15 @@ function serverStreaming(client, done) {
|
|||
arg.response_parameters[resp_index].size);
|
||||
resp_index += 1;
|
||||
});
|
||||
call.on('status', function(status) {
|
||||
assert.strictEqual(status.code, grpc.status.OK);
|
||||
call.on('end', function() {
|
||||
assert.strictEqual(resp_index, 4);
|
||||
if (done) {
|
||||
done();
|
||||
}
|
||||
});
|
||||
call.on('status', function(status) {
|
||||
assert.strictEqual(status.code, grpc.status.OK);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -81,7 +81,7 @@ function _write(chunk, encoding, callback) {
|
|||
batch[grpc.opType.SEND_MESSAGE] = this.serialize(chunk);
|
||||
this.call.startBatch(batch, function(err, event) {
|
||||
if (err) {
|
||||
// Something has gone wrong. Stop writing by failing to call callback
|
||||
callback(err);
|
||||
return;
|
||||
}
|
||||
callback();
|
||||
|
@ -125,11 +125,9 @@ function _read(size) {
|
|||
self.finished = true;
|
||||
return;
|
||||
}
|
||||
if (self.finished) {
|
||||
self.push(null);
|
||||
return;
|
||||
}
|
||||
var data = event.read;
|
||||
var deserialized = self.deserialize(data);
|
||||
console.log(deserialized);
|
||||
if (self.push(self.deserialize(data)) && data !== null) {
|
||||
var read_batch = {};
|
||||
read_batch[grpc.opType.RECV_MESSAGE] = true;
|
||||
|
|
Loading…
Reference in New Issue