Remove Node.js v8 support (#1402)

This commit is contained in:
Tomas Della Vedova
2021-02-19 08:27:20 +01:00
committed by delvedor
parent ae3bb7031f
commit 28370acf49
43 changed files with 246 additions and 290 deletions

View File

@ -66,7 +66,7 @@ test('API', t => {
t.test('markDead', t => {
const pool = new ConnectionPool({ Connection, sniffEnabled: true })
const href = 'http://localhost:9200/'
var connection = pool.addConnection(href)
let connection = pool.addConnection(href)
pool.markDead(connection)
connection = pool.connections.find(c => c.id === href)
t.strictEqual(connection.deadCount, 1)
@ -100,7 +100,7 @@ test('API', t => {
t.test('markAlive', t => {
const pool = new ConnectionPool({ Connection, sniffEnabled: true })
const href = 'http://localhost:9200/'
var connection = pool.addConnection(href)
let connection = pool.addConnection(href)
pool.markDead(connection)
pool.markAlive(connection)
connection = pool.connections.find(c => c.id === href)
@ -121,7 +121,7 @@ test('API', t => {
sniffEnabled: true
})
const href = 'http://localhost:9200/'
var connection = pool.addConnection(href)
const connection = pool.addConnection(href)
pool.markDead(connection)
const opts = {
now: Date.now() + 1000 * 60 * 3,
@ -147,7 +147,7 @@ test('API', t => {
sniffEnabled: true
})
const href = 'http://localhost:9200/'
var connection = pool.addConnection(href)
const connection = pool.addConnection(href)
pool.markDead(connection)
const opts = {
now: Date.now() + 1000 * 60 * 3,
@ -175,7 +175,7 @@ test('API', t => {
sniffEnabled: true
})
const href = 'http://localhost:9200/'
var connection = pool.addConnection(href)
const connection = pool.addConnection(href)
pool.markDead(connection)
const opts = {
now: Date.now() + 1000 * 60 * 3,
@ -200,7 +200,7 @@ test('API', t => {
sniffEnabled: true
})
const href = 'http://localhost:9200/'
var connection = pool.addConnection(href)
const connection = pool.addConnection(href)
pool.markDead(connection)
const opts = {
now: Date.now() + 1000 * 60 * 3,
@ -292,7 +292,7 @@ test('API', t => {
t.test('removeConnection', t => {
const pool = new ConnectionPool({ Connection })
const href = 'http://localhost:9200/'
var connection = pool.addConnection(href)
const connection = pool.addConnection(href)
t.ok(pool.getConnection() instanceof Connection)
pool.removeConnection(connection)
t.strictEqual(pool.getConnection(), null)