@@ -9,11 +9,10 @@ test('Feed read/write as payload', async () => {
99 const writer = bee . makeFeedWriter ( NULL_TOPIC , privateKey )
1010 writer . uploadPayload ( batch ( ) , 'Feed payload' , { deferred : false } )
1111
12- await System . waitFor (
13- async ( ) => bee . isFeedRetrievable ( writer . owner , writer . topic , FeedIndex . fromBigInt ( 0n ) ) ,
14- Dates . seconds ( 1 ) ,
15- 30 ,
16- )
12+ await System . waitFor ( async ( ) => bee . isFeedRetrievable ( writer . owner , writer . topic , FeedIndex . fromBigInt ( 0n ) ) , {
13+ attempts : 60 ,
14+ waitMillis : Dates . seconds ( 1 ) ,
15+ } )
1716
1817 const explicitIndexReadResult = await writer . downloadPayload ( { index : 0 } )
1918 expect ( explicitIndexReadResult . payload . toUtf8 ( ) ) . toBe ( 'Feed payload' )
@@ -31,11 +30,10 @@ test('Feed read/write as reference', async () => {
3130 const writer = bee . makeFeedWriter ( NULL_TOPIC , privateKey )
3231 await writer . uploadReference ( batch ( ) , uploadResult . reference )
3332
34- await System . waitFor (
35- async ( ) => bee . isFeedRetrievable ( writer . owner , writer . topic , FeedIndex . fromBigInt ( 0n ) ) ,
36- Dates . seconds ( 1 ) ,
37- 30 ,
38- )
33+ await System . waitFor ( async ( ) => bee . isFeedRetrievable ( writer . owner , writer . topic , FeedIndex . fromBigInt ( 0n ) ) , {
34+ attempts : 60 ,
35+ waitMillis : Dates . seconds ( 1 ) ,
36+ } )
3937
4038 const explicitIndexReadResult = await writer . downloadReference ( { index : 0 , hasTimestamp : true } )
4139 expect ( explicitIndexReadResult . reference . toHex ( ) ) . toBe ( uploadResult . reference . toHex ( ) )
@@ -51,11 +49,10 @@ test('Feed read/write 40 bytes payload', async () => {
5149 const writer = bee . makeFeedWriter ( NULL_TOPIC , privateKey )
5250 writer . uploadPayload ( batch ( ) , 'This string is exactly 40 bytes in utf-8' , { deferred : false } )
5351
54- await System . waitFor (
55- async ( ) => bee . isFeedRetrievable ( writer . owner , writer . topic , FeedIndex . fromBigInt ( 0n ) ) ,
56- Dates . seconds ( 1 ) ,
57- 30 ,
58- )
52+ await System . waitFor ( async ( ) => bee . isFeedRetrievable ( writer . owner , writer . topic , FeedIndex . fromBigInt ( 0n ) ) , {
53+ attempts : 60 ,
54+ waitMillis : Dates . seconds ( 1 ) ,
55+ } )
5956
6057 const latestReadResult = await writer . downloadPayload ( )
6158 expect ( latestReadResult . payload . toUtf8 ( ) ) . toBe ( 'This string is exactly 40 bytes in utf-8' )
@@ -69,11 +66,10 @@ test('Feed read/write as payload when data does not fit into one chunk', async (
6966 const writer = bee . makeFeedWriter ( NULL_TOPIC , privateKey )
7067 writer . uploadPayload ( batch ( ) , text , { deferred : false } )
7168
72- await System . waitFor (
73- async ( ) => bee . isFeedRetrievable ( writer . owner , writer . topic , FeedIndex . fromBigInt ( 0n ) ) ,
74- Dates . seconds ( 1 ) ,
75- 30 ,
76- )
69+ await System . waitFor ( async ( ) => bee . isFeedRetrievable ( writer . owner , writer . topic , FeedIndex . fromBigInt ( 0n ) ) , {
70+ attempts : 60 ,
71+ waitMillis : Dates . seconds ( 1 ) ,
72+ } )
7773
7874 const latestReadResult = await writer . downloadPayload ( )
7975 expect ( latestReadResult . payload . toUtf8 ( ) ) . toHaveLength ( 5000 )
0 commit comments