Skip to content

Commit 9068de8

Browse files
committed
Additional logging and timeout tuning
Needed to debug flaky tests.
1 parent 7d3ed1a commit 9068de8

File tree

2 files changed

+14
-7
lines changed

2 files changed

+14
-7
lines changed

test/v1/boltkit.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ var fs = require('fs');
2323
var tmp = require('tmp');
2424

2525
var BoltKit = function (verbose) {
26-
this.verbose = verbose || false;
26+
this.verbose = verbose || true;
2727
};
2828

2929
BoltKit.prototype.startWithTemplate = function (scriptTemplate, parameters, port) {
@@ -37,16 +37,17 @@ BoltKit.prototype.startWithTemplate = function (scriptTemplate, parameters, port
3737
BoltKit.prototype.start = function(script, port) {
3838
var spawn = childProcess.spawn, server, code = -1;
3939

40+
console.log('+++ Starting boltstub on port ' + port);
4041
server = spawn('/usr/local/bin/boltstub', ['-v', port, script]);
4142
if (this.verbose) {
4243
server.stdout.on('data', (data) => {
43-
console.log(`${data}`);
44+
console.log(`+++ Boltstup on port ${port}:\n${data}`);
4445
});
4546
server.stderr.on('data', (data) => {
46-
console.log(`${data}`);
47+
console.log(`+++ Boltstup on port ${port}:\n${data}`);
4748
});
4849
server.on('end', function (data) {
49-
console.log(data);
50+
console.log(`+++ Boltstup on port ${port}:\n${data}`);
5051
});
5152
}
5253

@@ -55,7 +56,7 @@ BoltKit.prototype.start = function(script, port) {
5556
});
5657

5758
server.on('error', function (err) {
58-
console.log('Failed to start child process:' + err);
59+
console.log('Failed to start child process on port ' + port + ' error: ' + err);
5960
});
6061

6162
var Server = function(){};
@@ -68,7 +69,7 @@ BoltKit.prototype.start = function(script, port) {
6869
//Make sure boltstub is started before running
6970
//user code
7071
BoltKit.prototype.run = function(callback) {
71-
setTimeout(callback, 1000);
72+
setTimeout(callback, 5000);
7273
};
7374

7475
function boltKitSupport() {

test/v1/routing.driver.boltkit.it.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,18 @@ import neo4j from "../../src/v1";
2121
import boltkit from "./boltkit";
2222
import RoutingTable from "../../src/v1/internal/routing-table";
2323

24+
jasmine.getEnv().addReporter({
25+
specStarted: result => {
26+
console.log('+++ Running test: ' + result.fullName);
27+
}
28+
});
29+
2430
describe('routing driver', () => {
2531
let originalTimeout;
2632

2733
beforeAll(() => {
2834
originalTimeout = jasmine.DEFAULT_TIMEOUT_INTERVAL;
29-
jasmine.DEFAULT_TIMEOUT_INTERVAL = 10000;
35+
jasmine.DEFAULT_TIMEOUT_INTERVAL = 60000;
3036
});
3137

3238
afterAll(() => {

0 commit comments

Comments
 (0)