Merge pull request #913 from AlinaSecret/dhcp/fix-race-test

Fix race conditions in DHCP test
This commit is contained in:
Casey Callendrello
2023-07-21 12:55:01 +02:00
committed by GitHub
3 changed files with 13 additions and 5 deletions

View File

@@ -332,9 +332,17 @@ var _ = Describe("DHCP Operations", func() {
started.Done()
started.Wait()
err = originalNS.Do(func(ns.NetNS) error {
err := originalNS.Do(func(ns.NetNS) error {
return testutils.CmdDelWithArgs(args, func() error {
return cmdDel(args)
copiedArgs := &skel.CmdArgs{
ContainerID: args.ContainerID,
Netns: args.Netns,
IfName: args.IfName,
StdinData: args.StdinData,
Path: args.Path,
Args: args.Args,
}
return cmdDel(copiedArgs)
})
})
Expect(err).NotTo(HaveOccurred())