test:add ci for cleanup fifos#4443
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.
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.
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.
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 <ning.mingxiao@zte.com.cn>
add some ci for #4316