Repository navigation
Run disabled-isolation tests in a second app-level phase - #13738
Open
Alexander Holstrup (aholstrup1) wants to merge 6 commits into
Open
Alexander Holstrup (aholstrup1) wants to merge 6 commits into
Alexander Holstrup (aholstrup1) wants to merge 6 commits into
Conversation
Alexander Holstrup (aholstrup1)
temporarily deployed
to
triage
November 5, 2026 19:55 — with
GitHub Actions
Inactive
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Removing the only direct regression test for Get-DisabledTestsForApp leaves exclusion JSON loading and combining uncovered because the routing test mocks the helper.
1 open issue
What changed in this PR
Reworks Business Central CI test execution into two app-level phases: regular tests and all retries first, followed by Disabled-isolation tests using the existing tenant queue. Legacy keeps its single pass.
Changes:
- Removes upfront discovery, per-codeunit dispatch, database resets, and the obsolete clean-execution setting.
- Separates phase retry bookkeeping and result files while sharing the job-wide rerun budget.
- Updates tests for phase ordering, routing, retries, result merging, and completion caching.
| File | Description |
|---|---|
build/scripts/tests/ParallelTestExecution.Test.ps1 |
Replaces clean-tenant tests with app-level phase and result-handling coverage. |
build/scripts/RunTestsInBcContainer.ps1 |
Updates a comment to describe the second app-level phase; no functional change. |
build/scripts/ParallelTestExecution.psm1 |
Implements phased app dispatch and phase-specific results; removes discovery and database-reset helpers. |
.github/AL-Go-Settings.json |
Removes enableCleanTestCodeunitExecution. |
Review effort: Max
Alexander Holstrup (aholstrup1)
marked this pull request as ready for review
November 6, 2026 12:15
Alexander Holstrup (aholstrup1)
temporarily deployed
to
triage
November 6, 2026 12:15 — with
GitHub Actions
Inactive
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The test replacement removes focused regression coverage for merging exclusion JSON files and temporary-directory fallback, so both helper tests need to be restored.
1 open issue
1 resolved since last review
Review effort: Max
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Agent assessment
Self-reported assessment, not an independent review.
Assessed revision:
f4caf28b48e33243c588fbdafd260b97e5675744↑ 218 scheduler, routing, AU-exclusion, churn and tolerance tests pass after merging main; analyzer findings unchanged versus main.
↑ Opus long-context review found no merge-introduced issues; GitHub confirms conflicts cleared.
↓ Fresh CI is running; merged churn integration and AU exclusions have not been validated in BC.
↓ Two AU methods remain intentionally omitted, not fixed.
What & why
Run tests in two passes: Codeunit-isolated tests first, then Disabled-isolation tests after all first-pass work and retries finish. Both passes use the existing app-level parallel queue, and BcContainerHelper selects the matching tests for each app.
This removes the separate discovery loop and database restores between codeunits, bringing execution closer to NAV and reducing overhead. Normal setup/cleanup, exclusions, retries and result merging are preserved. Legacy still runs a single pass.
Temporarily exclude only
TestGetGLEntriesin APIV1 codeunit 139730 and APIV2 codeunit 139830 for AU. The existing JSON exclusion loader now accepts an optionalcountryfield; entries without it retain their global behavior. Other countries and methods remain enabled.Linked work
AB#658158
How I validated this
What I tested and the outcome (required — be specific: scenarios, commands, screenshots for UI changes)
Import-Module Pester -RequiredVersion 5.7.1; Invoke-Pester -Path build\scripts\tests\ParallelTestExecution.Test.ps1 -PassThru— 72 passed, 0 failed. Covers exact methods from the real JSON, AU/au matching, non-AU and missing-country exclusion avoidance, unchanged global entries, and country forwarding in both phases. Analyzer findings unchanged versus the previous head; Opus long-context review found no actionable issues.Import-Module Pester -RequiredVersion 5.7.1; Invoke-Pester -Path build\scripts\tests\ParallelTestExecution.Test.ps1,build\scripts\tests\BuildOptimization.Test.ps1,build\scripts\TestTolerance\TestTolerance.Test.ps1 -PassThru— 218 passed, 0 failed. Main's churn proposal remains logging-only: both phases run the full bucket. Legacy, cache behavior, empty proposals and full-run fallbacks are covered. Opus long-context review found no merge-introduced issues; no additional analyzer findings versus main.git -c core.longpaths=true diff --check origin/main -- .github\AL-Go-Settings.json build\scripts src\DisabledTests— passed before committing the merge.Risk & compatibility
Disabled-isolation tests now share existing tenant data between runs. They must manage their own fixtures rather than rely on a clean database. The two temporary AU method exclusions leave a coverage gap for VAT-fixture compatibility; they do not fix the underlying failures. Earlier same-app invoice posting is a candidate writer, not a proven cause. No database resets or fixture changes are introduced. The obsolete
enableCleanTestCodeunitExecutionsetting is removed. No AL test logic or production app code changes.