Skip to content

Stabilize render diagnostics timing tests on Windows#226

Closed
paganotoni with Copilot wants to merge 4 commits into
mainfrom
copilot/fix-github-actions-job
Closed

Stabilize render diagnostics timing tests on Windows#226
paganotoni with Copilot wants to merge 4 commits into
mainfrom
copilot/fix-github-actions-job

Conversation

Copilot AI commented Jul 23, 2026

Copy link
Copy Markdown

The go1.25/windows-latest Actions job was failing on diagnostics tests that assumed extremely short renders would always produce non-zero durations. On Windows, those paths can legitimately measure as 0s, so the suite was asserting on timer resolution rather than behavior.

  • Root cause

    • Several interpreter and VM diagnostics tests asserted EngineDuration, helper duration, or partial duration were strictly greater than zero.
    • Those assertions were flaky on Windows because the rendered work completed within clock granularity.
  • Test stabilization

    • Updated the affected diagnostics tests in the root package and VM packages to perform a small, deterministic amount of work during render.
    • Added short delays inside test-only helpers and partial feeders so duration assertions continue to validate diagnostics plumbing without depending on sub-millisecond timing.
  • Scope

    • Test-only change.
    • No production render or diagnostics logic changed.
ctx.Set("slow", func() string {
	time.Sleep(20 * time.Millisecond)
	return ""
})

out, err := rootplush.Render(`<%= slow() %><%= name %>`, ctx)
require.NoError(t, err)
require.NotZero(t, diagnostics.EngineDuration)

Copilot AI changed the title [WIP] Fix failing GitHub Actions job go1.25/windows-latest Stabilize render diagnostics timing tests on Windows Jul 23, 2026
Copilot AI requested a review from paganotoni July 23, 2026 12:33
@paganotoni

Copy link
Copy Markdown
Member

@Mido-sys I took copilot for a run on this one and it seems to have fixed the tests. Does this make sense? I did not update your PR because I cannot. Im expecting to close this PR once you confirm it makes sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants