@@ -449,6 +449,7 @@ describeRepeats('PubSub with multiple clients', () => {
449449 addAfter ( ( ) => {
450450 counterId . clear ( publisherId ) // prevent overflows in counter
451451 } )
452+
452453 const publishTestMessages = getPublishTestMessages ( pubClient , {
453454 stream,
454455 waitForLast : true ,
@@ -576,7 +577,7 @@ describeRepeats('PubSub with multiple clients', () => {
576577 /* eslint-enable no-await-in-loop */
577578 const published = { }
578579 await Promise . all ( publishers . map ( async ( pubClient ) => {
579- const publisherId = await pubClient . getPublisherId ( )
580+ const publisherId = ( await pubClient . getPublisherId ( ) ) . toLowerCase ( )
580581 const publishTestMessages = getPublishTestMessages ( pubClient , {
581582 stream,
582583 waitForLast : true ,
@@ -590,14 +591,6 @@ describeRepeats('PubSub with multiple clients', () => {
590591 } )
591592 } ) )
592593
593- await wait ( 5000 )
594-
595- mainClient . debug ( '%j' , {
596- published,
597- receivedMessagesMain,
598- receivedMessagesOther,
599- } )
600-
601594 // eslint-disable-next-line no-inner-declarations
602595 function checkMessages ( received ) {
603596 for ( const [ key , msgs ] of Object . entries ( published ) ) {
@@ -666,7 +659,7 @@ describeRepeats('PubSub with multiple clients', () => {
666659 msgs . push ( msg )
667660 receivedMessagesMain [ streamMessage . getPublisherId ( ) ] = msgs
668661 if ( Object . values ( receivedMessagesMain ) . every ( ( m ) => m . length === MAX_MESSAGES ) ) {
669- mainSub . end ( )
662+ mainSub . cancel ( )
670663 }
671664 } )
672665
@@ -679,7 +672,7 @@ describeRepeats('PubSub with multiple clients', () => {
679672 let counter = 0
680673 /* eslint-enable no-await-in-loop */
681674 await Promise . all ( publishers . map ( async ( pubClient ) => {
682- const publisherId = pubClient . getPublisherId ( )
675+ const publisherId = ( await pubClient . getPublisherId ( ) ) . toString ( )
683676 const publishTestMessages = getPublishTestMessages ( pubClient , {
684677 stream,
685678 waitForLast : true ,
@@ -702,7 +695,7 @@ describeRepeats('PubSub with multiple clients', () => {
702695 msgs . push ( msg )
703696 receivedMessagesOther [ streamMessage . getPublisherId ( ) ] = msgs
704697 if ( msgs . length === MAX_MESSAGES ) {
705- await otherSub . end ( )
698+ await otherSub . cancel ( )
706699 }
707700 } )
708701 }
@@ -712,12 +705,6 @@ describeRepeats('PubSub with multiple clients', () => {
712705
713706 await wait ( 15000 )
714707
715- mainClient . debug ( '%j' , {
716- published,
717- receivedMessagesMain,
718- receivedMessagesOther,
719- } )
720-
721708 checkMessages ( receivedMessagesMain )
722709 checkMessages ( receivedMessagesOther )
723710 } finally {
0 commit comments