diff options
author | bforbis <bpforbis@gmail.com> | 2018-07-17 12:19:49 -0400 |
---|---|---|
committer | James E. King III <jking@apache.org> | 2018-07-17 12:19:49 -0400 |
commit | f2867c24984aa53edec54a138c03db934221bdea (patch) | |
tree | ec0a6d26db092942b130781b0d6f4fe281b69f6f /lib/nodejs | |
parent | f12cacf56145e2c8f0d4429694fedf5453648089 (diff) | |
download | thrift-f2867c24984aa53edec54a138c03db934221bdea.tar.gz |
THRIFT-3950: Memory leak while calling oneway methods (#1568)
* THRIFT-3950: Memory leak while calling oneway methods
* THRIFT-3950: Update NodeJS Oneway tests
Diffstat (limited to 'lib/nodejs')
-rw-r--r-- | lib/nodejs/test/test_driver.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/nodejs/test/test_driver.js b/lib/nodejs/test/test_driver.js index 03ec5138b..4612a326a 100644 --- a/lib/nodejs/test/test_driver.js +++ b/lib/nodejs/test/test_driver.js @@ -125,7 +125,8 @@ exports.ThriftTestDriver = function(client, callback) { }); client.testOneway(0, function(err, response) { - assert.fail('testOneway should not answer'); + assert.error(err, 'testOneway: no callback error'); + assert.strictEqual(response, undefined, 'testOneway: void response'); }); checkOffByOne(function(done) { @@ -223,7 +224,11 @@ exports.ThriftTestDriverPromise = function(client, callback) { }) .fail(fail('testException')); - client.testOneway(0, fail('testOneway: should not answer')); + client.testOneway(0) + .then(function(response) { + assert.strictEqual(response, undefined, 'testOneway: void response') + }) + .fail(fail('testOneway: should not reject')); checkOffByOne(function(done) { client.testI32(-1) |