Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
8bcd338
Update Jenkinsfile
SiyaoIsHiding Sep 9, 2024
86da0c0
Update Jenkinsfile
SiyaoIsHiding Sep 9, 2024
34d5024
Update Jenkinsfile
SiyaoIsHiding Sep 9, 2024
0699654
Update Jenkinsfile
SiyaoIsHiding Sep 9, 2024
5a5a9d8
Update Jenkinsfile
SiyaoIsHiding Sep 10, 2024
e715972
Update Jenkinsfile
SiyaoIsHiding Sep 10, 2024
406a8b6
Update Jenkinsfile
SiyaoIsHiding Sep 10, 2024
7653d95
Update test-helper.js
SiyaoIsHiding Sep 10, 2024
e33ba76
Update test-helper.js
SiyaoIsHiding Sep 10, 2024
ddcdec4
fixyaml
SiyaoIsHiding Sep 10, 2024
3796202
Update Jenkinsfile
SiyaoIsHiding Sep 10, 2024
3fe64ce
Merge branch 'master' of github.com:SiyaoIsHiding/nodejs-driver
SiyaoIsHiding Sep 11, 2024
c59e57c
fix eslint
SiyaoIsHiding Sep 11, 2024
dc66e2e
fix eslint
SiyaoIsHiding Sep 11, 2024
28fe313
fix virtual table
SiyaoIsHiding Sep 11, 2024
594be60
typo `
SiyaoIsHiding Sep 11, 2024
2a4575d
5.0-beta1, virtual table
SiyaoIsHiding Sep 11, 2024
3f5143d
method too large???
SiyaoIsHiding Sep 11, 2024
ed616b5
Update Jenkinsfile
SiyaoIsHiding Sep 11, 2024
d4bcb14
Update Jenkinsfile
SiyaoIsHiding Sep 11, 2024
552589e
fix isCassandraGreaterThan
SiyaoIsHiding Sep 11, 2024
73672c9
Merge branch 'master' of github.com:SiyaoIsHiding/nodejs-driver
SiyaoIsHiding Sep 11, 2024
5e91c29
eslint
SiyaoIsHiding Sep 11, 2024
51a00a9
Update Jenkinsfile
SiyaoIsHiding Sep 12, 2024
72e6fa8
c45-working
SiyaoIsHiding Sep 13, 2024
ffd0ded
add hcd
SiyaoIsHiding Sep 13, 2024
a324b5e
merge
SiyaoIsHiding Sep 13, 2024
824eca6
eslint
SiyaoIsHiding Sep 14, 2024
3873621
extend wait time
SiyaoIsHiding Sep 14, 2024
db633d4
deleting -j port
SiyaoIsHiding Sep 16, 2024
70a95e3
change test helper ccm commands to look exactly the same as lukasz's
SiyaoIsHiding Sep 16, 2024
ffcc240
wait for longer
SiyaoIsHiding Sep 17, 2024
d67111a
forNodeToBeAdded instead of forNodeUp
SiyaoIsHiding Sep 17, 2024
441a3a8
add all distributions to jenkinsfil
SiyaoIsHiding Sep 17, 2024
2618f42
method too large?
SiyaoIsHiding Sep 17, 2024
d062967
method too large2
SiyaoIsHiding Sep 17, 2024
44ca6af
method too large3
SiyaoIsHiding Sep 17, 2024
653a30f
at least add 3.11
SiyaoIsHiding Sep 17, 2024
845b0fa
delete some scaffold code
SiyaoIsHiding Sep 17, 2024
fcd0144
add nodenv install -list
SiyaoIsHiding Sep 19, 2024
7cabb9a
Merge branch 'master' of github.com:SiyaoIsHiding/nodejs-driver
SiyaoIsHiding Sep 19, 2024
6b42d4c
delete node v16
SiyaoIsHiding Sep 19, 2024
90a3722
update jenkinsfile for node 22
SiyaoIsHiding Sep 19, 2024
7bfdb9d
del description
SiyaoIsHiding Sep 19, 2024
54ae08b
comment out dse 6.8
SiyaoIsHiding Sep 19, 2024
4155270
delete notify slack
SiyaoIsHiding Sep 19, 2024
54633fe
uncomment 6.8.30
SiyaoIsHiding Sep 19, 2024
cd583f4
add back notify slack
SiyaoIsHiding Sep 20, 2024
d9ea8f5
delete notifyslack when success or unstable
SiyaoIsHiding Sep 20, 2024
23b267b
Update package.json
SiyaoIsHiding Sep 25, 2024
37255d9
Update package.json
SiyaoIsHiding Sep 25, 2024
7f02b84
Skip g.V().count)() related tests on dse6.9.0
SiyaoIsHiding Sep 26, 2024
1017261
use 5.0 instead of 5.0-beta1, use openjdk@17
SiyaoIsHiding Sep 26, 2024
6aaf093
lint
SiyaoIsHiding Sep 26, 2024
bd49d08
revert to 5.0-beta1
SiyaoIsHiding Sep 26, 2024
4a8f849
merge three functions into one
SiyaoIsHiding Sep 26, 2024
80112a3
delete notifySlack for ScehduledTesting
SiyaoIsHiding Sep 26, 2024
2c5b5e0
merge three functions into one
SiyaoIsHiding Sep 26, 2024
7b6f29d
add back long description
SiyaoIsHiding Sep 26, 2024
2f2a0ea
change package-lock.json
SiyaoIsHiding Sep 26, 2024
2a503dd
update package-lock
SiyaoIsHiding Sep 27, 2024
70cfb40
Update Jenkinsfile
SiyaoIsHiding Oct 1, 2024
ab9eb82
Update Jenkinsfile
SiyaoIsHiding Oct 1, 2024
60ea99b
Update Jenkinsfile
SiyaoIsHiding Oct 1, 2024
4c908ba
Update Jenkinsfile
SiyaoIsHiding Oct 1, 2024
a736b3a
Update Jenkinsfile to 5.0.1
SiyaoIsHiding Oct 2, 2024
9c35671
delete java version
SiyaoIsHiding Oct 2, 2024
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
108 changes: 57 additions & 51 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@


def initializeEnvironment() {
def nodeVersions = ['16': '16.20.2', '18': '18.17.1', '20': '20.5.1']
def nodeVersions = ['18': '18.20.4', '20': '20.17.0', '22': '22.8.0']
env.DRIVER_DISPLAY_NAME = 'Cassandra Node.js Driver'
env.DRIVER_METRIC_TYPE = 'oss'
if (env.GIT_URL.contains('riptano/nodejs-driver')) {
Expand All @@ -19,6 +19,9 @@ def initializeEnvironment() {
env.GITHUB_COMMIT_URL = "${GITHUB_PROJECT_URL}/commit/${env.GIT_COMMIT}"
env.NODEJS_VERSION_FULL = nodeVersions[env.NODEJS_VERSION]

env.JAVA8_HOME="${JABBA_HOME}/jdk/1.8"
env.JAVA11_HOME="${JABBA_HOME}/jdk/openjdk@1.11"

sh label: 'Assign Node.js global environment', script: '''#!/bin/bash -lex
nodenv versions
echo "Using Node.js runtime ${NODEJS_VERSION} (${NODEJS_VERSION_FULL})"
Expand All @@ -38,13 +41,25 @@ CCM_CASSANDRA_VERSION=${DSE_FIXED_VERSION} # maintain for backwards compatibilit
CCM_VERSION=${DSE_FIXED_VERSION}
CCM_SERVER_TYPE=dse
DSE_VERSION=${DSE_FIXED_VERSION}
CCM_IS_DSE=true
CCM_DISTRIBUTION=dse
CCM_BRANCH=${DSE_FIXED_VERSION}
DSE_BRANCH=${DSE_FIXED_VERSION}
ENVIRONMENT_EOF
'''
}

if (env.CASSANDRA_VERSION.split('-')[0] == 'hcd'){
env.HCD_FIXED_VERSION = env.CASSANDRA_VERSION.split('-')[1]
sh label: 'Update environment for HCD', script: '''#!/bin/bash -le
cat >> ${HOME}/environment.txt << ENVIRONMENT_EOF
CCM_PATH=${HOME}/ccm
CCM_CASSANDRA_VERSION=${HCD_FIXED_VERSION} # maintain for backwards compatibility
CCM_VERSION=${HCD_FIXED_VERSION}
CCM_DISTRIBUTION=hcd
ENVIRONMENT_EOF
'''
}

sh label: 'Display Node.js and environment information', script: '''#!/bin/bash -le
# Load CCM environment variables
set -o allexport
Expand Down Expand Up @@ -201,6 +216,12 @@ def describeAdhocTestingStage() {
}
}

def describeInstallAndLint(){
describePerCommitStage()
installDriverAndDependencies()
executeLinter()
}

// branch pattern for cron
def branchPatternCron() {
~"(master)"
Expand Down Expand Up @@ -240,15 +261,19 @@ pipeline {
</table>''')
choice(
name: 'ADHOC_BUILD_AND_EXECUTE_TESTS_NODEJS_VERSION',
choices: ['16', '18', '20', 'ALL'],
choices: ['18', '20', '22', 'ALL'],
description: 'Node.js version to use for adhoc <b>BUILD-AND-EXECUTE-TESTS</b> <strong>ONLY!</strong>')
choice(
name: 'ADHOC_BUILD_AND_EXECUTE_TESTS_SERVER_VERSION',
choices: [
'3.11', // Current Apache Cassandra
'4.0', // Development Apache Cassandra
'3.11', // Previous Apache Cassandra
'4.0', // Previous Apache Cassandra
Comment thread
absurdfarce marked this conversation as resolved.
'4.1', // Previous Apache Cassandra
'5.0', // Current Apache Cassandra
'dse-5.1.35', // Legacy DataStax Enterprise
'dse-6.8.30', // Development DataStax Enterprise
'dse-6.8.30', // Previoius DataStax Enterprise
'dse-6.9.0', // Current DataStax Enterprise
Comment thread
absurdfarce marked this conversation as resolved.
'hcd-1.0.0', // HCD
'ALL'],
description: '''Apache Cassandra and DataStax Enterprise server version to use for adhoc <b>BUILD-AND-EXECUTE-TESTS</b> <strong>ONLY!</strong>
<table style="width:100%">
Expand Down Expand Up @@ -326,14 +351,16 @@ pipeline {
axes {
axis {
name 'CASSANDRA_VERSION'
values '3.11', // Current Apache Cassandra
'4.0', // Development Apache Cassandra
'dse-5.1.35', // Legacy DataStax Enterprise
'dse-6.8.30' // Development DataStax Enterprise
values '3.11', // Previous Apache Cassandra
'4.1', // Previous Apache Cassandra
'5.0', // Current Apache Cassandra
'dse-6.8.30', // Previous DataStax Enterprise
'dse-6.9.0', // Current DataStax Enterprise
'hcd-1.0.0' // HCD
Comment thread
absurdfarce marked this conversation as resolved.
}
axis {
name 'NODEJS_VERSION'
values '16', '18', '20'
values '18', '20', '22'
}
}

Expand All @@ -352,19 +379,9 @@ pipeline {
}
}
}
stage('Describe-Build') {
stage('Describe-Install-And-Lint') {
steps {
describePerCommitStage()
}
}
stage('Install-Driver-And-Dependencies') {
steps {
installDriverAndDependencies()
}
}
stage('Execute-Linter') {
steps {
executeLinter()
describeInstallAndLint()
}
}
stage('Execute-Tests') {
Expand Down Expand Up @@ -419,14 +436,16 @@ pipeline {
axes {
axis {
name 'CASSANDRA_VERSION'
values '3.11', // Current Apache Cassandra
'4.0', // Development Apache Cassandra
'dse-5.1.35', // Legacy DataStax Enterprise
'dse-6.8.30' // Development DataStax Enterprise
values '3.11', // Previous Apache Cassandra
'4.1', // Previous Apache Cassandra
'5.0', // Current Apache Cassandra
'dse-6.8.30', // Previous DataStax Enterprise
'dse-6.9.0', // Current DataStax Enterprise
'hcd-1.0.0' // HCD
Comment thread
absurdfarce marked this conversation as resolved.
}
axis {
name 'NODEJS_VERSION'
values '16', '18', '20'
values '18', '20', '22'
}
}

Expand All @@ -445,19 +464,9 @@ pipeline {
}
}
}
stage('Describe-Build') {
steps {
describeScheduledTestingStage()
}
}
stage('Install-Driver-And-Dependencies') {
steps {
installDriverAndDependencies()
}
}
stage('Execute-Linter') {
stage('Describe-Install-And-Lint') {
steps {
executeLinter()
describeInstallAndLint()
}
}
stage('Execute-Tests') {
Expand Down Expand Up @@ -486,12 +495,6 @@ pipeline {
aborted {
notifySlack('aborted')
}
success {
notifySlack('completed')
}
unstable {
notifySlack('unstable')
}
failure {
notifySlack('FAILED')
}
Expand All @@ -510,14 +513,17 @@ pipeline {
axes {
axis {
name 'CASSANDRA_VERSION'
values '3.11', // Current Apache Cassandra
'4.0', // Development Apache Cassandra
'dse-5.1.35', // Legacy DataStax Enterprise
'dse-6.8.30' // Development DataStax Enterprise
values '3.11', // Previous Apache Cassandra
'4.1', // Previous Apache Cassandra
'5.0', // Current Apache Cassandra
'dse-6.8.30', // Previous DataStax Enterprise
'dse-6.9.0', // Current DataStax Enterprise
'hcd-1.0.0' // HCD
Comment thread
absurdfarce marked this conversation as resolved.

}
axis {
name 'NODEJS_VERSION'
values '16', '18', '20'
values '18', '20', '22'
}
}
when {
Expand Down
34 changes: 21 additions & 13 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"types": "./index.d.ts",
"dependencies": {
"@types/long": "~5.0.0",
"@types/node": ">=8",
"@types/node": "^18.11.18",
"adm-zip": "~0.5.10",
"long": "~5.2.3"
},
Expand Down
6 changes: 3 additions & 3 deletions test/integration/short/control-connection-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ describe('ControlConnection', function () {

// While the host is started, it's not a given that it will have been connected and marked up,
// wait for that to be the case.
await helper.wait.forNodeToBeAdded(cc.hosts, 3);
await helper.wait.forNodeToBeAdded(cc.hosts, 3, 5000, 200);
await helper.wait.forNodeUp(cc.hosts, 3);

const countUp = cc.hosts.values().reduce((value, host) => value + (host.isUp() ? 1 : 0), 0);
Expand Down Expand Up @@ -220,7 +220,7 @@ describe('ControlConnection', function () {

// restart node 2 and make sure it comes up.
await util.promisify(helper.ccmHelper.startNode)(2);
await helper.wait.forNodeUp(cc.hosts, 2);
await helper.wait.forNodeUp(cc.hosts, 2, 5000, 200);

// check that host 1 is down, host 2 is up and the control connection is to host 2.
cc.hosts.forEach(h => {
Expand All @@ -232,7 +232,7 @@ describe('ControlConnection', function () {
}
});

await helper.wait.until(() => cc.host);
await helper.wait.until(() => cc.host, 5000, 200);

assert.strictEqual(helper.lastOctetOf(cc.host), '2');
});
Expand Down
7 changes: 6 additions & 1 deletion test/integration/short/geometry/polygon-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,12 @@ vdescribe('dse-5.0', 'Polygon @SERVER_API', function () {
normalizedCoordinates.push([c[0], c[2], c[1], c[3]]);
}
}
assert.deepEqual(normalizedCoordinates, polygon.toJSON().coordinates);
if (helper.isDseGreaterThan('6.9')) {
//TODO: find documentation
assert.deepEqual(value, polygon.toJSON());
}else{
assert.deepEqual(normalizedCoordinates, polygon.toJSON().coordinates);
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change to address NODEJS-675.

Worth noting that there is some commentary in that test about why this normalization is occurring. Might be worth mentioning to the DSE team that we noticed this change and check with them about whether this was a deliberate modification on their part or an unintended side effect.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worth noting: @SiyaoIsHiding has asked this question internally but we haven't heard a response back.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

eachNext();
});
});
Expand Down
24 changes: 15 additions & 9 deletions test/integration/short/graph/graph-olap-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,15 +134,21 @@ vdescribe('dse-5.0', 'Client with spark workload', function () {
{loadBalancing: new DefaultLoadBalancingPolicy(), graphOptions: {source: 'a'}})]}, true)
);
context('with no callback specified', function () {
it('should return a promise for OLAP query', function () {
const client = newInstance();
const p = client.executeGraph('g.V().count()', { graphSource: 'a' });
helper.assertInstanceOf(p, Promise);
return p.then(function (result) {
helper.assertInstanceOf(result, graphModule.GraphResultSet);
assert.strictEqual(typeof result.first(), 'number');
});
});
// if dse-6.9.0, skip this test because NODEJS-676 and DSP-24336
if (helper.getServerInfo().version === '6.9.0' && helper.getServerInfo().isDse) {
xit('should return a promise for OLAP query');
} else {
it(
'should return a promise for OLAP query', function () {
const client = newInstance();
const p = client.executeGraph('g.V().count()', { graphSource: 'a' });
helper.assertInstanceOf(p, Promise);
return p.then(function (result) {
helper.assertInstanceOf(result, graphModule.GraphResultSet);
assert.strictEqual(typeof result.first(), 'number');
});
});
}
});
});
});
Expand Down
37 changes: 21 additions & 16 deletions test/integration/short/graph/graph-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -449,21 +449,26 @@ vdescribe('dse-5.0', 'Client @SERVER_API', function () {
done();
});
}));
it('should retrieve a Int64 scalar', wrapClient(function (client, done) {
const query = JSON.stringify({
'@type': 'g:Bytecode',
'@value': {
'step': [["V"], ["count"]]
}
});
client.executeGraph(query, null, { graphLanguage: 'bytecode-json' }, function (err, result) {
assert.ifError(err);
helper.assertInstanceOf(result, graphModule.GraphResultSet);
const count = result.first();
helper.assertInstanceOf(count, types.Long);
done();
});
}));
// if dse-6.9.0, skip this test because NODEJS-676 and DSP-24336
if (helper.getServerInfo().version === '6.9.0' && helper.getServerInfo().isDse) {
it.skip('should retrieve a Int64 scalar');
} else {
it('should retrieve a Int64 scalar', wrapClient(function (client, done) {
const query = JSON.stringify({
'@type': 'g:Bytecode',
'@value': {
'step': [["V"], ["count"]]
}
});
client.executeGraph(query, null, { graphLanguage: 'bytecode-json' }, function (err, result) {
assert.ifError(err);
helper.assertInstanceOf(result, graphModule.GraphResultSet);
const count = result.first();
helper.assertInstanceOf(count, types.Long);
done();
});
}));
}
it('should allow graph language to be set from the execution profile', wrapClient(function (client, done) {
const query = JSON.stringify({
'@type': 'g:Bytecode',
Expand All @@ -480,7 +485,7 @@ vdescribe('dse-5.0', 'Client @SERVER_API', function () {
});
done();
});
}, { profiles: [ new ExecutionProfile('graph-profile1', { graphOptions: { language: 'bytecode-json' } }) ]}));
}, { profiles: [new ExecutionProfile('graph-profile1', { graphOptions: { language: 'bytecode-json' } })] }));
});
});
it('should use list as a parameter', wrapClient(function(client, done) {
Expand Down
Loading