Azure / Azure/azure-sdk-tools

`mock-service-host ci` tests on Windows time out after 1h

Open
#5,102 1 comment 0 reactions 1 assignee Assigned to @konrad-jamrozik View on GitHub
Central-EngSys
Dominant language
C#
Stars
135
Forks
260
Avg merge
3d 1h
Merged PRs (30d)
143

Description

Observe that [`tools - mock-service-host - ci` pipeline](https://dev.azure.com/azure-sdk/public/_build?definitionId=3219&_a=summary) run on [current main branch](https://dev.azure.com/azure-sdk/public/_build/results?buildId=2103887&view=results) times out [on `Windows / npm ci`](https://dev.azure.com/azure-sdk/public/_build/results?buildId=2103887&view=logs&j=2b9595b2-5f76-55f0-9a27-2d6edea0e055&t=f40d3241-de1c-530b-e3e0-0d3b7a13fe4e).

Last `Windows / npm test` run that passed was on [June 27, 2022](https://dev.azure.com/azure-sdk/public/_build/results?buildId=1669217&view=logs&j=2b9595b2-5f76-55f0-9a27-2d6edea0e055&t=f40d3241-de1c-530b-e3e0-0d3b7a13fe4e). It took 1m 58s.

The test suites appear to be the same:

The one which passed on June 27, 2022:

``` text
Test Suites: 6 passed, 6 total
Tests: 42 passed, 42 total
Snapshots: 9 passed, 9 total
Time: 98.024 s
Ran all test suites.
Jest did not exit one second after the test run has completed.

This usually means that there are asynchronous operations that weren't stopped in your tests. Consider running Jest with `--detectOpenHandles` to troubleshoot this issue.
Finishing: npm test
```

The new one, which fails to terminate:

``` text
Test Suites: 6 passed, 6 total
Tests: 42 passed, 42 total
Snapshots: 9 passed, 9 total
Time: 91.821 s
Ran all test suites.
Jest did not exit one second after the test run has completed.

This usually means that there are asynchronous operations that weren't stopped in your tests. Consider running Jest with `--detectOpenHandles` to troubleshoot this issue.
```

Note the lack of `Finishing: npm test` at the end.

Perhaps since June 27, 2022, Azure DevOps' handling of unfinished asynchronous operations on Windows has changed, now preventing the task from completing?

Interestingly, even though the same test suite runs [on mac](https://dev.azure.com/azure-sdk/public/_build/results?buildId=2103887&view=logs&j=912e5df2-9632-5896-e358-8493f974c94d&t=d475b89e-905b-5c74-df86-379778adf520) and [on linux](https://dev.azure.com/azure-sdk/public/_build/results?buildId=2103887&view=logs&j=bae442b1-47aa-5566-88e4-c8c2fb884d7b&t=df374f5b-9a54-5638-e768-79af6da838f5), and also has unfinished asynchronous operations, it manages to finish there early. Perhaps this is a red herring and the root cause lies elsewhere.

This issue was discovered while working on:
- #5006

@weshaggard @changlong-liu FYI

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.