Skip to content

Commit 9929475

Browse files
committed
Merge branch 1.6 into 1.7
2 parents 1cd8451 + adce081 commit 9929475

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

test/v1/tck/steps/erroreportingsteps.js

+9-10
Original file line numberDiff line numberDiff line change
@@ -65,16 +65,15 @@ module.exports = function () {
6565
this.When(/^I set up a driver to an incorrect port$/, function (callback) {
6666
var self = this;
6767
var driver = neo4j.driver("bolt://localhost:7777", neo4j.auth.basic(sharedNeo4j.username, sharedNeo4j.password));
68-
driver.onSuccess = function () {
69-
driver.close();
70-
};
71-
driver.onError = function (error) {
72-
driver.close();
73-
self.error = error;
74-
callback();
75-
};
76-
driver.session().beginTransaction();
77-
setTimeout(callback, 1000);
68+
var session = driver.session();
69+
session.run('RETURN 1')
70+
.catch(error => {
71+
self.error = error;
72+
})
73+
.then(() => {
74+
driver.close();
75+
callback();
76+
});
7877
});
7978

8079
this.When(/^I set up a driver with wrong scheme$/, function (callback) {

0 commit comments

Comments
 (0)