Skip to content

Commit 2b8cdea

Browse files
fix: update remaining tests to expect collection name
1 parent ef5719b commit 2b8cdea

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

tests/opentelemetry-docker-tests/tests/mysql/test_mysql_functional.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def test_execute(self):
8484
stmt = "CREATE TABLE IF NOT EXISTS test (id INT)"
8585
with self._tracer.start_as_current_span("rootSpan"):
8686
self._cursor.execute(stmt)
87-
self.validate_spans("CREATE")
87+
self.validate_spans("CREATE test")
8888

8989
def test_execute_with_connection_context_manager(self):
9090
"""Should create a child span for execute with connection context"""
@@ -93,23 +93,23 @@ def test_execute_with_connection_context_manager(self):
9393
with self._connection as conn:
9494
cursor = conn.cursor()
9595
cursor.execute(stmt)
96-
self.validate_spans("CREATE")
96+
self.validate_spans("CREATE test")
9797

9898
def test_execute_with_cursor_context_manager(self):
9999
"""Should create a child span for execute with cursor context"""
100100
stmt = "CREATE TABLE IF NOT EXISTS test (id INT)"
101101
with self._tracer.start_as_current_span("rootSpan"):
102102
with self._connection.cursor() as cursor:
103103
cursor.execute(stmt)
104-
self.validate_spans("CREATE")
104+
self.validate_spans("CREATE test")
105105

106106
def test_executemany(self):
107107
"""Should create a child span for executemany"""
108108
stmt = "INSERT INTO test (id) VALUES (%s)"
109109
with self._tracer.start_as_current_span("rootSpan"):
110110
data = (("1",), ("2",), ("3",))
111111
self._cursor.executemany(stmt, data)
112-
self.validate_spans("INSERT")
112+
self.validate_spans("INSERT test")
113113

114114
def test_callproc(self):
115115
"""Should create a child span for callproc"""

tests/opentelemetry-docker-tests/tests/pymysql/test_pymysql_functional.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,23 +84,23 @@ def test_execute(self):
8484
stmt = "CREATE TABLE IF NOT EXISTS test (id INT)"
8585
with self._tracer.start_as_current_span("rootSpan"):
8686
self._cursor.execute(stmt)
87-
self.validate_spans("CREATE")
87+
self.validate_spans("CREATE test")
8888

8989
def test_execute_with_cursor_context_manager(self):
9090
"""Should create a child span for execute with cursor context"""
9191
stmt = "CREATE TABLE IF NOT EXISTS test (id INT)"
9292
with self._tracer.start_as_current_span("rootSpan"):
9393
with self._connection.cursor() as cursor:
9494
cursor.execute(stmt)
95-
self.validate_spans("CREATE")
95+
self.validate_spans("CREATE test")
9696

9797
def test_executemany(self):
9898
"""Should create a child span for executemany"""
9999
stmt = "INSERT INTO test (id) VALUES (%s)"
100100
with self._tracer.start_as_current_span("rootSpan"):
101101
data = (("1",), ("2",), ("3",))
102102
self._cursor.executemany(stmt, data)
103-
self.validate_spans("INSERT")
103+
self.validate_spans("INSERT test")
104104

105105
def test_callproc(self):
106106
"""Should create a child span for callproc"""
@@ -116,12 +116,12 @@ def test_commit(self):
116116
data = (("4",), ("5",), ("6",))
117117
self._cursor.executemany(stmt, data)
118118
self._connection.commit()
119-
self.validate_spans("INSERT")
119+
self.validate_spans("INSERT test")
120120

121121
def test_rollback(self):
122122
stmt = "INSERT INTO test (id) VALUES (%s)"
123123
with self._tracer.start_as_current_span("rootSpan"):
124124
data = (("7",), ("8",), ("9",))
125125
self._cursor.executemany(stmt, data)
126126
self._connection.rollback()
127-
self.validate_spans("INSERT")
127+
self.validate_spans("INSERT test")

0 commit comments

Comments
 (0)