Skip to content

Commit 2314091

Browse files
committed
Replace port_to_expose with port as the former one is deprecated
1 parent 27085de commit 2314091

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

sdks/python/apache_beam/io/external/xlang_jdbcio_it_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,13 +143,13 @@ def setUpClass(cls):
143143
'username': 'test',
144144
'password': 'test',
145145
'host': container.get_container_host_ip(),
146-
'port': container.get_exposed_port(container.port_to_expose),
146+
'port': container.get_exposed_port(container.port),
147147
'database_name': 'test',
148148
'driver_class_name': db_data.connector,
149149
'classpath': db_data.classpath,
150150
'jdbc_url': (
151151
f'jdbc:{db_data.db_string}://{container.get_container_host_ip()}:'
152-
f'{container.get_exposed_port(container.port_to_expose)}/test'),
152+
f'{container.get_exposed_port(container.port)}/test'),
153153
'binary_type': POSTGRES_BINARY_TYPE
154154
if db_type == 'postgres' else MYSQL_BINARY_TYPE
155155
}

sdks/python/apache_beam/yaml/integration_tests.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def gcs_temp_dir(bucket):
7878

7979
@contextlib.contextmanager
8080
def temp_spanner_table(project, prefix='temp_spanner_db_'):
81-
"""Context manager to create and clean up a temporary Spanner database and
81+
"""Context manager to create and clean up a temporary Spanner database and
8282
table.
8383
8484
Creates a unique temporary Spanner database within the specified project
@@ -94,7 +94,7 @@ def temp_spanner_table(project, prefix='temp_spanner_db_'):
9494
Yields:
9595
list[str]: A list containing connection details:
9696
[project_id, instance_id, database_id, table_name, list_of_columns].
97-
Example: ['my-project', 'beam-test', 'temp_spanner_db_...', 'tmp_table',
97+
Example: ['my-project', 'beam-test', 'temp_spanner_db_...', 'tmp_table',
9898
['UserId', 'Key']]
9999
"""
100100
spanner_client = SpannerWrapper(project)
@@ -152,7 +152,7 @@ def temp_sqlite_database(prefix='yaml_jdbc_it_'):
152152
This function creates a temporary SQLite database file on the local
153153
filesystem. It establishes a connection using 'sqlite3', creates a predefined
154154
'tmp_table', and then yields a JDBC connection string suitable for use in
155-
tests that require a generic JDBC connection (specifically configured for
155+
tests that require a generic JDBC connection (specifically configured for
156156
SQLite in this case).
157157
158158
The SQLite database file is automatically cleaned up (closed and deleted)
@@ -240,7 +240,7 @@ def temp_mysql_database():
240240
# Construct the JDBC url for connections later on by tests
241241
jdbc_url = (
242242
f"jdbc:mysql://{mysql_container.get_container_host_ip()}:"
243-
f"{mysql_container.get_exposed_port(mysql_container.port_to_expose)}/"
243+
f"{mysql_container.get_exposed_port(mysql_container.port)}/"
244244
f"{mysql_container.MYSQL_DATABASE}?"
245245
f"user={mysql_container.MYSQL_USER}&"
246246
f"password={mysql_container.MYSQL_PASSWORD}")
@@ -362,9 +362,9 @@ def temp_sqlserver_database():
362362
class OracleTestContainer(DockerContainer):
363363
"""
364364
OracleTestContainer is an updated version of OracleDBContainer that goes
365-
ahead and sets the oracle password, waits for logs to establish that the
365+
ahead and sets the oracle password, waits for logs to establish that the
366366
container is ready before calling get_exposed_port, and uses a more modern
367-
oracle driver.
367+
oracle driver.
368368
"""
369369
def __init__(self):
370370
super().__init__("gvenzl/oracle-xe:21-slim")

0 commit comments

Comments
 (0)