Skip to content

Commit

Permalink
Remove -p from test.sh
Browse files Browse the repository at this point in the history
Running ginkgo tests in parallel causes problems with dhcp_test.go.

BeforeEach() is run once for each spec before any actual dhcp test starts.
This results in setting up two dhcp4servers that run concurrently.
Both try to Listen and use unix socketPath file /run/cni/dhcp.sock at the same time.

AfterEach() for one test runs when test completes, deleting /run/cni/dhcp.sock.
But other test still needs the file resulting in test failing.  Often, the next dhcp
test hasn't started yet.  When test does start it waits 15 seconds for dhcp4server to
create /run/cni/dhcp.sock (which has just been deleted) so test fails.

Other times dhcp tests fail because /run/cni/dhcp.sock is deleted while still being used.
  • Loading branch information
mccv1r0 committed Oct 1, 2018
1 parent 1e4d47f commit 66837d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ source ./build.sh

echo "Running tests"

GINKGO_FLAGS="-p --randomizeAllSpecs --randomizeSuites --failOnPending --progress"
GINKGO_FLAGS="-nodes=1 --randomizeAllSpecs --randomizeSuites --failOnPending --progress"

# user has not provided PKG override
if [ -z "$PKG" ]; then
Expand Down

0 comments on commit 66837d6

Please sign in to comment.