[Tarantool-patches] [PATCH v8 02/14] test: remove functions to open and close SQL connection
sergeyb at tarantool.org
sergeyb at tarantool.org
Thu Jan 21 15:49:55 MSK 2021
From: Sergey Bronnikov <sergeyb at tarantool.org>
Part of #5464
Closes #5741
---
test/sql-tap/aggnested.test.lua | 1 -
test/sql-tap/autoinc.test.lua | 2 --
test/sql-tap/check.test.lua | 2 --
test/sql-tap/colname.test.lua | 2 --
test/sql-tap/e_expr.test.lua | 5 -----
test/sql-tap/eqp.test.lua | 2 --
test/sql-tap/index4.test.lua | 2 --
test/sql-tap/misc1.test.lua | 6 ------
test/sql-tap/misc5.test.lua | 1 -
test/sql-tap/numcast.test.lua | 2 --
test/sql-tap/sort.test.lua | 8 --------
test/sql-tap/table.test.lua | 6 ------
test/sql-tap/tkt1443.test.lua | 1 -
test/sql-tap/view.test.lua | 18 ++----------------
14 files changed, 2 insertions(+), 56 deletions(-)
diff --git a/test/sql-tap/aggnested.test.lua b/test/sql-tap/aggnested.test.lua
index 8a79e0df2..37471f48a 100755
--- a/test/sql-tap/aggnested.test.lua
+++ b/test/sql-tap/aggnested.test.lua
@@ -73,7 +73,6 @@ test:do_execsql_test("aggnested-1.4",
-- # http://www.mail-archive.com/sql-users@sql.org/msg70787.html
-- #
-- do_test aggnested-2.0 {
--- sql db2 :memory:
-- db2 eval {
-- CREATE TABLE t1 (A1 INTEGER NOT NULL,A2 INTEGER NOT NULL,A3 INTEGER NOT
-- NULL,A4 INTEGER NOT NULL,PRIMARY KEY(A1));
diff --git a/test/sql-tap/autoinc.test.lua b/test/sql-tap/autoinc.test.lua
index 0ea1961fd..3f8000abd 100755
--- a/test/sql-tap/autoinc.test.lua
+++ b/test/sql-tap/autoinc.test.lua
@@ -52,8 +52,6 @@ test:do_execsql_test(
-- test:do_test(
-- "autoinc-1.4",
-- function()
--- db("close")
--- sql("db", "test.db")
-- return test:execsql([[
-- SELECT * FROM _sequence;
-- ]])
diff --git a/test/sql-tap/check.test.lua b/test/sql-tap/check.test.lua
index cd9f24796..6ecfedeb8 100755
--- a/test/sql-tap/check.test.lua
+++ b/test/sql-tap/check.test.lua
@@ -227,8 +227,6 @@ test:do_execsql_test(
-- </check-2.2>
})
---db("close")
---sql("db", "test.db")
test:do_execsql_test(
"check-2.3",
[[
diff --git a/test/sql-tap/colname.test.lua b/test/sql-tap/colname.test.lua
index 191396bcc..44fa4cf89 100755
--- a/test/sql-tap/colname.test.lua
+++ b/test/sql-tap/colname.test.lua
@@ -435,8 +435,6 @@ test:do_execsql2_test(
test:do_test(
"colname-6.1",
function()
- --db("close")
- --sql("db", "test.db")
-- instead of reconnect to database
-- we are just turning settings to default state
test:execsql([[
diff --git a/test/sql-tap/e_expr.test.lua b/test/sql-tap/e_expr.test.lua
index f5b58cb79..81b08e223 100755
--- a/test/sql-tap/e_expr.test.lua
+++ b/test/sql-tap/e_expr.test.lua
@@ -2170,8 +2170,6 @@ test:do_test(
"def", "abc", "X"
-- </e_expr-15.1.4>
})
---db("close")
---sql("db", "test.db")
-- EVIDENCE-OF: R-22868-25880 The LIKE operator can be made case
-- sensitive using the case_sensitive_like pragma.
--
@@ -3245,9 +3243,6 @@ end
---------------------------------------------------------------------------
-- Test statements related to scalar sub-queries.
--
--- catch { db close }
--- forcedelete test.db
--- sql db test.db
test:catchsql "DROP TABLE t22;"
test:do_execsql_test(
"e_expr-35.0",
diff --git a/test/sql-tap/eqp.test.lua b/test/sql-tap/eqp.test.lua
index 6519fc4e9..6f08ca089 100755
--- a/test/sql-tap/eqp.test.lua
+++ b/test/sql-tap/eqp.test.lua
@@ -754,8 +754,6 @@ if (0 > 0)
ANALYZE;
]])
- --db("close")
- --sql("db", "test.db")
test:do_eqp_test("7.4", "SELECT count(*) FROM t1", {
{0, 0, 0, "SCAN TABLE T1"}
})
diff --git a/test/sql-tap/index4.test.lua b/test/sql-tap/index4.test.lua
index 4ea713a58..1019e0c89 100755
--- a/test/sql-tap/index4.test.lua
+++ b/test/sql-tap/index4.test.lua
@@ -58,8 +58,6 @@ test:do_execsql_test(
-- MUST_WORK_TEST limit memory
--soft_limit = sql_soft_heap_limit(50000)
---db("close")
---sql("db", "test.db")
--test:do_execsql_test(
-- 1.4,
-- [[
diff --git a/test/sql-tap/misc1.test.lua b/test/sql-tap/misc1.test.lua
index c9b9cd7a8..7d928bea0 100755
--- a/test/sql-tap/misc1.test.lua
+++ b/test/sql-tap/misc1.test.lua
@@ -1062,8 +1062,6 @@ test:do_catchsql_test(
-- # 2015-04-19: NULL pointer dereference on a corrupt schema
-- #
--- db close
--- sql db :memory:
-- do_execsql_test misc1-23.1 {
-- CREATE TABLE t1(x INT );
-- UPDATE sql_master SET sql='CREATE table t(d CHECK(T(#0)';
@@ -1074,9 +1072,7 @@ test:do_catchsql_test(
-- } {}
-- # 2015-04-19: Faulty assert() statement
-- #
--- db close
-- database_may_be_corrupt
--- sql db :memory:
-- do_catchsql_test misc1-23.2 {
-- CREATE TABLE t1(x INT UNIQUE);
-- UPDATE sql_master SET sql='CREATE TABLE IF not EXISTS t(c)';
@@ -1085,8 +1081,6 @@ test:do_catchsql_test(
-- ROLLBACK;
-- DROP TABLE F;
-- } {1 {no such table: F}}
--- db close
--- sql db :memory:
-- do_catchsql_test misc1-23.3 {
-- CREATE TABLE t1(x INT UNIQUE);
-- UPDATE sql_master SET sql='CREATE table y(a TEXT, a TEXT)';
diff --git a/test/sql-tap/misc5.test.lua b/test/sql-tap/misc5.test.lua
index 357c36ff6..4bc18aa87 100755
--- a/test/sql-tap/misc5.test.lua
+++ b/test/sql-tap/misc5.test.lua
@@ -308,7 +308,6 @@ test:do_test(
-- # schema.
-- #
-- do_test misc5-7.2 {
--- sql db2 :memory:
-- catchsql {
-- CREATE TABLE t1(x INT UNIQUE);
-- UPDATE sql_master SET sql='CREATE table t(o CHECK(((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((;VALUES(o)';
diff --git a/test/sql-tap/numcast.test.lua b/test/sql-tap/numcast.test.lua
index 18c6adc9e..6ca1316d5 100755
--- a/test/sql-tap/numcast.test.lua
+++ b/test/sql-tap/numcast.test.lua
@@ -26,8 +26,6 @@ for _, enc in ipairs({"utf8"}) do
test:do_test(
"numcast-"..enc..".0",
function()
- --db("close")
- --sql("db", ":memory:")
--test:execsql("PRAGMA encoding='"..enc.."'")
local x = "utf8"--test:execsql("PRAGMA encoding")[1]
x = string.lower(x)
diff --git a/test/sql-tap/sort.test.lua b/test/sql-tap/sort.test.lua
index 065f648b7..5a951b0e9 100755
--- a/test/sql-tap/sort.test.lua
+++ b/test/sql-tap/sort.test.lua
@@ -805,8 +805,6 @@ box.internal.sql_create_function("cksum", cksum)
---------------------------------------------------------------------------
--
for _ in X(0, "X!foreach", [=[["tn mmap_limit nWorker tmpstore coremutex fakeheap softheaplimit","\n 1 0 3 file true false 0\n 2 0 3 file true true 0\n 3 0 0 file true false 0\n 4 1000000 3 file true false 0\n 5 0 0 memory false true 0\n 6 0 0 file false true 1000000 \n 7 0 0 file false true 10000\n "]]=]) do
- db("close")
- sql_shutdown()
if coremutex then
sql_config("multithread")
else
@@ -815,7 +813,6 @@ box.internal.sql_create_function("cksum", cksum)
sql_initialize()
X(558, "X!cmd", [=[["sorter_test_fakeheap",["fakeheap"]]]=])
sql_soft_heap_limit(softheaplimit)
- reset_db()
sql_test_control("sql_TESTCTRL_SORTER_MMAP", "db", mmap_limit)
test:execsql(string.format("PRAGMA temp_store = %s; PRAGMA threads = '%s'", tmpstore, nWorker))
local ten, one
@@ -870,15 +867,12 @@ box.internal.sql_create_function("cksum", cksum)
X(605, "X!cmd", [=[["sorter_test_fakeheap","0"]]=])
end
- db("close")
- sql_shutdown()
X(617, "X!cmd", [=[["set","t(0)","singlethread"]]=])
X(618, "X!cmd", [=[["set","t(1)","multithread"]]=])
X(619, "X!cmd", [=[["set","t(2)","serialized"]]=])
sql_config(X(620, "X!expr", [=[["t($sql_options(threadsafe))"]]=]))
sql_initialize()
sql_soft_heap_limit(0)
- reset_db()
test:do_catchsql_test(
16.1,
[[
@@ -895,7 +889,6 @@ box.internal.sql_create_function("cksum", cksum)
-- </16.1>
})
- reset_db()
test:do_catchsql_test(
16.2,
[[
@@ -912,7 +905,6 @@ box.internal.sql_create_function("cksum", cksum)
-- </16.2>
})
- reset_db()
test:do_execsql_test(
17.1,
[[
diff --git a/test/sql-tap/table.test.lua b/test/sql-tap/table.test.lua
index 590dbafbd..6e45dbab1 100755
--- a/test/sql-tap/table.test.lua
+++ b/test/sql-tap/table.test.lua
@@ -422,9 +422,6 @@ if (0 > 0)
test:do_test(
"table-5.2.2",
function()
- db("close")
- forcedelete("test.db")
- sql("db", "test.db")
return test:execsql [[
CREATE TABLE t0(a,b);
CREATE INDEX t ON t0(a);
@@ -440,9 +437,6 @@ if (0 > 0)
-- </table-5.2.2>
})
- db("close")
- forcedelete("test.db")
- sql("db", "test.db")
X(313, "X!cmd", [=[["Make","sure","an","EXPLAIN","does","not","really","create","a","new","table"]]=])
end
test:do_test(
diff --git a/test/sql-tap/tkt1443.test.lua b/test/sql-tap/tkt1443.test.lua
index f0776285f..d1d837e72 100755
--- a/test/sql-tap/tkt1443.test.lua
+++ b/test/sql-tap/tkt1443.test.lua
@@ -50,7 +50,6 @@ test:plan(3)
test:do_test(
"tkt1443-1.0",
function()
- --sql("db", ":memory:")
return test:execsql(string.format([[
CREATE TABLE Items(
itemId integer primary key,
diff --git a/test/sql-tap/view.test.lua b/test/sql-tap/view.test.lua
index 4d85d8bcb..2f1af29b0 100755
--- a/test/sql-tap/view.test.lua
+++ b/test/sql-tap/view.test.lua
@@ -88,8 +88,6 @@ test:do_execsql_test(
test:do_test(
"view-1.3.1",
function()
- --db("close")
- --sql("db", "test.db")
return test:execsql [[
SELECT * FROM v1 ORDER BY a;
]]
@@ -502,14 +500,12 @@ test:do_execsql_test(
-- </view-7.1>
})
--- MUST_WORK_TEST db close problem
+-- MUST_WORK_TEST
if (0 > 0)
then
test:do_test(
"view-7.2",
function()
- db("close")
- sql("db", "test.db")
return test:execsql [[
SELECT * FROM test;
]]
@@ -540,8 +536,6 @@ if (0 > 0)
test:do_test(
"view-7.4",
function()
- db("close")
- sql("db", "test.db")
return test:execsql [[
SELECT * FROM test;
]]
@@ -572,8 +566,6 @@ if (0 > 0)
test:do_test(
"view-7.6",
function()
- db("close")
- sql("db", "test.db")
return test:execsql [[
SELECT * FROM test;
]]
@@ -595,14 +587,12 @@ test:do_execsql_test(
-- </view-8.1>
})
--- MUST_WORK_TEST db close
+-- MUST_WORK_TEST
if (0 > 0)
then
test:do_test(
"view-8.2",
function()
- db("close")
- sql("db", "test.db")
return test:execsql [[
SELECT * FROM v6 ORDER BY xyz;
]]
@@ -1068,8 +1058,6 @@ test:do_execsql_test(
if (0 > 0)
then
-- Ticket #d58ccbb3f1b"]],":"],"Prevent","Table.nRef","overflow.
- --db("close")
- --sql("db", ":memory:")
test:execsql([[
drop view v1;
drop view v2;
@@ -1120,8 +1108,6 @@ if (0 > 0)
- --db("close")
- --sql("db", ":memory:")
test:do_execsql_test(
"view-22.1",
[[
--
2.25.1
More information about the Tarantool-patches
mailing list