mirror of
https://github.com/bigchaindb/bigchaindb.git
synced 2024-06-30 05:32:01 +02:00
Pass host and port to rethinkdb connection
This is needed when running the tests in containers for instance
This commit is contained in:
parent
2e398f606f
commit
7e0e46e820
|
@ -46,7 +46,7 @@ def test_raise_exception_when_max_tries():
|
||||||
conn.run(MockQuery())
|
conn.run(MockQuery())
|
||||||
|
|
||||||
|
|
||||||
def test_reconnect_when_connection_lost():
|
def test_reconnect_when_connection_lost(db_host, db_port):
|
||||||
from bigchaindb.backend import connect
|
from bigchaindb.backend import connect
|
||||||
|
|
||||||
original_connect = r.connect
|
original_connect = r.connect
|
||||||
|
@ -54,7 +54,7 @@ def test_reconnect_when_connection_lost():
|
||||||
with patch('rethinkdb.connect') as mock_connect:
|
with patch('rethinkdb.connect') as mock_connect:
|
||||||
mock_connect.side_effect = [
|
mock_connect.side_effect = [
|
||||||
r.ReqlDriverError('mock'),
|
r.ReqlDriverError('mock'),
|
||||||
original_connect()
|
original_connect(host=db_host, port=db_port)
|
||||||
]
|
]
|
||||||
|
|
||||||
conn = connect()
|
conn = connect()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user