test_vsctl: Wait for loading OVS kernel module
If the OVS kernel module is loaded at first time, it might take a few seconds. This patch add a sleep before sending OVSDB requests. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This commit is contained in:
parent
33ecea2dd6
commit
fbda130ebf
|
@ -16,7 +16,6 @@ sudo: required # Required to enable Docker service
|
|||
|
||||
install:
|
||||
- docker build -t ut_mininet ryu/tests/docker/mininet/
|
||||
- CID=`docker run --privileged -t -d ut_mininet`; docker rm -f $CID # Test container
|
||||
- pip install tox coveralls
|
||||
|
||||
script:
|
||||
|
|
|
@ -21,6 +21,7 @@ import unittest
|
|||
from nose.tools import eq_
|
||||
from nose.tools import ok_
|
||||
|
||||
from ryu.lib.hub import sleep
|
||||
from ryu.lib.ovs import vsctl
|
||||
|
||||
|
||||
|
@ -89,6 +90,11 @@ class TestVSCtl(unittest.TestCase):
|
|||
cls.container_mn = cls._docker_run(DOCKER_IMAGE_MININET)
|
||||
cls.container_mn_ip = cls._docker_inspect_ip_addr(cls.container_mn)
|
||||
|
||||
# Note: Wait for loading the OVS kernel module.
|
||||
# If the OVS kernel module is loaded at first time, it might take
|
||||
# a few seconds.
|
||||
sleep(5)
|
||||
|
||||
cls._docker_exec_mn(
|
||||
'ovs-vsctl set-manager %s' % OVSDB_MANAGER_ADDR)
|
||||
|
||||
|
|
Loading…
Reference in New Issue