Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"comment": "Modify this file in a trivial way to cause this test suite to run",
"modification": 11
"modification": 12
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont think this test suite is necessary, it runs on dataflow.

}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"comment": "Modify this file in a trivial way to cause this test suite to run",
"modification": 7
"modification": 8
}
7 changes: 4 additions & 3 deletions sdks/python/apache_beam/io/external/xlang_jdbcio_it_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@ class CrossLanguageJdbcIOTest(unittest.TestCase):
'postgresql',
'org.postgresql.Driver'),
'mysql': DbData(
lambda: MySqlContainer(), ['mysql:mysql-connector-java:8.0.28'],
lambda: MySqlContainer(dialect='pymysql'),
['mysql:mysql-connector-java:8.0.28'],
'mysql',
'com.mysql.cj.jdbc.Driver')
}
Expand All @@ -143,13 +144,13 @@ def setUpClass(cls):
'username': 'test',
'password': 'test',
'host': container.get_container_host_ip(),
'port': container.get_exposed_port(container.port_to_expose),
'port': container.get_exposed_port(container.port),
'database_name': 'test',
'driver_class_name': db_data.connector,
'classpath': db_data.classpath,
'jdbc_url': (
f'jdbc:{db_data.db_string}://{container.get_container_host_ip()}:'
f'{container.get_exposed_port(container.port_to_expose)}/test'),
f'{container.get_exposed_port(container.port)}/test'),
'binary_type': POSTGRES_BINARY_TYPE
if db_type == 'postgres' else MYSQL_BINARY_TYPE
}
Expand Down
14 changes: 7 additions & 7 deletions sdks/python/apache_beam/yaml/integration_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def gcs_temp_dir(bucket):

@contextlib.contextmanager
def temp_spanner_table(project, prefix='temp_spanner_db_'):
"""Context manager to create and clean up a temporary Spanner database and
"""Context manager to create and clean up a temporary Spanner database and
table.

Creates a unique temporary Spanner database within the specified project
Expand All @@ -94,7 +94,7 @@ def temp_spanner_table(project, prefix='temp_spanner_db_'):
Yields:
list[str]: A list containing connection details:
[project_id, instance_id, database_id, table_name, list_of_columns].
Example: ['my-project', 'beam-test', 'temp_spanner_db_...', 'tmp_table',
Example: ['my-project', 'beam-test', 'temp_spanner_db_...', 'tmp_table',
['UserId', 'Key']]
"""
spanner_client = SpannerWrapper(project)
Expand Down Expand Up @@ -152,7 +152,7 @@ def temp_sqlite_database(prefix='yaml_jdbc_it_'):
This function creates a temporary SQLite database file on the local
filesystem. It establishes a connection using 'sqlite3', creates a predefined
'tmp_table', and then yields a JDBC connection string suitable for use in
tests that require a generic JDBC connection (specifically configured for
tests that require a generic JDBC connection (specifically configured for
SQLite in this case).

The SQLite database file is automatically cleaned up (closed and deleted)
Expand Down Expand Up @@ -228,7 +228,7 @@ def temp_mysql_database():
with the MySQL database during setup.
Exception: Any other exception encountered during the setup process.
"""
with MySqlContainer(init=True) as mysql_container:
with MySqlContainer(init=True, dialect='pymysql') as mysql_container:
try:
# Make connection to temp database and create tmp table
engine = sqlalchemy.create_engine(mysql_container.get_connection_url())
Expand All @@ -240,7 +240,7 @@ def temp_mysql_database():
# Construct the JDBC url for connections later on by tests
jdbc_url = (
f"jdbc:mysql://{mysql_container.get_container_host_ip()}:"
f"{mysql_container.get_exposed_port(mysql_container.port_to_expose)}/"
f"{mysql_container.get_exposed_port(mysql_container.port)}/"
f"{mysql_container.MYSQL_DATABASE}?"
f"user={mysql_container.MYSQL_USER}&"
f"password={mysql_container.MYSQL_PASSWORD}")
Expand Down Expand Up @@ -362,9 +362,9 @@ def temp_sqlserver_database():
class OracleTestContainer(DockerContainer):
"""
OracleTestContainer is an updated version of OracleDBContainer that goes
ahead and sets the oracle password, waits for logs to establish that the
ahead and sets the oracle password, waits for logs to establish that the
container is ready before calling get_exposed_port, and uses a more modern
oracle driver.
oracle driver.
"""
def __init__(self):
super().__init__("gvenzl/oracle-xe:21-slim")
Expand Down
Loading