Skip to content

Occasional failure of test "Sleep until deadline works" on slow machines #582

@sebsto

Description

@sebsto

We run a continuous CI job across some of our important downstream dependencies.
Recently swift-aws-lambda-runtime has started to hit the occasional failure, which looks like:

> ✘ Test "Sleep until deadline works" recorded an issue at LambdaClockTests.swift:92:9: Expectation failed: (elapsed → 0.102 seconds) <= (.milliseconds(100) → 0.1 seconds)

This failure is obviously because the CI machine is very slow, but also because we run the tests in parallel, which has the effect of messing with timings. Generally, the only thing this test can guarantee is that the job won’t run before its scheduled time: it could very well run substantially after.

Would it be possible to encourage you to modify this test?

here are a few options: you could choose to widen the test interval (even doubling it to 200ms would be sufficient for our current machines), or you could choose to skip it if an environment variable is set. Either way that would let us avoid marking this project as intermittently broken

Metadata

Metadata

Assignees

Labels

area/testingImprovements to tests.kind/bugFeature doesn't work as expected.size/SSmall task. (A couple of hours of work.)🔨 semver/patchNo public API change.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions