Skip to content

Commit

Permalink
fix: fix transaction live test for credit-only accounts (solana-labs#385
Browse files Browse the repository at this point in the history
)
  • Loading branch information
CriesofCarrots authored and mvines committed Jun 15, 2020
1 parent 474a515 commit 7d5d2f6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions web3.js/test/connection.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,11 @@ test('transaction', async () => {
result: 31,
},
]);
if (!mockRpcEnabled) {
// Credit-only account credits are committed at the end of every slot;
// this sleep is to ensure a full slot has elapsed
await sleep((1000 * DEFAULT_TICKS_PER_SLOT) / NUM_TICKS_PER_SECOND);
}
expect(await connection.getBalance(accountTo.publicKey)).toBe(31);
});

Expand Down

0 comments on commit 7d5d2f6

Please sign in to comment.