Skip to content

Commit

Permalink
daemon.at: Fix a race condition with windows service test.
Browse files Browse the repository at this point in the history
OVS daemon service for Windows creates the pidfile and then
registers with the Windows services manager that the service
is running. There is a small time gap between the two steps.
So retry a few times in the test.

Also, provide a keyword for the test.

Reported-by: Nithin Raju <[email protected]>
Signed-off-by: Gurucharan Shetty <[email protected]>
Acked-by: Nithin Raju <[email protected]>
Tested-by: Nithin Raju <[email protected]>
  • Loading branch information
shettyg committed Feb 12, 2015
1 parent 653ce9d commit 0508273
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/daemon.at
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ AT_CHECK([test ! -s pid])
AT_CLEANUP

AT_SETUP([daemon --service])
AT_KEYWORDS([windows-service])
AT_SKIP_IF([test "$IS_WIN32" != "yes"])
OVSDB_INIT([db])
AT_CAPTURE_FILE([pid])
Expand All @@ -173,7 +174,7 @@ AT_CHECK([sc create ovsdb-server binpath="$abs_path/ovsdb-server `pwd`/db --log-

AT_CHECK([sc start ovsdb-server], [0], [ignore])
OVS_WAIT_UNTIL([test -s pid])
AT_CHECK([sc query ovsdb-server | grep STATE | grep RUNNING], [0], [ignore])
OVS_WAIT_UNTIL([sc query ovsdb-server | grep STATE | grep RUNNING > /dev/null 2>&1])
AT_CHECK([kill -0 `cat pid`], [0], [ignore])
AT_CHECK([ovs-appctl -t `pwd`/unixctl ovsdb-server/list-dbs], [0],
[Open_vSwitch
Expand Down

0 comments on commit 0508273

Please sign in to comment.