Skip to content

Commit 0cf30a7

Browse files
authored
Fix port bind (#117)
* Fix port bind * Up testgres version - 1.10.1
1 parent eb04762 commit 0cf30a7

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
readme = f.read()
2828

2929
setup(
30-
version='1.10.0',
30+
version='1.10.1',
3131
name='testgres',
3232
packages=['testgres', 'testgres.operations', 'testgres.helpers'],
3333
description='Testing utility for PostgreSQL and its extensions',

testgres/operations/remote_ops.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
import tempfile
55
import platform
66

7+
from ..utils import reserve_port
8+
79
# we support both pg8000 and psycopg2
810
try:
911
import psycopg2 as pglib
@@ -392,7 +394,7 @@ def db_connect(self, dbname, user, password=None, host="localhost", port=5432):
392394
"""
393395
Established SSH tunnel and Connects to a PostgreSQL
394396
"""
395-
self.establish_ssh_tunnel(local_port=port, remote_port=5432)
397+
self.establish_ssh_tunnel(local_port=reserve_port(), remote_port=5432)
396398
try:
397399
conn = pglib.connect(
398400
host=host,

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy