Skip to content

: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.

chore(tests): drop the browser column test_modifier_passthrough materializes (#96763)

Alex Lider4c0e5ec7d007
diff --git a/posthog/hogql_queries/test/test_query_runner.py b/posthog/hogql_queries/test/test_query_runner.py
index f74f6f23f2c8..914af554259b 100644
--- a/posthog/hogql_queries/test/test_query_runner.py
+++ b/posthog/hogql_queries/test/test_query_runner.py
@@ -6,7 +6,7 @@ from zoneinfo import ZoneInfo
import pytest
from freezegun import freeze_time
-from posthog.test.base import APIBaseTest, BaseTest, ClickhouseTestMixin
+from posthog.test.base import APIBaseTest, BaseTest, ClickhouseTestMixin, cleanup_materialized_columns
from unittest import mock
from django.conf import settings
@@ -691,6 +691,9 @@ class TestQueryRunner(BaseTest):
from ee.clickhouse.materialized_columns.analyze import materialize
+ # The column outlives this test otherwise, and every later test on the shard that
+ # filters on $browser then snapshots the materialized form
+ self.addCleanup(cleanup_materialized_columns)
materialize("events", "$browser")
except ModuleNotFoundError:
# EE not available? Assume we're good