-
Notifications
You must be signed in to change notification settings - Fork 653
[CI]: events filter sometimes does not work #4132
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
Comments
Maybe I am missing something, but it seems we can check the expected output only in synchronous mode. Another point: it looks like when running in background mode, we don't stop but continue to |
@fahedouch Anyhow, this seems to work as expected: func TestCommand(t *testing.T) {
t.Parallel()
com := NewGenericCommand()
com.(*GenericCommand).withT(t)
com.WithBinary("bash")
com.WithArgs("-c", "--", "echo foo; sleep inf;")
com.WithTimeout(5 * time.Second)
com.Background()
// ... do whatever while com is running in the background
// Now foreground cmd, wait for it (it will timeout in that case), and test the output
com.Run(&Expected{
ExitCode: -12,
Errors: nil,
Output: func(stdout, info string, t *testing.T) {
assert.Equal(t, "foo\n", stdout)
},
})
} Does that clarify? |
To your point: the API and method names probably need to be rethought. In the context above I have a pile of things I want to change that is impacting the API - given this will require large changes in nerdctl tests, I want to batch them all together to minimize disruption. |
https://github.com/containerd/nerdctl/pull/4196/files -> does the pre pull fix in the pr fixes this one, from what i saw it was due to timeout of the run commands as a result the event filters never got the events. |
Thanks @Shubhranshu153 . Closing then. |
Uh oh!
There was an error while loading. Please reload this page.
Description
Here is an example from the CI where event filter does not produce on stdout the expected output.
(ignore the timeout aspect, which is by design)
It is unclear if this is a test issue, or a code issue related to events.
I have seen this before,
but it is awfully rareit happens regularly on EL, so, this is likely going to bevery harda bit of a trek to debug.Steps to reproduce the issue
Describe the results you received and expected
What version of nerdctl are you using?
main
Are you using a variant of nerdctl? (e.g., Rancher Desktop)
None
Host information
No response
The text was updated successfully, but these errors were encountered: