forked from LBRYCommunity/lbry-sdk
increase timeout for wallet server payment service
This commit is contained in:
parent
e2ffd24d51
commit
ba154c799e
1 changed files with 3 additions and 2 deletions
|
@ -67,13 +67,14 @@ class TestUsagePayment(CommandTestCase):
|
||||||
await node.start(self.blockchain, extraconf={"PAYMENT_ADDRESS": address, "DAILY_FEE": "1.1"})
|
await node.start(self.blockchain, extraconf={"PAYMENT_ADDRESS": address, "DAILY_FEE": "1.1"})
|
||||||
self.addCleanup(node.stop)
|
self.addCleanup(node.stop)
|
||||||
self.daemon.jsonrpc_settings_set('lbryum_servers', [f"{node.hostname}:{node.port}"])
|
self.daemon.jsonrpc_settings_set('lbryum_servers', [f"{node.hostname}:{node.port}"])
|
||||||
|
next_payment = wallet_pay_service.on_payment.first
|
||||||
await self.daemon.jsonrpc_wallet_reconnect()
|
await self.daemon.jsonrpc_wallet_reconnect()
|
||||||
|
|
||||||
features = await self.ledger.network.get_server_features()
|
features = await self.ledger.network.get_server_features()
|
||||||
self.assertEqual(features["payment_address"], address)
|
self.assertEqual(features["payment_address"], address)
|
||||||
self.assertEqual(features["daily_fee"], "1.1")
|
self.assertEqual(features["daily_fee"], "1.1")
|
||||||
with self.assertRaises(ServerPaymentFeeAboveMaxAllowedError):
|
with self.assertRaises(ServerPaymentFeeAboveMaxAllowedError):
|
||||||
await asyncio.wait_for(wallet_pay_service.on_payment.first, timeout=8)
|
await asyncio.wait_for(next_payment, timeout=16)
|
||||||
|
|
||||||
await node.stop(False)
|
await node.stop(False)
|
||||||
await node.start(self.blockchain, extraconf={"PAYMENT_ADDRESS": address, "DAILY_FEE": "1.0"})
|
await node.start(self.blockchain, extraconf={"PAYMENT_ADDRESS": address, "DAILY_FEE": "1.0"})
|
||||||
|
@ -83,7 +84,7 @@ class TestUsagePayment(CommandTestCase):
|
||||||
features = await self.ledger.network.get_server_features()
|
features = await self.ledger.network.get_server_features()
|
||||||
self.assertEqual(features["payment_address"], address)
|
self.assertEqual(features["payment_address"], address)
|
||||||
self.assertEqual(features["daily_fee"], "1.0")
|
self.assertEqual(features["daily_fee"], "1.0")
|
||||||
tx = await asyncio.wait_for(next_payment, timeout=8)
|
tx = await asyncio.wait_for(next_payment, timeout=16)
|
||||||
self.assertIsNotNone(await self.blockchain.get_raw_transaction(tx.id)) # verify its broadcasted
|
self.assertIsNotNone(await self.blockchain.get_raw_transaction(tx.id)) # verify its broadcasted
|
||||||
self.assertEqual(tx.outputs[0].amount, 100000000)
|
self.assertEqual(tx.outputs[0].amount, 100000000)
|
||||||
self.assertEqual(tx.outputs[0].get_address(self.ledger), address)
|
self.assertEqual(tx.outputs[0].get_address(self.ledger), address)
|
||||||
|
|
Loading…
Reference in a new issue