diff options
author | IWASE Yusuke <iwase.yusuke0@gmail.com> | 2016-11-16 15:03:56 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2016-11-18 15:55:01 +0900 |
commit | fbda130ebf0d6c72d57e44bb4c5eb0a51c98090c (patch) | |
tree | 7b7cd606fd851aa52a852a9f79293a6d09dde0e6 | |
parent | 33ecea2dd658313b5798cdd4c441149891523875 (diff) |
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>
-rw-r--r-- | .travis.yml | 1 | ||||
-rw-r--r-- | ryu/tests/unit/lib/ovs/test_vsctl.py | 6 |
2 files changed, 6 insertions, 1 deletions
diff --git a/.travis.yml b/.travis.yml index 826f3acf..b98a6e25 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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: diff --git a/ryu/tests/unit/lib/ovs/test_vsctl.py b/ryu/tests/unit/lib/ovs/test_vsctl.py index d87a9906..c7fe8355 100644 --- a/ryu/tests/unit/lib/ovs/test_vsctl.py +++ b/ryu/tests/unit/lib/ovs/test_vsctl.py @@ -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) |