Skip to content

Commit 5ffcad7

Browse files
committed
Prevent testing for bolt+routing failure against 4.0 server
1 parent 00f7eb0 commit 5ffcad7

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

src/internal/server-version.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ const VERSION_3_1_0 = new ServerVersion(3, 1, 0);
113113
const VERSION_3_2_0 = new ServerVersion(3, 2, 0);
114114
const VERSION_3_4_0 = new ServerVersion(3, 4, 0);
115115
const VERSION_3_5_0 = new ServerVersion(3, 5, 0);
116+
const VERSION_4_0_0 = new ServerVersion(4, 0, 0);
116117
const maxVer = Number.MAX_SAFE_INTEGER;
117118
const VERSION_IN_DEV = new ServerVersion(maxVer, maxVer, maxVer);
118119

@@ -122,6 +123,7 @@ export {
122123
VERSION_3_2_0,
123124
VERSION_3_4_0,
124125
VERSION_3_5_0,
126+
VERSION_4_0_0,
125127
VERSION_IN_DEV
126128
};
127129

test/driver.test.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import sharedNeo4j from './internal/shared-neo4j';
2222
import FakeConnection from './internal/fake-connection';
2323
import lolex from 'lolex';
2424
import {DEFAULT_ACQUISITION_TIMEOUT, DEFAULT_MAX_SIZE} from '../src/internal/pool-config';
25-
import {ServerVersion, VERSION_3_1_0} from '../src/internal/server-version';
25+
import {ServerVersion, VERSION_3_1_0, VERSION_4_0_0} from '../src/internal/server-version';
2626
import testUtils from './internal/test-utils';
2727

2828
describe('driver', () => {
@@ -187,6 +187,11 @@ describe('driver', () => {
187187
});
188188

189189
it('should fail nicely when connecting with routing to standalone server', done => {
190+
if (!routingProcedureOnlyAvailableOnCores()) {
191+
done();
192+
return;
193+
}
194+
190195
// Given
191196
driver = neo4j.driver("bolt+routing://localhost", sharedNeo4j.authToken);
192197

@@ -464,4 +469,8 @@ describe('driver', () => {
464469
return Array.from(Object.values(driver._openConnections));
465470
}
466471

472+
function routingProcedureOnlyAvailableOnCores() {
473+
return serverVersion.compareTo(VERSION_4_0_0) < 0;
474+
}
475+
467476
});

0 commit comments

Comments
 (0)