From ab92d61fd66bfafe235e9c77156fbe71136b0d20 Mon Sep 17 00:00:00 2001 From: Cortland Goffena <30168413+cmgoffena13@users.noreply.github.com> Date: Fri, 21 Aug 2026 16:47:43 -0600 Subject: [PATCH] fix: removing time machine to fix auth Signed-off-by: Cortland Goffena <30168413+cmgoffena13@users.noreply.github.com> --- .../integration/test_integration_bigquery.py | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/tests/core/engine_adapter/integration/test_integration_bigquery.py b/tests/core/engine_adapter/integration/test_integration_bigquery.py index ce31c255ad..75909948b2 100644 --- a/tests/core/engine_adapter/integration/test_integration_bigquery.py +++ b/tests/core/engine_adapter/integration/test_integration_bigquery.py @@ -2,7 +2,6 @@ from unittest import mock import pytest -import time_machine from pathlib import Path from sqlglot import exp from sqlglot.optimizer.qualify_columns import quote_identifiers @@ -474,7 +473,6 @@ def test_plan_correlation_id_in_job_labels(ctx: TestContext): assert labels == {correlation_id.job_type.value.lower(): correlation_id.job_id} -@time_machine.travel("2023-01-08 15:00:00 UTC") def test_run_correlation_id_in_job_labels(ctx: TestContext): run_id = "test_run_id" model_name = ctx.table("run_test") @@ -497,7 +495,7 @@ def test_run_correlation_id_in_job_labels(ctx: TestContext): ) ) ) - sqlmesh.plan(auto_apply=True, no_prompts=True) + sqlmesh.plan(auto_apply=True, no_prompts=True, execution_time="2023-01-08 15:00:00") captured_evaluators: t.List = [] original_scheduler = sqlmesh.scheduler @@ -510,12 +508,9 @@ def scheduler_wrapper( captured_evaluators.append(snapshot_evaluator) return original_scheduler(environment=environment, snapshot_evaluator=snapshot_evaluator) - with time_machine.travel("2023-01-09 00:00:00 UTC"): - with mock.patch( - "sqlmesh.core.context.analytics.collector.on_run_start", return_value=run_id - ): - with mock.patch.object(sqlmesh, "scheduler", scheduler_wrapper): - sqlmesh.run() + with mock.patch("sqlmesh.core.context.analytics.collector.on_run_start", return_value=run_id): + with mock.patch.object(sqlmesh, "scheduler", scheduler_wrapper): + sqlmesh.run(execution_time="2023-01-09 00:00:00") assert captured_evaluators adapter = t.cast(BigQueryEngineAdapter, captured_evaluators[-1].adapter)