stretchr / testify

A toolkit with common assertions and mocks that plays nicely with the standard library
MIT License
23.53k stars 1.6k forks source link

Flaking test: Test_Mock_Called_blocks #1666

Closed brackendawson closed 3 weeks ago

brackendawson commented 3 weeks ago

Description

Test_Mock_Called_blocks flaked in CI.

Step To Reproduce

Run CI in GitHub Actions.

Expected behavior

Pass

Actual behavior

Test_Mock_Called_blocks failed: https://github.com/stretchr/testify/actions/runs/11534081249/job/32107710770

brackendawson commented 3 weeks ago

I think this is because in the low powered CI environment, 1 and 2 milliseconds is not enough. I suggest increasing this and other instances in the same file to 10 and 20ms respectively.

sikehish commented 3 weeks ago

I'll take a look. I believe I need to make changes in mock/mock_test.go. Is that right?