You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes it's important in the integration tests to wait in the websocket for a transaction that was just sent, so the wallet can update its utxos and balance, in order to continue the test sequence. We are currently using a delay but this is causing some issues because sometimes the delay used is not enough and the test fails intermittently.
There are some solutions for that, one is what was done in the wallet lib, which is to await for a specific transaction to arrive in the websocket before continuing the test sequence. We also have the headless wallet external notification plugins that could be used for that.
Error:
console.log node_modules/winston/lib/winston/transports/console.js:79
2023-06-19T13:05:05.510Z [wallet] error: Token: 00. Insufficient amount of tokens to fill the amount. { errorCode: 'wallet-error', errorData: null, stack: 'Error: Token: 00. Insufficient amount of tokens to fill the amount.\n at SendTransaction.<anonymous> (/home/runner/work/hathor-wallet-headless/hathor-wallet-headless/node_modules/@hathor/wallet-lib/src/new/sendTransaction.ts:208:17)\n at Generator.throw (<anonymous>)\n at rejected (/home/runner/work/hathor-wallet-headless/hathor-wallet-headless/node_modules/@hathor/wallet-lib/lib/new/sendTransaction.js:12:65)\n at runMicrotasks (<anonymous>)\n at processTicksAndRejections (node:internal/process/task_queues:96:5)' }
● send tx (HTR) › Should fail to send a transaction with more than min signatures
expect(received).toBeTruthy()
Received: undefined
247 |
248 | const sig1 = await wallet1.getSignatures(txHex);
> 249 | expect(sig1).toBeTruthy();
| ^
250 | const sig2 = await wallet2.getSignatures(txHex);
251 | expect(sig2).toBeTruthy();
252 | const sig3 = await wallet3.getSignatures(txHex);
at Object.<anonymous> (__tests__/integration/multisig.test.js:249:18)
at runMicrotasks (<anonymous>)
Unit tests
Sometimes the unit tests are hanging because of an open promise.
The text was updated successfully, but these errors were encountered:
pedroferreira1
changed the title
tests: Improve stability for integration tests
tests: Improve stability for tests
Jun 12, 2023
Integration tests
Sometimes it's important in the integration tests to wait in the websocket for a transaction that was just sent, so the wallet can update its utxos and balance, in order to continue the test sequence. We are currently using a delay but this is causing some issues because sometimes the delay used is not enough and the test fails intermittently.
There are some solutions for that, one is what was done in the wallet lib, which is to await for a specific transaction to arrive in the websocket before continuing the test sequence. We also have the headless wallet external notification plugins that could be used for that.
Error:
Unit tests
Sometimes the unit tests are hanging because of an open promise.
The text was updated successfully, but these errors were encountered: