1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-07 13:22:56 +03:00

Upgrade node and dependencies (#1578)

* upgrade workflow actions

* fix setup-node version

* change redis-64 version to 3.0.503

* fix "no password is set" for redis6,
fix tests to work with redis6,
add redis6 to workflows

* do not use assert.match (was added only at v13.6.0 & v12.16.0)

* fix errors.subscribeUnsubscribeOnly regex

* fix invaliodPassword typo

* send --save "" to redis-server in tests

* upgrade dependencies, set node minimum version to 10, use current LTS versions in tests and benchmark workflows

* change windows tests too

* revert mocha back to ^4.1.0

* fix for f5528504a0 - revert mocha back to ^4.1.0

* fix some tests and upgrade mocha

* fix two more tests

* try to fix tests in windows

* upgrade denque and redis-commands
ref #1575

* replace `new Buffer` (deprecated) with `Buffer.from`

* Buffer.from(0) should be Buffer.alloc(0)
This commit is contained in:
Leibale Eidelman
2021-03-08 14:12:26 -05:00
committed by GitHub
parent 218874432e
commit fbca5cda0a
22 changed files with 129 additions and 98 deletions

View File

@@ -14,6 +14,8 @@ describe('connection tests', function () {
client = null;
});
afterEach(function () {
if (!client) return;
client.end(true);
});
@@ -238,7 +240,8 @@ describe('connection tests', function () {
client = redis.createClient({
retryStrategy: function (options) {
if (options.totalRetryTime > 150) {
client.set('foo', 'bar', function (err, res) {
client.set('foo', 'bar');
client.once('error', function (err) {
assert.strictEqual(err.message, 'Redis connection in broken state: retry aborted.');
assert.strictEqual(err.origin.message, 'Connection timeout');
done();
@@ -256,7 +259,8 @@ describe('connection tests', function () {
client = redis.createClient({
retry_strategy: function (options) {
if (options.total_retry_time > 150) {
client.set('foo', 'bar', function (err, res) {
client.set('foo', 'bar');
client.once('error', function (err) {
assert.strictEqual(err.message, 'Redis connection in broken state: retry aborted.');
assert.strictEqual(err.code, 'CONNECTION_BROKEN');
assert.strictEqual(err.origin.code, 'ECONNREFUSED');
@@ -334,9 +338,10 @@ describe('connection tests', function () {
it('use the system socket timeout if the connect_timeout has not been provided', function (done) {
client = redis.createClient({
host: '2001:db8::ff00:42:8329' // auto detect ip v6
host: '0:0:0:0:0:0:0:1', // auto detect ip v6
no_ready_check: true
});
assert.strictEqual(client.address, '2001:db8::ff00:42:8329:6379');
assert.strictEqual(client.address, '0:0:0:0:0:0:0:1:6379');
assert.strictEqual(client.connection_options.family, 6);
process.nextTick(function () {
assert.strictEqual(client.stream.listeners('timeout').length, 0);