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:
IWASE Yusuke 2016-11-16 15:03:56 +09:00 committed by FUJITA Tomonori
parent 33ecea2dd6
commit fbda130ebf
2 changed files with 6 additions and 1 deletions

View File

@ -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:

View File

@ -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)