Skip to content

Delay windows tests to make them less flaky - #1103

Open
kgaughan wants to merge 4 commits into
goss-org:masterfrom
kgaughan:delay-windows-test
Open

Delay windows tests to make them less flaky#1103
kgaughan wants to merge 4 commits into
goss-org:masterfrom
kgaughan:delay-windows-test

Conversation

@kgaughan

@kgaughan kgaughan commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator
Checklist
  • make test-all (UNIX) passes. CI will also test this
  • unit and/or integration tests are included (if applicable)
  • documentation is changed or added (if applicable)

Description of change

PR #1017 introduced support for service checks on Windows, but doing so had the unfortunate side effect that MSDTC (the service used in the test) is not guaranteed to be started soon enough after the job step for running the integration tests is able to run to guarantee that it'll work. Delaying for 2s should make this more reliable.

It looks like there's a way do this reliably by waiting on a service to start, but I don't have an easy way to test it: https://powershellmagazine.com/2013/04/10/pstip-wait-for-a-service-to-reach-a-specified-status/ - it'd be worth following up on this in future. I gave the more correct method a go, and it seems to have worked!

PR goss-org#1017 introduced support for service checks on Windows, but doing so
had the unfortunate side effect that MSDTC (the service used in the
test) is not guaranteed to be started soon enough after the job step for
running the integration tests is able to run to guarantee that it'll
work. Delaying for 2s should make this more reliable.
@kgaughan
kgaughan requested a review from aelsabbahy as a code owner August 9, 2026 11:03
@kgaughan kgaughan mentioned this pull request Aug 9, 2026
@kgaughan

kgaughan commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator Author

@cthiel42 It turns out that the addition of the Windows service check support has made the integration tests a bit flaky. Are you aware of any other services besides MSDTC that might start a little faster and more reliably?

@cthiel42

cthiel42 commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

@kgaughan The eventlog service is usually one of the first started

@kgaughan

kgaughan commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator Author

Thanks! I'll give that a try when I'm back at my laptop.

@kgaughan

kgaughan commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator Author

It looks like that did the trick.

kgaughan added a commit to kgaughan/goss that referenced this pull request Aug 9, 2026
kgaughan added a commit to kgaughan/goss that referenced this pull request Aug 15, 2026
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.

2 participants