From 7381fc86f9e2d1aa1f0b2a874615cbe163bc9b43 Mon Sep 17 00:00:00 2001 From: huawei Date: Tue, 4 Aug 2020 09:36:04 +0800 Subject: [PATCH] [Test] Update test wait time (#57) --- tests/plugin/sw_django/test_django.py | 2 +- tests/plugin/sw_flask/test_flask.py | 2 +- tests/plugin/sw_http/test_http.py | 2 +- tests/plugin/sw_http_wsgi/test_http_wsgi.py | 2 +- tests/plugin/sw_kafka/test_kafka.py | 2 +- tests/plugin/sw_pymysql/test_pymysql.py | 2 +- tests/plugin/sw_rabbitmq/test_kafka.py | 2 +- tests/plugin/sw_redis/docker-compose.yml | 1 + tests/plugin/sw_redis/test_redis.py | 2 +- tests/plugin/sw_requests/docker-compose.yml | 1 + tests/plugin/sw_requests/test_request.py | 2 +- tests/plugin/sw_tornado/test_tornado.py | 2 +- 12 files changed, 12 insertions(+), 10 deletions(-) diff --git a/tests/plugin/sw_django/test_django.py b/tests/plugin/sw_django/test_django.py index 79827f5..b2315d8 100644 --- a/tests/plugin/sw_django/test_django.py +++ b/tests/plugin/sw_django/test_django.py @@ -33,7 +33,7 @@ class TestPlugin(BasePluginTest): cls.compose.wait_for(cls.url(('consumer', '9090'), 'users?test=test1&test=test2&test2=test2')) def test_plugin(self): - time.sleep(3) + time.sleep(10) self.validate() diff --git a/tests/plugin/sw_flask/test_flask.py b/tests/plugin/sw_flask/test_flask.py index 1ff07d5..4efe2e5 100644 --- a/tests/plugin/sw_flask/test_flask.py +++ b/tests/plugin/sw_flask/test_flask.py @@ -33,7 +33,7 @@ class TestPlugin(BasePluginTest): cls.compose.wait_for(cls.url(('consumer', '9090'), 'users?test=test1&test=test2&test2=test2')) def test_plugin(self): - time.sleep(3) + time.sleep(10) self.validate() response = requests.get(TestPlugin.url(('consumer', '9090'), 'users')) diff --git a/tests/plugin/sw_http/test_http.py b/tests/plugin/sw_http/test_http.py index 05b42d2..8aa24b4 100644 --- a/tests/plugin/sw_http/test_http.py +++ b/tests/plugin/sw_http/test_http.py @@ -28,7 +28,7 @@ class TestPlugin(BasePluginTest): def test_plugin(self): print('traffic: ', requests.post(url=self.url(('consumer', '9090')))) - time.sleep(3) + time.sleep(10) self.validate() diff --git a/tests/plugin/sw_http_wsgi/test_http_wsgi.py b/tests/plugin/sw_http_wsgi/test_http_wsgi.py index 05b42d2..8aa24b4 100644 --- a/tests/plugin/sw_http_wsgi/test_http_wsgi.py +++ b/tests/plugin/sw_http_wsgi/test_http_wsgi.py @@ -28,7 +28,7 @@ class TestPlugin(BasePluginTest): def test_plugin(self): print('traffic: ', requests.post(url=self.url(('consumer', '9090')))) - time.sleep(3) + time.sleep(10) self.validate() diff --git a/tests/plugin/sw_kafka/test_kafka.py b/tests/plugin/sw_kafka/test_kafka.py index f24add7..62dfcb2 100644 --- a/tests/plugin/sw_kafka/test_kafka.py +++ b/tests/plugin/sw_kafka/test_kafka.py @@ -34,7 +34,7 @@ class TestPlugin(BasePluginTest): cls.compose.wait_for(cls.url(('producer', '9090'), 'users')) def test_request_plugin(self): - time.sleep(3) + time.sleep(10) self.validate(expected_file_name=os.path.join(dirname(abspath(__file__)), 'expected.data.yml')) diff --git a/tests/plugin/sw_pymysql/test_pymysql.py b/tests/plugin/sw_pymysql/test_pymysql.py index dfeaaa6..9d7c0dd 100644 --- a/tests/plugin/sw_pymysql/test_pymysql.py +++ b/tests/plugin/sw_pymysql/test_pymysql.py @@ -34,7 +34,7 @@ class TestPlugin(BasePluginTest): cls.compose.wait_for(cls.url(('consumer', '9090'), 'users')) def test_request_plugin(self): - time.sleep(3) + time.sleep(10) self.validate(expected_file_name=os.path.join(dirname(abspath(__file__)), 'expected.data.yml')) diff --git a/tests/plugin/sw_rabbitmq/test_kafka.py b/tests/plugin/sw_rabbitmq/test_kafka.py index f24add7..62dfcb2 100644 --- a/tests/plugin/sw_rabbitmq/test_kafka.py +++ b/tests/plugin/sw_rabbitmq/test_kafka.py @@ -34,7 +34,7 @@ class TestPlugin(BasePluginTest): cls.compose.wait_for(cls.url(('producer', '9090'), 'users')) def test_request_plugin(self): - time.sleep(3) + time.sleep(10) self.validate(expected_file_name=os.path.join(dirname(abspath(__file__)), 'expected.data.yml')) diff --git a/tests/plugin/sw_redis/docker-compose.yml b/tests/plugin/sw_redis/docker-compose.yml index ba9fc19..202d816 100644 --- a/tests/plugin/sw_redis/docker-compose.yml +++ b/tests/plugin/sw_redis/docker-compose.yml @@ -70,5 +70,6 @@ services: provider: condition: service_healthy + networks: beyond: diff --git a/tests/plugin/sw_redis/test_redis.py b/tests/plugin/sw_redis/test_redis.py index dfeaaa6..9d7c0dd 100644 --- a/tests/plugin/sw_redis/test_redis.py +++ b/tests/plugin/sw_redis/test_redis.py @@ -34,7 +34,7 @@ class TestPlugin(BasePluginTest): cls.compose.wait_for(cls.url(('consumer', '9090'), 'users')) def test_request_plugin(self): - time.sleep(3) + time.sleep(10) self.validate(expected_file_name=os.path.join(dirname(abspath(__file__)), 'expected.data.yml')) diff --git a/tests/plugin/sw_requests/docker-compose.yml b/tests/plugin/sw_requests/docker-compose.yml index b875de6..a0a80d4 100644 --- a/tests/plugin/sw_requests/docker-compose.yml +++ b/tests/plugin/sw_requests/docker-compose.yml @@ -54,5 +54,6 @@ services: provider: condition: service_healthy + networks: beyond: \ No newline at end of file diff --git a/tests/plugin/sw_requests/test_request.py b/tests/plugin/sw_requests/test_request.py index 05b42d2..8aa24b4 100644 --- a/tests/plugin/sw_requests/test_request.py +++ b/tests/plugin/sw_requests/test_request.py @@ -28,7 +28,7 @@ class TestPlugin(BasePluginTest): def test_plugin(self): print('traffic: ', requests.post(url=self.url(('consumer', '9090')))) - time.sleep(3) + time.sleep(10) self.validate() diff --git a/tests/plugin/sw_tornado/test_tornado.py b/tests/plugin/sw_tornado/test_tornado.py index 8187451..f7eb788 100644 --- a/tests/plugin/sw_tornado/test_tornado.py +++ b/tests/plugin/sw_tornado/test_tornado.py @@ -33,7 +33,7 @@ class TestPlugin(BasePluginTest): cls.compose.wait_for(cls.url(('consumer', '9090'), 'users')) def test_plugin(self): - time.sleep(3) + time.sleep(10) self.validate() -- GitLab