aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJimmy Huang <jimmy.huang@intel.com>2017-07-05 15:14:42 -0700
committerJimmy Huang <jimmy.huang@intel.com>2017-07-05 15:14:42 -0700
commitf3206bd33bd80c2d7eff61f25096b5726fa346db (patch)
treefa1169f15bb4c5c0c94ba248a6f1c85255f76dad
parent4e44cc649580d46e6b1cdfe201ec724ccc673404 (diff)
[ocf] Work-around to fix segfault when using promisesfix-k64f-ocf
This is a work-around patch to have the tests no segfault when the function passed into the .then() is empty, which causes a segfault executed. Fixes #1316 Signed-off-by: Jimmy Huang <jimmy.huang@intel.com>
-rw-r--r--tests/test-ocfclient.js4
1 files changed, 1 insertions, 3 deletions
diff --git a/tests/test-ocfclient.js b/tests/test-ocfclient.js
index 32e2438..46a7eaf 100644
--- a/tests/test-ocfclient.js
+++ b/tests/test-ocfclient.js
@@ -143,9 +143,7 @@ function onfound2(resource) {
});
resource.properties.state = false;
- client.update(resource).then(function(res) {
- }).catch(function(error) {
- });
+ client.update(resource);
client.retrieve(resource.deviceId).then(function(res) {
assert(res.properties.state === false,