-
Notifications
You must be signed in to change notification settings - Fork 695
test:add ci for cleanup fifos #4443
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
base: main
Are you sure you want to change the base?
Conversation
c4a36e1
to
caea35f
Compare
is it possible to fix on the same PR #4316 ? |
|
34ba006
to
a65114c
Compare
Some suggestions:
|
CI is failing |
47ef295
to
0843678
Compare
done |
oldNumFifos, err := countFIFOFiles("/run/containerd/fifo/") | ||
assert.NilError(t, err) | ||
// Stop the container after 2 seconds | ||
go func() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it possible to avoid goroutine and make sequential check to avoid synchronisation issues and then flaky tests ?
go func() { | ||
time.Sleep(2 * time.Second) | ||
base.Cmd("stop", testContainerName).AssertOK() | ||
newNumFifos, err := countFIFOFiles("/run/containerd/fifo/") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test compares global counts in /run/containerd/fifo/
. If other tests run in parallel and create/cleanup tasks, the global count may fluctuate, making the test flaky:
option: Prefer filtering by container/task ID in the FIFO names, if possible. Otherwise, add a short stabilization poll or mark the test as non-parallel and document the global dependency.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if don't use t.Parallel() the test cases will execute serially. if this testcase is running other test case with t.Parallel() will not run.
Signed-off-by: ningmingxiao <[email protected]>
add some ci for #4316