@@ -78,7 +78,7 @@ def gcs_temp_dir(bucket):
7878
7979@contextlib .contextmanager
8080def 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)
@@ -228,7 +228,7 @@ def temp_mysql_database():
228228 with the MySQL database during setup.
229229 Exception: Any other exception encountered during the setup process.
230230 """
231- with MySqlContainer (init = True ) as mysql_container :
231+ with MySqlContainer (init = True , dialect = 'pymysql' ) as mysql_container :
232232 try :
233233 # Make connection to temp database and create tmp table
234234 engine = sqlalchemy .create_engine (mysql_container .get_connection_url ())
@@ -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():
362362class 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