From c6e36d80a8d2ca3d5efb76d697eaf6aed6967421 Mon Sep 17 00:00:00 2001 From: Hector Hernandez Guzman Date: Mon, 20 Apr 2020 16:51:51 -0700 Subject: [PATCH 1/4] Test 1 --- .../tests/mysql/test_mysql_functional.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/opentelemetry-ext-docker-tests/tests/mysql/test_mysql_functional.py b/ext/opentelemetry-ext-docker-tests/tests/mysql/test_mysql_functional.py index 305bea00bf1..fcf85cde0e5 100644 --- a/ext/opentelemetry-ext-docker-tests/tests/mysql/test_mysql_functional.py +++ b/ext/opentelemetry-ext-docker-tests/tests/mysql/test_mysql_functional.py @@ -93,7 +93,7 @@ def test_executemany(self): """Should create a child span for executemany """ with self._tracer.start_as_current_span("rootSpan"): - data = ["1", "2", "3"] + data = [("1"), ("2"), ("3")] stmt = "INSERT INTO test (id) VALUES (%s)" self._cursor.executemany(stmt, data) self.validate_spans() From 787e9adeee95fd3ddfa50c70ddd2119e7a8ec1e4 Mon Sep 17 00:00:00 2001 From: Hector Hernandez Guzman Date: Mon, 20 Apr 2020 16:57:18 -0700 Subject: [PATCH 2/4] test --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 9d1d1a26cc7..37c21dbd00e 100644 --- a/tox.ini +++ b/tox.ini @@ -94,7 +94,7 @@ envlist = [travis] python = - 3.8: py38, lint, docs, docker-tests + 3.7: py37, lint, docs, docker-tests [testenv] deps = From 22a227913239a52d57d6b999fec3c1ad9558fb5c Mon Sep 17 00:00:00 2001 From: Hector Hernandez Guzman Date: Mon, 20 Apr 2020 20:20:29 -0700 Subject: [PATCH 3/4] test 2 --- .../tests/mysql/test_mysql_functional.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/opentelemetry-ext-docker-tests/tests/mysql/test_mysql_functional.py b/ext/opentelemetry-ext-docker-tests/tests/mysql/test_mysql_functional.py index fcf85cde0e5..681495f2ac5 100644 --- a/ext/opentelemetry-ext-docker-tests/tests/mysql/test_mysql_functional.py +++ b/ext/opentelemetry-ext-docker-tests/tests/mysql/test_mysql_functional.py @@ -93,8 +93,8 @@ def test_executemany(self): """Should create a child span for executemany """ with self._tracer.start_as_current_span("rootSpan"): - data = [("1"), ("2"), ("3")] - stmt = "INSERT INTO test (id) VALUES (%s)" + data = [(1), (2), (3)] + stmt = "INSERT INTO test (id) VALUES (%d)" self._cursor.executemany(stmt, data) self.validate_spans() From 586186829ef305acd7e720a6ff66d193aab97ae8 Mon Sep 17 00:00:00 2001 From: Hector Hernandez Guzman Date: Mon, 20 Apr 2020 20:44:32 -0700 Subject: [PATCH 4/4] test --- .../tests/mysql/test_mysql_functional.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/ext/opentelemetry-ext-docker-tests/tests/mysql/test_mysql_functional.py b/ext/opentelemetry-ext-docker-tests/tests/mysql/test_mysql_functional.py index 681495f2ac5..84dbd114189 100644 --- a/ext/opentelemetry-ext-docker-tests/tests/mysql/test_mysql_functional.py +++ b/ext/opentelemetry-ext-docker-tests/tests/mysql/test_mysql_functional.py @@ -92,11 +92,13 @@ def test_execute(self): def test_executemany(self): """Should create a child span for executemany """ - with self._tracer.start_as_current_span("rootSpan"): - data = [(1), (2), (3)] - stmt = "INSERT INTO test (id) VALUES (%d)" + with self._tracer.start_as_current_span("rootSpan"), self.assertRaises( + Exception + ): + data = [("1"), ("2"), ("3")] + stmt = "INSERT INTO test (id) VALUES (%s)" self._cursor.executemany(stmt, data) - self.validate_spans() + self.validate_spans() def test_callproc(self): """Should create a child span for callproc