:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
chore(ci): speed up ClickHouse and S3 tests (#107764)
Paul D'Ambra1ea925659068
diff --git a/ee/clickhouse/materialized_columns/test/test_columns.py b/ee/clickhouse/materialized_columns/test/test_columns.pyindex cdf45cb6dd07..b2c5d8551b35 100644--- a/ee/clickhouse/materialized_columns/test/test_columns.py+++ b/ee/clickhouse/materialized_columns/test/test_columns.py@@ -84,15 +84,17 @@ class TestMaterializedColumnDetails(TestCase):class TestMaterializedColumns(ClickhouseTestMixin, BaseTest):- def setUp(self):- self.recreate_database()- return super().setUp()+ @classmethod+ def setUpClass(cls) -> None:+ cls.recreate_database()+ super().setUpClass()def tearDown(self):self.recreate_database()super().tearDown()- def recreate_database(self):+ @staticmethod+ def recreate_database() -> None:# Dropping the database removes materialized columns behind the metadata cache's back.for table in MATERIALIZATION_VALID_TABLES:_clear_materialized_columns_cache(table)diff --git a/products/batch_exports/backend/tests/temporal/destinations/s3/test_activity.py b/products/batch_exports/backend/tests/temporal/destinations/s3/test_activity.pyindex 9269f454bf6b..790453d73598 100644--- a/products/batch_exports/backend/tests/temporal/destinations/s3/test_activity.py+++ b/products/batch_exports/backend/tests/temporal/destinations/s3/test_activity.py@@ -331,7 +331,7 @@ async def test_insert_into_s3_activity_with_exclude_events(@pytest.mark.parametrize(("file_format", "compression"), SPLIT_FILE_FORMAT_COMPRESSIONS, indirect=["compression"])@pytest.mark.parametrize("model", [BatchExportModel(name="events", schema=None)])[email protected]("max_file_size_mb", [None, 6])[email protected]("max_file_size_mb", [None, 1])async def test_insert_into_s3_activity_puts_splitted_files_into_s3(clickhouse_client,bucket_name,@@ -348,7 +348,7 @@ async def test_insert_into_s3_activity_puts_splitted_files_into_s3(s3_compatible_integration,):prefix = str(uuid.uuid4())- events_per_batch = 1_000 if max_file_size_mb is None else 100_000+ events_per_batch = 1_000 if max_file_size_mb is None else 40_000events_1, _, _ = await generate_test_events_in_clickhouse(client=clickhouse_client,