File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import { expect } from 'chai';
22
33import { DEFAULT_GITHUB_REGISTRY } from '@hyperlane-xyz/registry' ;
44import { getRegistry } from '@hyperlane-xyz/registry/fs' ;
5- import { rootLogger } from '@hyperlane-xyz/utils' ;
5+ import { retryAsync , rootLogger } from '@hyperlane-xyz/utils' ;
66
77import { WarpRouteIds } from '../config/environments/mainnet3/warp/warpIds.js' ;
88
@@ -16,9 +16,15 @@ describe('Warp IDs', function () {
1616 logger : rootLogger ,
1717 } ) ;
1818 for ( const warpId of Object . values ( WarpRouteIds ) ) {
19- // That's a long sentence!
19+ // Retry to handle transient network failures (e.g. socket closed)
20+ // when fetching from GitHub registry in CI
21+ const route = await retryAsync (
22+ ( ) => registry . getWarpRoute ( warpId ) ,
23+ 3 ,
24+ 500 ,
25+ ) ;
2026 expect (
21- await registry . getWarpRoute ( warpId ) ,
27+ route ,
2228 `Warp ID ${ warpId } not in registry, the .registryrc or your local registry may be out of date` ,
2329 ) . to . not . be . null . and . not . be . undefined ;
2430 }
You can’t perform that action at this time.
0 commit comments