tests: fix 'no_pool_connections_available' (fixes #2456)
This commit is contained in:
@@ -92,15 +92,15 @@ def run(
|
|||||||
|
|
||||||
process.stdout.read()
|
process.stdout.read()
|
||||||
|
|
||||||
|
if no_pool_connection_available:
|
||||||
|
sleep_pool_connection(baseurl, 10)
|
||||||
|
|
||||||
yield PostgrestProcess(
|
yield PostgrestProcess(
|
||||||
process=process,
|
process=process,
|
||||||
session=PostgrestSession(baseurl),
|
session=PostgrestSession(baseurl),
|
||||||
admin=PostgrestSession(adminurl),
|
admin=PostgrestSession(adminurl),
|
||||||
)
|
)
|
||||||
finally:
|
finally:
|
||||||
if no_pool_connection_available:
|
|
||||||
sleep_pool_connection(baseurl, 10)
|
|
||||||
|
|
||||||
remaining_output = process.stdout.read()
|
remaining_output = process.stdout.read()
|
||||||
if remaining_output:
|
if remaining_output:
|
||||||
print(remaining_output.decode())
|
print(remaining_output.decode())
|
||||||
|
|||||||
@@ -28,7 +28,6 @@ def test_plain_get(defaultenv):
|
|||||||
assert response.status_code == 200
|
assert response.status_code == 200
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.xfail(reason="option is broken, issue #2456")
|
|
||||||
def test_no_pool_connection_available(defaultenv):
|
def test_no_pool_connection_available(defaultenv):
|
||||||
"no_pool_connection_available option is functional"
|
"no_pool_connection_available option is functional"
|
||||||
with run(env=defaultenv, no_pool_connection_available=True) as postgrest:
|
with run(env=defaultenv, no_pool_connection_available=True) as postgrest:
|
||||||
|
|||||||
Reference in New Issue
Block a user