Skip to content

serverless-init-1.11.4

@litianningdatadog litianningdatadog tagged this 04 Nov 18:53
### What does this PR do?

Keep the subprocess alive until the test observes it, then release it and verify that `Run` returns with the child marked dead. Cleanup also releases and joins the subprocess if an assertion fails.

### Motivation

[SVLS-9995](https://datadoghq.atlassian.net/browse/SVLS-9995): the previous test sampled liveness after 100 ms while the subprocess slept for 300 ms, allowing scheduling delays to cause false failures in [the macOS CI job](https://gitlab.ddbuild.io/DataDog/datadog-agent/-/jobs/2193640194).

### Describe how you validated your changes

Ran all 24 tests in `microvm_test.go` through Bazel with the race detector and 20 repetitions each: 480 passes, no skips or data races.


[SVLS-9995]: https://datadoghq.atlassian.net/browse/SVLS-9995?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

Co-authored-by: tianning.li <tianning.li@datadoghq.com>
Assets 2
Loading