1- import { rmdir , poll , isPortOpen } from './test-util' ;
1+ import { rmdir , isPortOpen } from './test-util' ;
22import { Store } from '../../../src/store' ;
33import IpcAction from '../../../src/action/ipc' ;
44import GrpcAction from '../../../src/action/grpc' ;
@@ -12,7 +12,7 @@ import ChannelAction from '../../../src/action/channel';
1212import TransactionAction from '../../../src/action/transaction' ;
1313import PaymentAction from '../../../src/action/payment' ;
1414import InvoiceAction from '../../../src/action/invoice' ;
15- import { nap } from '../../../src/helper' ;
15+ import { nap , retry } from '../../../src/helper' ;
1616import { EventEmitter } from 'events' ;
1717
1818const {
@@ -108,7 +108,7 @@ describe('Action Integration Tests', function() {
108108 } ;
109109 btcdProcess = await startBtcdProcess ( btcdArgs ) ;
110110 await nap ( NAP_TIME ) ;
111- await poll ( ( ) => isPortOpen ( BTCD_PORT ) ) ;
111+ await retry ( ( ) => isPortOpen ( BTCD_PORT ) ) ;
112112 const lndProcess1Promise = startLndProcess ( {
113113 isDev,
114114 lndSettingsDir : LND_SETTINGS_DIR_1 ,
@@ -227,12 +227,12 @@ describe('Action Integration Tests', function() {
227227 btcdArgs . miningAddress = store1 . walletAddress ;
228228 btcdProcess = await startBtcdProcess ( btcdArgs ) ;
229229 await nap ( NAP_TIME ) ;
230- await poll ( ( ) => isPortOpen ( BTCD_PORT ) ) ;
230+ await retry ( ( ) => isPortOpen ( BTCD_PORT ) ) ;
231231 await mineAndSync ( { blocks : 400 } ) ;
232232 } ) ;
233233
234234 it ( 'should get public key node1' , async ( ) => {
235- await info1 . getInfo ( ) ;
235+ await info1 . pollInfo ( ) ;
236236 expect ( store1 . pubKey , 'to be ok' ) ;
237237 } ) ;
238238
@@ -266,7 +266,7 @@ describe('Action Integration Tests', function() {
266266 } ) ;
267267
268268 it ( 'should get public key node2' , async ( ) => {
269- await info2 . getInfo ( ) ;
269+ await info2 . pollInfo ( ) ;
270270 expect ( store2 . pubKey , 'to be ok' ) ;
271271 } ) ;
272272
@@ -443,8 +443,8 @@ describe('Action Integration Tests', function() {
443443
444444 const mineAndSync = async ( { blocks } ) => {
445445 await mineBlocks ( { blocks, logger } ) ;
446- await info1 . getInfo ( ) ;
447- await info2 . getInfo ( ) ;
446+ await info1 . pollInfo ( ) ;
447+ await info2 . pollInfo ( ) ;
448448 } ;
449449
450450 const updateBalances = async ( ) => {
0 commit comments