Skip to content

Remove tck #438

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 17, 2019
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 1 addition & 19 deletions gulpfile.babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ var fs = require("fs-extra");
var runSequence = require('run-sequence');
var path = require('path');
var minimist = require('minimist');
var cucumber = require('gulp-cucumber');
var install = require("gulp-install");
var file = require('gulp-file');
var semver = require('semver');
Expand Down Expand Up @@ -153,7 +152,7 @@ gulp.task('install-driver-into-sandbox', ['nodejs'], function(){
});

gulp.task('test', function (cb) {
runSequence('run-ts-declaration-tests', 'test-nodejs', 'test-browser', 'run-tck', function (err) {
runSequence('run-ts-declaration-tests', 'test-nodejs', 'test-browser', function (err) {
if (err) {
var exitCode = 2;
console.log('[FAIL] test task failed - exiting with code ' + exitCode);
Expand Down Expand Up @@ -213,23 +212,6 @@ gulp.task('watch-n-test', ['test-nodejs'], function () {
return gulp.watch(['src/**/*.js', "test/**/*.js"], ['test-nodejs'] );
});

var featureFiles = 'https://s3-eu-west-1.amazonaws.com/remoting.neotechnology.com/driver-compliance/tck.tar.gz';
var featureHome = './build/tck';

gulp.task('download-tck', function() {
return download(featureFiles)
.pipe(decompress({strip: 1}))
.pipe(gulp.dest(featureHome));
});

gulp.task('run-tck', ['download-tck', 'nodejs'], function() {
return gulp.src(featureHome + "/*").pipe(cucumber({
'steps': 'test/v1/tck/steps/*.js',
'format': 'progress',
'tags' : ['~@fixed_session_pool', '~@db', '~@equality', '~@streaming_and_cursor_navigation']
})).on('end', logActiveNodeHandles);
});

/** Set the project version, controls package.json and version.js */
gulp.task('set', function() {
// Get the --version arg from command line
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
"start-neo4j": "gulp start-neo4j",
"stop-neo4j": "gulp stop-neo4j",
"run-stress-tests": "gulp run-stress-tests",
"run-tck": "gulp run-tck",
"run-ts-declaration-tests": "gulp run-ts-declaration-tests",
"docs": "esdoc -c esdoc.json",
"versionRelease": "gulp set --version $VERSION && npm version $VERSION --no-git-tag-version",
Expand Down
20 changes: 0 additions & 20 deletions test/resources/derived.cert

This file was deleted.

27 changes: 0 additions & 27 deletions test/resources/derived.key

This file was deleted.

11 changes: 0 additions & 11 deletions test/resources/other.cert

This file was deleted.

16 changes: 0 additions & 16 deletions test/resources/other.key

This file was deleted.

21 changes: 0 additions & 21 deletions test/resources/root.cert

This file was deleted.

27 changes: 0 additions & 27 deletions test/resources/root.key

This file was deleted.

70 changes: 3 additions & 67 deletions test/v1/session.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,10 +234,6 @@ describe('session', () => {
});

it('should expose server info on successful query', done => {
if (!serverIs31OrLater(done)) {
return;
}

// Given
const statement = 'RETURN 1';

Expand All @@ -252,11 +248,7 @@ describe('session', () => {
});
});

it('should expose execution time information when using 3.1 and onwards', done => {
if (!serverIs31OrLater(done)) {
return;
}

it('should expose execution time information', done => {
// Given
const statement = 'UNWIND range(1,10000) AS n RETURN n AS number';
// When & Then
Expand Down Expand Up @@ -359,7 +351,8 @@ describe('session', () => {
session.beginTransaction();

// Then
expect(session.beginTransaction).toThrow();
expect(()=>session.beginTransaction()).toThrowError(
/You cannot begin a transaction on a session with an open transaction/);
});

it('should return lots of data', done => {
Expand Down Expand Up @@ -579,9 +572,6 @@ describe('session', () => {
});

it('should update last bookmark after every read tx commit', done => {
if (!serverIs31OrLater(done)) {
return;
}

// new session without initial bookmark
session = driver.session();
Expand All @@ -601,9 +591,6 @@ describe('session', () => {
});

it('should update last bookmark after every write tx commit', done => {
if (!serverIs31OrLater(done)) {
return;
}

const bookmarkBefore = session.lastBookmark();

Expand All @@ -621,9 +608,6 @@ describe('session', () => {
});

it('should not lose last bookmark after run', done => {
if (!serverIs31OrLater(done)) {
return;
}

const tx = session.beginTransaction();
tx.run('CREATE ()').then(() => {
Expand All @@ -640,10 +624,6 @@ describe('session', () => {
});

it('should commit read transaction', done => {
if (!serverIs31OrLater(done)) {
return;
}

// new session without initial bookmark
session = driver.session();
expect(session.lastBookmark()).toBeNull();
Expand All @@ -659,10 +639,6 @@ describe('session', () => {
});

it('should commit write transaction', done => {
if (!serverIs31OrLater(done)) {
return;
}

const bookmarkBefore = session.lastBookmark();
const resultPromise = session.writeTransaction(tx => tx.run('CREATE (n:Node {id: 42}) RETURN n.id AS answer'));

Expand All @@ -683,10 +659,6 @@ describe('session', () => {
});

it('should not commit already committed read transaction', done => {
if (!serverIs31OrLater(done)) {
return;
}

const resultPromise = session.readTransaction(tx => {
return new Promise((resolve, reject) => {
tx.run('RETURN 42 AS answer').then(result => {
Expand All @@ -712,10 +684,6 @@ describe('session', () => {
});

it('should not commit already committed write transaction', done => {
if (!serverIs31OrLater(done)) {
return;
}

const resultPromise = session.readTransaction(tx => {
return new Promise((resolve, reject) => {
tx.run('CREATE (n:Node {id: 42}) RETURN n.id AS answer').then(result => {
Expand Down Expand Up @@ -745,9 +713,6 @@ describe('session', () => {
});

it('should not commit rolled back read transaction', done => {
if (!serverIs31OrLater(done)) {
return;
}

const bookmarkBefore = session.lastBookmark();
const resultPromise = session.readTransaction(tx => {
Expand All @@ -770,9 +735,6 @@ describe('session', () => {
});

it('should not commit rolled back write transaction', done => {
if (!serverIs31OrLater(done)) {
return;
}

const bookmarkBefore = session.lastBookmark();
const resultPromise = session.readTransaction(tx => {
Expand All @@ -799,10 +761,6 @@ describe('session', () => {
});

it('should interrupt query waiting on a lock when closed', done => {
if (!serverIs31OrLater(done)) {
// locks are transaction termination aware by default only in 3.1+
return;
}

session.run('CREATE ()').then(() => {
session.close(() => {
Expand Down Expand Up @@ -836,10 +794,6 @@ describe('session', () => {
});

it('should interrupt transaction waiting on a lock when closed', done => {
if (!serverIs31OrLater(done)) {
// locks are transaction termination aware by default only in 3.1+
return;
}

session.run('CREATE ()').then(() => {
session.close(() => {
Expand Down Expand Up @@ -874,10 +828,6 @@ describe('session', () => {
});

it('should interrupt transaction function waiting on a lock when closed', done => {
if (!serverIs31OrLater(done)) {
// locks are transaction termination aware by default only in 3.1+
return;
}

session.run('CREATE ()').then(() => {
session.close(() => {
Expand Down Expand Up @@ -945,10 +895,6 @@ describe('session', () => {
});

it('should send multiple bookmarks', async () => {
if (!serverIs31OrLater()) {
return;
}

const nodeCount = 17;
const bookmarks = [];
for (let i = 0; i < nodeCount; i++) {
Expand Down Expand Up @@ -1163,16 +1109,6 @@ describe('session', () => {
});
}

function serverIs31OrLater(done) {
if (serverVersion.compareTo(VERSION_3_1_0) < 0) {
if (done && typeof done === 'function') {
done();
}
return false;
}
return true;
}

function countNodes(label, propertyKey, propertyValue) {
return new Promise((resolve, reject) => {
session.run(`MATCH (n: ${label} {${propertyKey}: ${propertyValue}}) RETURN count(n) AS count`).then(result => {
Expand Down
Loading