From 5b517792f4cd0c766f87386ade22eff6552fb7a4 Mon Sep 17 00:00:00 2001 From: Luca Comellini Date: Thu, 23 Jun 2022 01:35:07 -0500 Subject: [PATCH] Use old docker-compose --- Dockerfile-test | 5 ----- ci/install_dependencies.sh | 4 ++++ test/environment/docker-compose.yaml | 2 +- test/environment/logs/debug.log | 4 ++++ test/environment/logs/error.log | 1 - test/environment/traces/nginx.json | 1 + test/nginx_opentracing_test.py | 6 +++--- 7 files changed, 13 insertions(+), 10 deletions(-) delete mode 100755 test/environment/logs/error.log diff --git a/Dockerfile-test b/Dockerfile-test index f8c41582..617c1bc5 100644 --- a/Dockerfile-test +++ b/Dockerfile-test @@ -19,11 +19,6 @@ RUN set -x \ wget \ libpcre3 libpcre3-dev \ zlib1g-dev -# gcc-8 \ -# g++-8 \ -# ### Use gcc-8 (the default gcc has this problem when using with address sanitizer: -# ### https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84428) -# && update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 800 --slave /usr/bin/g++ g++ /usr/bin/g++-8 ### Build opentracing-cpp RUN cd / \ diff --git a/ci/install_dependencies.sh b/ci/install_dependencies.sh index 03e99577..8cd7b0d0 100755 --- a/ci/install_dependencies.sh +++ b/ci/install_dependencies.sh @@ -3,6 +3,10 @@ set -x set -e +# workaround to install docker-compose v1 +sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose +sudo chmod +x /usr/local/bin/docker-compose + docker version docker-compose version diff --git a/test/environment/docker-compose.yaml b/test/environment/docker-compose.yaml index 79d3e2a7..2b7af29d 100644 --- a/test/environment/docker-compose.yaml +++ b/test/environment/docker-compose.yaml @@ -1,4 +1,4 @@ -version: '2' +version: '3' services: nginx: diff --git a/test/environment/logs/debug.log b/test/environment/logs/debug.log index 8b137891..4644582f 100755 --- a/test/environment/logs/debug.log +++ b/test/environment/logs/debug.log @@ -1 +1,5 @@ +2022/06/23 05:34:30 [debug] 7#0: epoll add event: fd:9 op:1 ev:00002001 +2022/06/23 05:34:36 [debug] 7#0: epoll add event: fd:9 op:1 ev:00002001 +2022/06/23 05:35:55 [debug] 8#0: epoll add event: fd:9 op:1 ev:00002001 +2022/06/23 05:56:04 [debug] 7#0: epoll add event: fd:9 op:1 ev:00002001 diff --git a/test/environment/logs/error.log b/test/environment/logs/error.log deleted file mode 100755 index 8b137891..00000000 --- a/test/environment/logs/error.log +++ /dev/null @@ -1 +0,0 @@ - diff --git a/test/environment/traces/nginx.json b/test/environment/traces/nginx.json index e69de29b..0637a088 100644 --- a/test/environment/traces/nginx.json +++ b/test/environment/traces/nginx.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/test/nginx_opentracing_test.py b/test/nginx_opentracing_test.py index 908882d8..5d025bf4 100644 --- a/test/nginx_opentracing_test.py +++ b/test/nginx_opentracing_test.py @@ -42,7 +42,7 @@ def setUp(self): ) self.environment_handle = subprocess.Popen( - ["docker-compose", "up", "--no-color"], + ["docker-compose", "--ansi=never", "up"], stdout=subprocess.PIPE, stderr=subprocess.PIPE, ) @@ -55,7 +55,7 @@ def setUp(self): # Wait so that backend can come up. # TODO: replace with something better - time.sleep(2) + time.sleep(5) self.conn = http.client.HTTPConnection("localhost", 8080, timeout=5) self.grpcConn = grpc.insecure_channel("localhost:8081") @@ -107,7 +107,7 @@ def _stopDocker(self): if not self.running: return self.running = False - subprocess.check_call(["docker-compose", "down"]) + subprocess.check_call(["docker-compose", "--ansi=never", "down"]) stdout, stderr = self.environment_handle.communicate() self.environment_stdout = stdout self.environment_stderr = stderr