@@ -16,19 +16,8 @@ describe('ClusteredRedisQueue.matchServers()', () => {
1616 expect ( match ( { host : 'h' , port : 1 } , { host : 'h' , port : 2 } ) ) . to . be . false ;
1717 } ) ;
1818
19- it ( 'should use strict logic when strict=true' , ( ) => {
20- // same id and same address -> true
21- expect ( match ( { id : 'a' , host : 'h' , port : 1 } , { id : 'a' , host : 'h' , port : 1 } , true ) ) . to . be . true ;
22- // same id but different address -> false
23- expect ( match ( { id : 'a' , host : 'h' , port : 1 } , { id : 'a' , host : 'h' , port : 2 } , true ) ) . to . be . false ;
24- // different id but same address -> false
25- expect ( match ( { id : 'a' , host : 'h' , port : 1 } , { id : 'b' , host : 'h' , port : 1 } , true ) ) . to . be . false ;
26- } ) ;
27-
28- it ( 'should use relaxed logic when strict=false' , ( ) => {
29- // id matches -> true even if address differs
30- expect ( match ( { id : 'a' , host : 'h' , port : 1 } , { id : 'a' , host : 'h' , port : 2 } , false ) ) . to . be . true ;
31- // address matches -> true even if id differs
32- expect ( match ( { id : 'a' , host : 'h' , port : 1 } , { id : 'b' , host : 'h' , port : 1 } , false ) ) . to . be . true ;
19+ it ( 'should match servers if id provided' , ( ) => {
20+ expect ( match ( { id : 'a' , host : 'h' , port : 1 } , { id : 'a' , host : 'h' , port : 2 } ) ) . to . be . true ;
21+ expect ( match ( { id : 'a' , host : 'h' , port : 1 } , { id : 'b' , host : 'h' , port : 1 } ) ) . to . be . true ;
3322 } ) ;
3423} ) ;
0 commit comments