-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Give assert.CollectT a Logf Method to allow use as mock.TestingT #1414
Labels
Comments
I think that the collection process must be seriously rewritten because of #1418. |
dolmen
added
pkg-mock
Any issues related to Mock
pkg-assert
Change related to package testify/assert
enhancement
labels
Jul 11, 2023
I would like to get rid of |
The issue is more generally about |
andrzej-stencel
added a commit
to andrzej-stencel/elastic-agent
that referenced
this issue
Sep 3, 2024
The flakiness is a result of a 100 miliseconds not always being enough time to dispatch the action in the test environment. The correct way to fix this issue is to run the assertions in an `assert.Eventually` with a longer timeout. Unfortunately, a deficiency in the `testify` testing framework makes it impossible to put the `AssertExpectations` methods in an `assert.Eventually` or `assert.EventuallyWithT` function: stretchr/testify#1414. The workaround is to increase the context timeout for the `gateway actions passed` test case. I'm increasing it from 100ms to 200ms.
2 tasks
andrzej-stencel
added a commit
to elastic/elastic-agent
that referenced
this issue
Sep 5, 2024
* refctor: make context timeout adjustable per test case A short context timeout makes some tests flaky, but making it longer across the board would unnecessarily make test runs longer. Let's make it customizable per test case. * Fix flaky test `Test_runDispatcher/gateway_actions_passed` The flakiness is a result of a 100 miliseconds not always being enough time to dispatch the action in the test environment. The correct way to fix this issue is to run the assertions in an `assert.Eventually` with a longer timeout. Unfortunately, a deficiency in the `testify` testing framework makes it impossible to put the `AssertExpectations` methods in an `assert.Eventually` or `assert.EventuallyWithT` function: stretchr/testify#1414. The workaround is to increase the context timeout for the `gateway actions passed` test case. I'm increasing it from 100ms to 200ms.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
From #1030: It would be nice if
assert.CollectT
implimentedmock.TestingT
so that this can work:The text was updated successfully, but these errors were encountered: