From d809283d23fbf62277166134204752ce067f4d69 Mon Sep 17 00:00:00 2001 From: Lex Berezhny Date: Tue, 31 Dec 2019 17:47:24 -0500 Subject: [PATCH] fix integrartion test --- lbry/lbry/wallet/orchstr8/node.py | 7 +++++-- lbry/tests/integration/test_transactions.py | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lbry/lbry/wallet/orchstr8/node.py b/lbry/lbry/wallet/orchstr8/node.py index cafe538d3..b496ba9db 100644 --- a/lbry/lbry/wallet/orchstr8/node.py +++ b/lbry/lbry/wallet/orchstr8/node.py @@ -358,8 +358,11 @@ class BlockchainNode: *cmnd_args, stdout=subprocess.PIPE, stderr=subprocess.STDOUT ) out, _ = await process.communicate() - self.log.info(out.decode().strip()) - return out.decode().strip() + result = out.decode().strip() + self.log.info(result) + if result.startswith('error code'): + raise Exception(result) + return result def generate(self, blocks): self.block_expected += blocks diff --git a/lbry/tests/integration/test_transactions.py b/lbry/tests/integration/test_transactions.py index 0fd7a6db0..2eac1e7f4 100644 --- a/lbry/tests/integration/test_transactions.py +++ b/lbry/tests/integration/test_transactions.py @@ -131,6 +131,7 @@ class BasicTransactionTests(IntegrationTestCase): self.assertTrue(tx.outputs[1].is_change) async def test_history_edge_cases(self): + await self.blockchain.generate(300) await self.assertBalance(self.account, '0.0') address = await self.account.receiving.get_or_create_usable_address() # evil trick: mempool is unsorted on real life, but same order between python instances. reproduce it