@@ -174,16 +174,16 @@ export class SentinelFramework extends DockerBase {
174
174
this . #testUtils = TestUtils . createFromConfig ( {
175
175
dockerImageName : 'redislabs/client-libs-test' ,
176
176
dockerImageVersionArgument : 'redis-version' ,
177
- defaultDockerVersion : '8.2-rc2-pre '
177
+ defaultDockerVersion : '8.2'
178
178
} ) ;
179
179
this . #nodeMap = new Map < string , ArrayElement < Awaited < ReturnType < SentinelFramework [ 'spawnRedisSentinelNodes' ] > > > > ( ) ;
180
180
this . #sentinelMap = new Map < string , ArrayElement < Awaited < ReturnType < SentinelFramework [ 'spawnRedisSentinelSentinels' ] > > > > ( ) ;
181
181
}
182
182
183
- getSentinelClient ( opts ?: Partial < RedisSentinelOptions < RedisModules ,
183
+ getSentinelClient ( opts ?: Partial < RedisSentinelOptions < RedisModules ,
184
184
RedisFunctions ,
185
185
RedisScripts ,
186
- RespVersions ,
186
+ RespVersions ,
187
187
TypeMapping > > , errors = true ) {
188
188
if ( opts ?. sentinelRootNodes !== undefined ) {
189
189
throw new Error ( "cannot specify sentinelRootNodes here" ) ;
@@ -252,7 +252,7 @@ export class SentinelFramework extends DockerBase {
252
252
253
253
protected async spawnRedisSentinelNodes ( replicasCount : number ) {
254
254
const master = await this . #testUtils. spawnRedisServer ( { serverArguments : DEBUG_MODE_ARGS } )
255
-
255
+
256
256
const replicas : Array < RedisServerDocker > = [ ]
257
257
for ( let i = 0 ; i < replicasCount ; i ++ ) {
258
258
const replica = await this . #testUtils. spawnRedisServer ( { serverArguments : DEBUG_MODE_ARGS } )
@@ -282,7 +282,7 @@ export class SentinelFramework extends DockerBase {
282
282
async getAllRunning ( ) {
283
283
for ( const port of this . getAllNodesPort ( ) ) {
284
284
let first = true ;
285
- while ( await isPortAvailable ( port ) ) {
285
+ while ( await isPortAvailable ( port ) ) {
286
286
if ( ! first ) {
287
287
console . log ( `problematic restart ${ port } ` ) ;
288
288
await setTimeout ( 500 ) ;
@@ -295,7 +295,7 @@ export class SentinelFramework extends DockerBase {
295
295
296
296
for ( const port of this . getAllSentinelsPort ( ) ) {
297
297
let first = true ;
298
- while ( await isPortAvailable ( port ) ) {
298
+ while ( await isPortAvailable ( port ) ) {
299
299
if ( ! first ) {
300
300
await setTimeout ( 500 ) ;
301
301
} else {
@@ -325,17 +325,17 @@ export class SentinelFramework extends DockerBase {
325
325
await client . connect ( ) ;
326
326
await client . replicaOf ( "127.0.0.1" , masterPort ) ;
327
327
await client . close ( ) ;
328
-
328
+
329
329
330
330
this . #nodeList. push ( replica ) ;
331
331
this . #nodeMap. set ( replica . port . toString ( ) , replica ) ;
332
332
}
333
333
334
334
async getMaster ( tracer ?: Array < string > ) : Promise < string | undefined > {
335
335
const client = RedisClient . create ( {
336
- name : this . config . sentinelName ,
336
+ name : this . config . sentinelName ,
337
337
socket : {
338
- host : "127.0.0.1" ,
338
+ host : "127.0.0.1" ,
339
339
port : this . #sentinelList[ 0 ] . port ,
340
340
} ,
341
341
modules : RedisSentinelModule ,
@@ -464,9 +464,9 @@ export class SentinelFramework extends DockerBase {
464
464
465
465
async sentinelSentinels ( ) {
466
466
const client = RedisClient . create ( {
467
- name : this . config . sentinelName ,
467
+ name : this . config . sentinelName ,
468
468
socket : {
469
- host : "127.0.0.1" ,
469
+ host : "127.0.0.1" ,
470
470
port : this . #sentinelList[ 0 ] . port ,
471
471
} ,
472
472
modules : RedisSentinelModule ,
@@ -480,9 +480,9 @@ export class SentinelFramework extends DockerBase {
480
480
481
481
async sentinelMaster ( ) {
482
482
const client = RedisClient . create ( {
483
- name : this . config . sentinelName ,
483
+ name : this . config . sentinelName ,
484
484
socket : {
485
- host : "127.0.0.1" ,
485
+ host : "127.0.0.1" ,
486
486
port : this . #sentinelList[ 0 ] . port ,
487
487
} ,
488
488
modules : RedisSentinelModule ,
@@ -496,9 +496,9 @@ export class SentinelFramework extends DockerBase {
496
496
497
497
async sentinelReplicas ( ) {
498
498
const client = RedisClient . create ( {
499
- name : this . config . sentinelName ,
499
+ name : this . config . sentinelName ,
500
500
socket : {
501
- host : "127.0.0.1" ,
501
+ host : "127.0.0.1" ,
502
502
port : this . #sentinelList[ 0 ] . port ,
503
503
} ,
504
504
modules : RedisSentinelModule ,
@@ -509,4 +509,4 @@ export class SentinelFramework extends DockerBase {
509
509
510
510
return replicas
511
511
}
512
- }
512
+ }
0 commit comments