This repository was archived by the owner on Dec 21, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +17
-4
lines changed
Expand file tree Collapse file tree 2 files changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -78,10 +78,12 @@ describe('StreamrClient resends', () => {
7878
7979 await stream . addToStorageNode ( config . clientOptions . storageNode . address )
8080
81+ } )
82+
83+ beforeEach ( async ( ) => {
8184 publishTestMessages = getPublishTestMessages ( client , {
8285 stream
8386 } )
84-
8587 published = await publishTestMessages ( MAX_MESSAGES , {
8688 waitForLast : true ,
8789 waitForLastTimeout : WAIT_FOR_STORAGE_TIMEOUT ,
@@ -341,7 +343,9 @@ describe('StreamrClient resends', () => {
341343 publishTestMessages = getPublishTestMessages ( client , {
342344 stream
343345 } )
346+ } )
344347
348+ beforeEach ( async ( ) => {
345349 client . debug ( `Publishing ${ LONG_RESEND } messages...` )
346350 published = await publishTestMessages ( LONG_RESEND , {
347351 waitForLast : true ,
Original file line number Diff line number Diff line change @@ -63,16 +63,25 @@ describeRepeats('resends', () => {
6363 subscriber = client . subscriber
6464
6565 // eslint-disable-next-line require-atomic-updates
66- client . debug ( 'connecting before test >>' )
66+ client . debug ( 'connecting before all tests >>' )
6767 await Promise . all ( [
6868 client . connect ( ) ,
6969 client . session . getSessionToken ( ) ,
7070 ] )
71+ client . debug ( 'connecting before all tests <<' )
72+ client . debug ( 'createStream >>' )
7173 stream = await client . createStream ( {
7274 name : uid ( 'stream' )
7375 } )
74- await stream . addToStorageNode ( config . clientOptions . storageNode . address )
75- client . debug ( 'connecting before test <<' )
76+ client . debug ( 'createStream <<' )
77+ } )
78+
79+ beforeAll ( async ( ) => {
80+ client . debug ( 'addToStorageNode >>' )
81+ await stream . addToStorageNode ( config . clientOptions . storageNode . address , {
82+ timeout : WAIT_FOR_STORAGE_TIMEOUT * 2 ,
83+ } )
84+ client . debug ( 'addToStorageNode <<' )
7685
7786 publishTestMessages = getPublishTestMessages ( client , {
7887 stream,
You can’t perform that action at this time.
0 commit comments