Skip to content

Commit a341abb

Browse files
authored
test(location): show the location log when a replan report is wrong (#1570)
The replan-after-sync check failed once in CI with every model reported changed after a rebuild and a requested sync, and the failure carried no log. Include the location log in both report assertions so a recurrence shows which sync the plan followed and what each sync read.
1 parent 222ba1e commit a341abb

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎tests/integration/src/sqlbuild/compiler/compiled_project/publication/test_plan_preview.py‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ def changed_build() -> dict[str, list[str]]:
425425
assert first.index(_SYNCED) < first.index(_PLANNED), (
426426
"a publication plans what changed once its sync completes, not from the old copy"
427427
)
428-
assert changed_build() == test_case.expected_published
428+
assert changed_build() == test_case.expected_published, log.read_text()
429429

430430
_ = wait_for_location_work(api, request_warehouse_sync(control), location, log)
431431
_ = wait_for_log_count(location, log, _SYNCED, 2)
@@ -439,8 +439,9 @@ def changed_build() -> dict[str, list[str]]:
439439
assert rebuilt.returncode == 0, rebuilt.stderr
440440
_ = wait_for_location_work(api, request_warehouse_sync(control), location, log)
441441
_ = wait_for_log_count(location, log, _PLANNED, 2)
442+
# The log shows which sync the second plan followed and what each sync read.
442443
assert changed_build() == test_case.expected_rebuilt, (
443-
"a sync that mirrored the new build plans again"
444+
f"a sync that mirrored the new build plans again\n{log.read_text()}"
444445
)
445446

446447

0 commit comments

Comments
 (0)