From 369a8fbe926c4c5ca983993f80e84b5ac81ba8b6 Mon Sep 17 00:00:00 2001 From: Yuriy Date: Sun, 16 Jun 2019 10:55:14 +0300 Subject: [PATCH] made mysql tests independent from each other --- dbms/tests/integration/test_mysql_protocol/test.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dbms/tests/integration/test_mysql_protocol/test.py b/dbms/tests/integration/test_mysql_protocol/test.py index 1c4da462f53..3118f2fbf54 100644 --- a/dbms/tests/integration/test_mysql_protocol/test.py +++ b/dbms/tests/integration/test_mysql_protocol/test.py @@ -79,6 +79,7 @@ def test_mysql_client(mysql_client, server_address): -e "INSERT INTO table1 VALUES (0), (1), (5);" -e "INSERT INTO table1 VALUES (0), (1), (5);" -e "SELECT * FROM table1 ORDER BY a;" + -e "DROP DATABASE x;" '''.format(host=server_address, port=server_port), demux=True) assert stdout == 'a\n0\n0\n1\n1\n5\n5\n' @@ -108,9 +109,10 @@ def test_python_client(server_address): assert exc_info.value.args == (81, "Database system2 doesn't exist") - client.select_db('x') cursor = client.cursor(pymysql.cursors.DictCursor) - cursor.execute("TRUNCATE TABLE table1") + cursor.execute('CREATE DATABASE x') + client.select_db('x') + cursor.execute("CREATE TABLE table1 (a UInt32) ENGINE = Memory") cursor.execute("INSERT INTO table1 VALUES (1), (3)") cursor.execute("INSERT INTO table1 VALUES (1), (4)") cursor.execute("SELECT * FROM table1 ORDER BY a")