rusackas commented on code in PR #43502:
URL: https://github.com/apache/superset/pull/43502#discussion_r3856784030


##########
tests/testcontainers/db_engine_specs/test_db2.py:
##########
@@ -0,0 +1,103 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+"""
+Tests db_engine_specs.db2 against a real IBM Db2 instance, spun up on
+demand via testcontainers. Run via .github/workflows/testcontainers.yml.
+
+icr.io/db2_community/db2 only publishes amd64/ppc64le/s390x images (no
+arm64 build), so this cannot run locally on an Apple Silicon machine. It
+runs natively on GitHub Actions' x86_64 runners. Db2 is also a notably slow
+starter (a full instance bring-up, not just a process start) -- expect this
+module alone to take several minutes.
+"""
+
+from collections.abc import Iterator
+
+import pytest
+from sqlalchemy import (
+    Column,
+    create_engine,
+    insert,
+    inspect,
+    Integer,
+    MetaData,
+    select,
+    Table as SATable,
+)
+from sqlalchemy.engine import Engine
+
+from superset.db_engine_specs.db2 import Db2EngineSpec
+from superset.sql.parse import Table
+
+pytest.importorskip("testcontainers.community.db2")
+
+from testcontainers.community.db2 import Db2Container  # noqa: E402
+
+
[email protected](scope="module")
+def engine() -> Iterator[Engine]:
+    with Db2Container() as container:

Review Comment:
   Fixed — extracted the shared pagination-test body into `_pagination.py`, 
with a hook for CrateDB's REFRESH TABLE quirk; each file keeps its own test 
function and docstring.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to