File tree Expand file tree Collapse file tree 4 files changed +20
-6
lines changed
Expand file tree Collapse file tree 4 files changed +20
-6
lines changed Original file line number Diff line number Diff line change 1818
1919 strategy :
2020 matrix :
21- node-version : [18.x]
21+ node-version : [18.x, 20.x, 22.x ]
2222
2323 steps :
2424 - name : Checkout
Original file line number Diff line number Diff line change 22 * For a detailed explanation regarding each configuration property and type check, visit:
33 * https://jestjs.io/docs/en/configuration.html
44 */
5+ import { Bee } from '@ethersphere/bee-js'
56import type { Config } from '@jest/types'
6- import { Dates } from 'cafe-utility'
7+ import { Dates , System } from 'cafe-utility'
78import { getPssAddress } from './test/utility/address'
89import { getOrBuyStamp } from './test/utility/stamp'
910
@@ -21,6 +22,15 @@ export default async (): Promise<Config.InitialOptions> => {
2122 process . env . TEST_STAMP = ( await getOrBuyStamp ( ) ) . toHex ( )
2223 }
2324
25+ const bee = new Bee ( 'http://localhost:1633' )
26+ while ( 1 ) {
27+ const topology = await bee . getTopology ( )
28+ if ( topology . depth < 31 ) {
29+ break
30+ }
31+ await System . sleepMillis ( Dates . seconds ( 15 ) )
32+ }
33+
2434 return {
2535 // Indicates whether the coverage information should be collected while executing the test
2636 // collectCoverage: false,
Original file line number Diff line number Diff line change @@ -76,15 +76,15 @@ export class Upload extends RootCommand implements LeafCommand {
7676 key : 'sync-polling-time' ,
7777 description : 'Waiting time in ms between sync pollings' ,
7878 type : 'number' ,
79- default : 500 ,
79+ default : 1000 ,
8080 } )
8181 public syncPollingTime ! : number
8282
8383 @Option ( {
8484 key : 'sync-polling-trials' ,
8585 description : 'After the given trials the sync polling will stop' ,
8686 type : 'number' ,
87- default : 15 ,
87+ default : 60 ,
8888 } )
8989 public syncPollingTrials ! : number
9090
@@ -363,7 +363,11 @@ export class Upload extends RootCommand implements LeafCommand {
363363 if ( synced ) {
364364 this . console . dim ( 'Data has been synced on Swarm network' )
365365 } else {
366- this . console . error ( this . path ? `'Data syncing timeout for ${ this . path } '` : 'Data syncing timeout' )
366+ this . console . error (
367+ this . path
368+ ? `Data syncing timeout for ${ this . path } (${ syncProgress } / ${ tag . split } )`
369+ : `Data syncing timeout (${ syncProgress } / ${ tag . split } )` ,
370+ )
367371 exit ( 1 )
368372 }
369373 }
Original file line number Diff line number Diff line change 11import { existsSync , unlinkSync , writeFileSync } from 'fs'
2+ import { LeafCommand } from 'furious-commander'
23import type { Upload } from '../../src/command/upload'
34import { describeCommand , invokeTestCli } from '../utility'
45import { getStampOption } from '../utility/stamp'
5- import { LeafCommand } from 'furious-commander'
66
77function actUpload ( command : { runnable ?: LeafCommand | undefined } ) : [ string , string ] {
88 const uploadCommand = command . runnable as Upload
You can’t perform that action at this time.
0 commit comments