Skip to content

Commit ab92d61

Browse files
committed
fix: removing time machine to fix auth
Signed-off-by: Cortland Goffena <30168413+cmgoffena13@users.noreply.github.com>
1 parent 24bb095 commit ab92d61

1 file changed

Lines changed: 4 additions & 9 deletions

File tree

tests/core/engine_adapter/integration/test_integration_bigquery.py

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
from unittest import mock
33

44
import pytest
5-
import time_machine
65
from pathlib import Path
76
from sqlglot import exp
87
from sqlglot.optimizer.qualify_columns import quote_identifiers
@@ -474,7 +473,6 @@ def test_plan_correlation_id_in_job_labels(ctx: TestContext):
474473
assert labels == {correlation_id.job_type.value.lower(): correlation_id.job_id}
475474

476475

477-
@time_machine.travel("2023-01-08 15:00:00 UTC")
478476
def test_run_correlation_id_in_job_labels(ctx: TestContext):
479477
run_id = "test_run_id"
480478
model_name = ctx.table("run_test")
@@ -497,7 +495,7 @@ def test_run_correlation_id_in_job_labels(ctx: TestContext):
497495
)
498496
)
499497
)
500-
sqlmesh.plan(auto_apply=True, no_prompts=True)
498+
sqlmesh.plan(auto_apply=True, no_prompts=True, execution_time="2023-01-08 15:00:00")
501499

502500
captured_evaluators: t.List = []
503501
original_scheduler = sqlmesh.scheduler
@@ -510,12 +508,9 @@ def scheduler_wrapper(
510508
captured_evaluators.append(snapshot_evaluator)
511509
return original_scheduler(environment=environment, snapshot_evaluator=snapshot_evaluator)
512510

513-
with time_machine.travel("2023-01-09 00:00:00 UTC"):
514-
with mock.patch(
515-
"sqlmesh.core.context.analytics.collector.on_run_start", return_value=run_id
516-
):
517-
with mock.patch.object(sqlmesh, "scheduler", scheduler_wrapper):
518-
sqlmesh.run()
511+
with mock.patch("sqlmesh.core.context.analytics.collector.on_run_start", return_value=run_id):
512+
with mock.patch.object(sqlmesh, "scheduler", scheduler_wrapper):
513+
sqlmesh.run(execution_time="2023-01-09 00:00:00")
519514

520515
assert captured_evaluators
521516
adapter = t.cast(BigQueryEngineAdapter, captured_evaluators[-1].adapter)

0 commit comments

Comments
 (0)