Skip to content

Commit 3c8a1bb

Browse files
committed
Fixed one more troublesome TCK test
1 parent c743a4d commit 3c8a1bb

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

test/v1/tck/steps/environment.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ module.exports = function () {
5858
this.savedValues = {};
5959
});
6060

61-
this.After(function (scenario, callback) {
61+
this.After("~@error_reporting",function (scenario, callback) {
6262
if (this.session) {
6363
this.session.close();
6464
}

test/v1/tck/steps/erroreportingsteps.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ module.exports = function () {
3030
});
3131

3232
this.When(/^`run` a query with that same session without closing the transaction first$/, function (callback) {
33-
self = this;
33+
var self = this;
3434
this.session.run("CREATE (:n)").then(function(result) {callback()}).catch(function(err) {self.error = err; callback()})
3535
});
3636

3737
this.Then(/^it throws a `ClientException`$/, function (table) {
38-
expected = table.rows()[0][0];
38+
var expected = table.rows()[0][0];
3939
if (this.error === undefined) {
4040
throw new Error("Exepcted an error but got none.")
4141
}
@@ -66,6 +66,7 @@ module.exports = function () {
6666
var driver = neo4j.driver("bolt://localhost:7777", neo4j.auth.basic("neo4j", "neo4j"));
6767
driver.onError = function (error) { self.error = error; callback()};
6868
driver.session();
69+
setTimeout(callback, 1000);
6970
});
7071

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

0 commit comments

Comments
 (0)