improve integration test reliability

This commit is contained in:
Lex Berezhny 2018-10-16 21:28:47 -04:00
parent e02e2a249a
commit 8b3a457925
3 changed files with 8 additions and 7 deletions

View file

@ -40,8 +40,9 @@ class CLIIntegrationTest(unittest.TestCase):
RATE_LIMITER_COMPONENT, PAYMENT_RATE_COMPONENT
]
conf.initialize_settings(load_conf_file=False)
conf.settings['api_port'] = 5299
conf.settings['use_auth_http'] = self.USE_AUTH
conf.settings["components_to_skip"] = skip
conf.settings['components_to_skip'] = skip
conf.settings.initialize_post_conf_load()
Daemon.component_attributes = {}
self.daemon = Daemon(analytics_manager=FakeAnalytics())

View file

@ -51,7 +51,7 @@ class BasicTransactionTest(IntegrationTestCase):
await self.blockchain.generate(1)
await asyncio.wait([
self.on_transaction_id(sendtxid1),
self.on_transaction_id(sendtxid2),
self.on_transaction_id(sendtxid2)
])
self.assertEqual(d2l(await self.account.get_balance()), '10.0')
@ -66,15 +66,15 @@ class BasicTransactionTest(IntegrationTestCase):
await self.broadcast(claim_tx)
await asyncio.wait([ # mempool
self.on_transaction(claim_tx),
self.on_transaction(cert_tx),
self.on_transaction(cert_tx)
])
await self.blockchain.generate(1)
await asyncio.wait([ # confirmed
self.on_transaction(claim_tx),
self.on_transaction(cert_tx),
self.on_transaction(cert_tx)
])
self.assertEqual(d2l(await self.account.get_balance(confirmations=1)), '7.985786')
self.assertEqual(d2l(await self.account.get_balance()), '7.985786')
self.assertEqual(d2l(await self.account.get_balance(include_claims=True)), '9.985786')
response = await self.ledger.resolve(0, 10, 'lbry://@bar/foo')

View file

@ -16,7 +16,7 @@ setenv =
LEDGER=lbrynet.wallet
commands =
orchstr8 download
coverage run -p --source={envsitepackagesdir}/lbrynet -m unittest integration.wallet.test_transactions.BasicTransactionTest
coverage run -p --source={envsitepackagesdir}/lbrynet -m twisted.trial --reactor=asyncio integration.cli
coverage run -p --source={envsitepackagesdir}/lbrynet -m twisted.trial --reactor=asyncio integration.wallet.test_transactions.BasicTransactionTest
coverage run -p --source={envsitepackagesdir}/lbrynet -m twisted.trial --reactor=asyncio integration.wallet.test_commands.EpicAdventuresOfChris45
coverage run -p --source={envsitepackagesdir}/lbrynet -m twisted.trial --reactor=asyncio integration.wallet.test_commands.AccountManagement
coverage run -p --source={envsitepackagesdir}/lbrynet -m twisted.trial --reactor=asyncio integration.wallet.test_commands.EpicAdventuresOfChris45