Tarantool development patches archive
 help / color / mirror / Atom feed
From: Sergey Bronnikov via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: tarantool-patches@dev.tarantool.org, v.shpilevoy@tarantool.org
Subject: [Tarantool-patches] [PATCH v8 02/14] test: remove functions to open and close SQL connection
Date: Thu, 21 Jan 2021 15:49:55 +0300	[thread overview]
Message-ID: <8990b58be43c6ddf0b470cb2a9f8db40df484e67.1611232655.git.sergeyb@tarantool.org> (raw)
In-Reply-To: <cover.1611232655.git.sergeyb@tarantool.org>

From: Sergey Bronnikov <sergeyb@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


  parent reply	other threads:[~2021-01-21 12:51 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-21 12:49 [Tarantool-patches] [PATCH v8 00/14] Fix luacheck warnings in test/sql and test/sql-tap Sergey Bronnikov via Tarantool-patches
2021-01-21 12:49 ` [Tarantool-patches] [PATCH v8 01/14] test: fix luacheck warnings in test/sql Sergey Bronnikov via Tarantool-patches
2021-01-21 12:49 ` Sergey Bronnikov via Tarantool-patches [this message]
2021-01-21 12:49 ` [Tarantool-patches] [PATCH v8 03/14] test: fix luacheck warnings W113 in test/sql-tap Sergey Bronnikov via Tarantool-patches
2021-01-24 17:33   ` Vladislav Shpilevoy via Tarantool-patches
2021-02-06 17:52     ` Vladislav Shpilevoy via Tarantool-patches
2021-02-16 12:02     ` Sergey Bronnikov via Tarantool-patches
2021-02-23 21:25       ` Vladislav Shpilevoy via Tarantool-patches
2021-02-25 10:39         ` Sergey Bronnikov via Tarantool-patches
2021-02-26 23:42   ` Vladislav Shpilevoy via Tarantool-patches
2021-02-27 17:53     ` Sergey Bronnikov via Tarantool-patches
2021-02-28 15:30       ` Vladislav Shpilevoy via Tarantool-patches
2021-03-01 13:26         ` Sergey Bronnikov via Tarantool-patches
2021-01-21 12:49 ` [Tarantool-patches] [PATCH v8 04/14] test: fix luacheck warnings W211 " Sergey Bronnikov via Tarantool-patches
2021-01-24 17:34   ` Vladislav Shpilevoy via Tarantool-patches
2021-02-16 14:09     ` Sergey Bronnikov via Tarantool-patches
2021-02-23 21:26   ` Vladislav Shpilevoy via Tarantool-patches
2021-02-25 11:02     ` Sergey Bronnikov via Tarantool-patches
2021-02-26 23:42       ` Vladislav Shpilevoy via Tarantool-patches
2021-02-27 17:09         ` Sergey Bronnikov via Tarantool-patches
2021-02-28 15:30           ` Vladislav Shpilevoy via Tarantool-patches
2021-03-01 13:46             ` Sergey Bronnikov via Tarantool-patches
2021-03-01 21:27               ` Vladislav Shpilevoy via Tarantool-patches
2021-03-02  8:05                 ` Sergey Bronnikov via Tarantool-patches
2021-01-21 12:50 ` [Tarantool-patches] [PATCH v8 05/14] test: fix luacheck warnings W212 " Sergey Bronnikov via Tarantool-patches
2021-01-21 12:50 ` [Tarantool-patches] [PATCH v8 06/14] test: fix laucheck warnings W213 " Sergey Bronnikov via Tarantool-patches
2021-01-24 17:35   ` Vladislav Shpilevoy via Tarantool-patches
2021-01-29 16:32     ` Sergey Bronnikov via Tarantool-patches
2021-01-21 12:50 ` [Tarantool-patches] [PATCH v8 07/14] test: fix luacheck warnings W231 " Sergey Bronnikov via Tarantool-patches
2021-01-24 17:35   ` Vladislav Shpilevoy via Tarantool-patches
2021-01-29 22:39     ` Sergey Bronnikov via Tarantool-patches
2021-01-21 12:50 ` [Tarantool-patches] [PATCH v8 08/14] test: fix luacheck warnings W311 " Sergey Bronnikov via Tarantool-patches
2021-01-21 12:50 ` [Tarantool-patches] [PATCH v8 09/14] test: fix luacheck warnings W511 " Sergey Bronnikov via Tarantool-patches
2021-01-21 12:50 ` [Tarantool-patches] [PATCH v8 10/14] test: fix luacheck warnings W512 " Sergey Bronnikov via Tarantool-patches
2021-01-21 12:50 ` [Tarantool-patches] [PATCH v8 11/14] test: fix luacheck warnings W542 " Sergey Bronnikov via Tarantool-patches
2021-01-21 12:50 ` [Tarantool-patches] [PATCH v8 12/14] test: fix luacheck warnings W612, W613, W614 " Sergey Bronnikov via Tarantool-patches
2021-01-24 17:36   ` Vladislav Shpilevoy via Tarantool-patches
2021-01-29 16:23     ` Sergey Bronnikov via Tarantool-patches
2021-01-29 21:50       ` Sergey Bronnikov via Tarantool-patches
2021-01-21 12:50 ` [Tarantool-patches] [PATCH v8 13/14] test: fix luacheck warnings W621 " Sergey Bronnikov via Tarantool-patches
2021-01-24 17:37   ` Vladislav Shpilevoy via Tarantool-patches
2021-01-29 16:11     ` Sergey Bronnikov via Tarantool-patches
2021-01-21 12:50 ` [Tarantool-patches] [PATCH v8 14/14] luacheck: add issues for suppressed warnings Sergey Bronnikov via Tarantool-patches
2021-01-24 17:37   ` Vladislav Shpilevoy via Tarantool-patches
2021-01-29 16:13     ` Sergey Bronnikov via Tarantool-patches
2021-03-01 21:37 ` [Tarantool-patches] [PATCH v8 00/14] Fix luacheck warnings in test/sql and test/sql-tap Vladislav Shpilevoy via Tarantool-patches
2021-03-02  9:47 ` Kirill Yukhin via Tarantool-patches

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8990b58be43c6ddf0b470cb2a9f8db40df484e67.1611232655.git.sergeyb@tarantool.org \
    --to=tarantool-patches@dev.tarantool.org \
    --cc=sergeyb@tarantool.org \
    --cc=v.shpilevoy@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH v8 02/14] test: remove functions to open and close SQL connection' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox