forked from LBRYCommunity/lbry-sdk
change zmq port for tests so it doesnt conflict with running lbrycrd
This commit is contained in:
parent
6e50e83e28
commit
47a8c005d9
2 changed files with 6 additions and 6 deletions
|
@ -90,7 +90,7 @@ class Lbrycrd:
|
||||||
Config.with_same_dir(tempfile.mkdtemp()).set(
|
Config.with_same_dir(tempfile.mkdtemp()).set(
|
||||||
lbrycrd_rpc_port=9245 + 2, # avoid conflict with default rpc port
|
lbrycrd_rpc_port=9245 + 2, # avoid conflict with default rpc port
|
||||||
lbrycrd_peer_port=9246 + 2, # avoid conflict with default peer port
|
lbrycrd_peer_port=9246 + 2, # avoid conflict with default peer port
|
||||||
lbrycrd_zmq_blocks="tcp://127.0.0.1:29000"
|
lbrycrd_zmq_blocks="tcp://127.0.0.1:29002" # avoid conflict with default port
|
||||||
)
|
)
|
||||||
))
|
))
|
||||||
|
|
||||||
|
|
|
@ -309,19 +309,19 @@ class TestLbrycrdAPIs(AsyncioTestCase):
|
||||||
await chain.stop()
|
await chain.stop()
|
||||||
|
|
||||||
# lbrycrdr started with zmq, ensure_subscribable updates lbrycrd_zmq_blocks config
|
# lbrycrdr started with zmq, ensure_subscribable updates lbrycrd_zmq_blocks config
|
||||||
await chain.start('-zmqpubhashblock=tcp://127.0.0.1:29000')
|
await chain.start('-zmqpubhashblock=tcp://127.0.0.1:29005')
|
||||||
self.assertEqual(chain.ledger.conf.lbrycrd_zmq_blocks, '')
|
self.assertEqual(chain.ledger.conf.lbrycrd_zmq_blocks, '')
|
||||||
await chain.ensure_subscribable()
|
await chain.ensure_subscribable()
|
||||||
self.assertEqual(chain.ledger.conf.lbrycrd_zmq_blocks, 'tcp://127.0.0.1:29000')
|
self.assertEqual(chain.ledger.conf.lbrycrd_zmq_blocks, 'tcp://127.0.0.1:29005')
|
||||||
await chain.stop()
|
await chain.stop()
|
||||||
|
|
||||||
# lbrycrdr started with zmq, ensure_subscribable does not override lbrycrd_zmq_blocks config
|
# lbrycrdr started with zmq, ensure_subscribable does not override lbrycrd_zmq_blocks config
|
||||||
chain.ledger.conf.set(lbrycrd_zmq_blocks='')
|
chain.ledger.conf.set(lbrycrd_zmq_blocks='')
|
||||||
await chain.start('-zmqpubhashblock=tcp://127.0.0.1:29000')
|
await chain.start('-zmqpubhashblock=tcp://127.0.0.1:29005')
|
||||||
self.assertEqual(chain.ledger.conf.lbrycrd_zmq_blocks, '')
|
self.assertEqual(chain.ledger.conf.lbrycrd_zmq_blocks, '')
|
||||||
chain.ledger.conf.set(lbrycrd_zmq_blocks='tcp://external-ip:29000')
|
chain.ledger.conf.set(lbrycrd_zmq_blocks='tcp://external-ip:29005')
|
||||||
await chain.ensure_subscribable()
|
await chain.ensure_subscribable()
|
||||||
self.assertEqual(chain.ledger.conf.lbrycrd_zmq_blocks, 'tcp://external-ip:29000')
|
self.assertEqual(chain.ledger.conf.lbrycrd_zmq_blocks, 'tcp://external-ip:29005')
|
||||||
|
|
||||||
async def test_block_event(self):
|
async def test_block_event(self):
|
||||||
chain = Lbrycrd.temp_regtest()
|
chain = Lbrycrd.temp_regtest()
|
||||||
|
|
Loading…
Reference in a new issue