Tarantool development patches archive
 help / color / mirror / Atom feed
* [tarantool-patches] [PATCH v1 0/2] SQL Tests failed on concurrent launch
@ 2018-06-20 15:55 Kirill Shcherbatov
  2018-06-20 15:55 ` [tarantool-patches] [PATCH v1 1/2] sql: finish clean-up in view_delayed_wal test Kirill Shcherbatov
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Kirill Shcherbatov @ 2018-06-20 15:55 UTC (permalink / raw)
  To: tarantool-patches; +Cc: korablev, Kirill Shcherbatov

Fixed lost cleanups in tests.

Branch: http://github.com/tarantool/tarantool/tree/kshch/gh-3472-parallel-sql-tests-fail
Issue: https://github.com/tarantool/tarantool/issues/3472

Kirill Shcherbatov (2):
  sql: finish clean-up in view_delayed_wal test
  sql: unset pragma in transitive-transactions test

 test/sql/transitive-transactions.result   | 4 ++++
 test/sql/transitive-transactions.test.lua | 3 +++
 test/sql/view_delayed_wal.result          | 3 +++
 test/sql/view_delayed_wal.test.lua        | 2 ++
 4 files changed, 12 insertions(+)

-- 
2.7.4

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [tarantool-patches] [PATCH v1 1/2] sql: finish clean-up in view_delayed_wal test
  2018-06-20 15:55 [tarantool-patches] [PATCH v1 0/2] SQL Tests failed on concurrent launch Kirill Shcherbatov
@ 2018-06-20 15:55 ` Kirill Shcherbatov
  2018-06-21 15:48   ` [tarantool-patches] " n.pettik
  2018-06-20 15:55 ` [tarantool-patches] [PATCH v1 2/2] sql: unset pragma in transitive-transactions test Kirill Shcherbatov
  2018-06-25 13:39 ` [tarantool-patches] Re: [PATCH v1 0/2] SQL Tests failed on concurrent launch Kirill Shcherbatov
  2 siblings, 1 reply; 9+ messages in thread
From: Kirill Shcherbatov @ 2018-06-20 15:55 UTC (permalink / raw)
  To: tarantool-patches; +Cc: korablev, Kirill Shcherbatov

Part of #3472.
---
 test/sql/view_delayed_wal.result   | 3 +++
 test/sql/view_delayed_wal.test.lua | 2 ++
 2 files changed, 5 insertions(+)

diff --git a/test/sql/view_delayed_wal.result b/test/sql/view_delayed_wal.result
index 50efbee..c65a7e5 100644
--- a/test/sql/view_delayed_wal.result
+++ b/test/sql/view_delayed_wal.result
@@ -101,3 +101,6 @@ box.space.V2
 -- SQL data dictionary we have to restart instance to clean up.
 --
 test_run:cmd('restart server default')
+box.sql.execute("DROP TABLE t2")
+---
+...
diff --git a/test/sql/view_delayed_wal.test.lua b/test/sql/view_delayed_wal.test.lua
index 630c52b..8c30fc6 100644
--- a/test/sql/view_delayed_wal.test.lua
+++ b/test/sql/view_delayed_wal.test.lua
@@ -43,3 +43,5 @@ box.space.V2
 -- SQL data dictionary we have to restart instance to clean up.
 --
 test_run:cmd('restart server default')
+
+box.sql.execute("DROP TABLE t2")
-- 
2.7.4

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [tarantool-patches] [PATCH v1 2/2] sql: unset pragma in transitive-transactions test
  2018-06-20 15:55 [tarantool-patches] [PATCH v1 0/2] SQL Tests failed on concurrent launch Kirill Shcherbatov
  2018-06-20 15:55 ` [tarantool-patches] [PATCH v1 1/2] sql: finish clean-up in view_delayed_wal test Kirill Shcherbatov
@ 2018-06-20 15:55 ` Kirill Shcherbatov
  2018-06-21 15:45   ` [tarantool-patches] " n.pettik
  2018-06-25 13:39 ` [tarantool-patches] Re: [PATCH v1 0/2] SQL Tests failed on concurrent launch Kirill Shcherbatov
  2 siblings, 1 reply; 9+ messages in thread
From: Kirill Shcherbatov @ 2018-06-20 15:55 UTC (permalink / raw)
  To: tarantool-patches; +Cc: korablev, Kirill Shcherbatov

Part of #3472.
---
 test/sql/transitive-transactions.result   | 4 ++++
 test/sql/transitive-transactions.test.lua | 3 +++
 2 files changed, 7 insertions(+)

diff --git a/test/sql/transitive-transactions.result b/test/sql/transitive-transactions.result
index 37b563a..272a25a 100644
--- a/test/sql/transitive-transactions.result
+++ b/test/sql/transitive-transactions.result
@@ -117,6 +117,10 @@ box.space.PARENT:select();
 - - [1, 1]
   - [2, 2]
 ...
+box.sql.execute('PRAGMA defer_foreign_keys = 0;')
+box.sql.execute('pragma foreign_keys = 0;');
+---
+...
 -- Cleanup
 box.sql.execute('DROP TABLE child;');
 ---
diff --git a/test/sql/transitive-transactions.test.lua b/test/sql/transitive-transactions.test.lua
index 14a1e8c..303ecad 100644
--- a/test/sql/transitive-transactions.test.lua
+++ b/test/sql/transitive-transactions.test.lua
@@ -60,6 +60,9 @@ fk_defer();
 box.space.CHILD:select();
 box.space.PARENT:select();
 
+box.sql.execute('PRAGMA defer_foreign_keys = 0;')
+box.sql.execute('pragma foreign_keys = 0;');
+
 -- Cleanup
 box.sql.execute('DROP TABLE child;');
 box.sql.execute('DROP TABLE parent;');
-- 
2.7.4

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [tarantool-patches] Re: [PATCH v1 2/2] sql: unset pragma in transitive-transactions test
  2018-06-20 15:55 ` [tarantool-patches] [PATCH v1 2/2] sql: unset pragma in transitive-transactions test Kirill Shcherbatov
@ 2018-06-21 15:45   ` n.pettik
  2018-06-21 16:06     ` Kirill Shcherbatov
  0 siblings, 1 reply; 9+ messages in thread
From: n.pettik @ 2018-06-21 15:45 UTC (permalink / raw)
  To: tarantool-patches; +Cc: Kirill Shcherbatov


> +box.sql.execute('PRAGMA defer_foreign_keys = 0;')
> +box.sql.execute('pragma foreign_keys = 0;’);

Could you please explain, why do you need to turn off foreign keys?
AFAIK by default they are enabled. It is okay to change defer mode, but
I see no reason to disable them at all.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [tarantool-patches] Re: [PATCH v1 1/2] sql: finish clean-up in view_delayed_wal test
  2018-06-20 15:55 ` [tarantool-patches] [PATCH v1 1/2] sql: finish clean-up in view_delayed_wal test Kirill Shcherbatov
@ 2018-06-21 15:48   ` n.pettik
  0 siblings, 0 replies; 9+ messages in thread
From: n.pettik @ 2018-06-21 15:48 UTC (permalink / raw)
  To: tarantool-patches; +Cc: Kirill Shcherbatov


> diff --git a/test/sql/view_delayed_wal.test.lua b/test/sql/view_delayed_wal.test.lua
> index 630c52b..8c30fc6 100644
> --- a/test/sql/view_delayed_wal.test.lua
> +++ b/test/sql/view_delayed_wal.test.lua
> @@ -43,3 +43,5 @@ box.space.V2
> -- SQL data dictionary we have to restart instance to clean up.
> --
> test_run:cmd('restart server default')
> +
> +box.sql.execute("DROP TABLE t2”)

Actually, this is my mistake: I thought that 'restart server’ would delete xlog files…
You can simply substitute test_run:cmd(‘restart server default’) with test_run:cmd(’clean up server default’).
It is what exactly I wanted to do when I was writing this test.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [tarantool-patches] Re: [PATCH v1 2/2] sql: unset pragma in transitive-transactions test
  2018-06-21 15:45   ` [tarantool-patches] " n.pettik
@ 2018-06-21 16:06     ` Kirill Shcherbatov
  0 siblings, 0 replies; 9+ messages in thread
From: Kirill Shcherbatov @ 2018-06-21 16:06 UTC (permalink / raw)
  To: tarantool-patches; +Cc: n.pettik

On 21.06.2018 18:45, n.pettik wrote:
> 
>> +box.sql.execute('PRAGMA defer_foreign_keys = 0;')
>> +box.sql.execute('pragma foreign_keys = 0;’);
> 
> Could you please explain, why do you need to turn off foreign keys?
> AFAIK by default they are enabled. It is okay to change defer mode, but
> I see no reason to disable them at all.

Yes, I've already dropped this line on branch. This was an extra diff.
I've tried to undone all settings that you apply. Disable defer_foreign_keys is really enough.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [tarantool-patches] Re: [PATCH v1 0/2] SQL Tests failed on concurrent launch
  2018-06-20 15:55 [tarantool-patches] [PATCH v1 0/2] SQL Tests failed on concurrent launch Kirill Shcherbatov
  2018-06-20 15:55 ` [tarantool-patches] [PATCH v1 1/2] sql: finish clean-up in view_delayed_wal test Kirill Shcherbatov
  2018-06-20 15:55 ` [tarantool-patches] [PATCH v1 2/2] sql: unset pragma in transitive-transactions test Kirill Shcherbatov
@ 2018-06-25 13:39 ` Kirill Shcherbatov
  2018-06-25 13:42   ` n.pettik
  2 siblings, 1 reply; 9+ messages in thread
From: Kirill Shcherbatov @ 2018-06-25 13:39 UTC (permalink / raw)
  To: tarantool-patches; +Cc: n.pettik

Ok, let's use cleanup on restart server and squash all changes into one commit.

---
 test/sql/transitive-transactions.result   | 2 ++
 test/sql/transitive-transactions.test.lua | 2 ++
 test/sql/view_delayed_wal.result          | 2 +-
 test/sql/view_delayed_wal.test.lua        | 2 +-
 4 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/test/sql/transitive-transactions.result b/test/sql/transitive-transactions.result
index 37b563a..e617cf1 100644
--- a/test/sql/transitive-transactions.result
+++ b/test/sql/transitive-transactions.result
@@ -118,6 +118,8 @@ box.space.PARENT:select();
   - [2, 2]
 ...
 -- Cleanup
+box.sql.execute('PRAGMA defer_foreign_keys = 0;')
+
 box.sql.execute('DROP TABLE child;');
 ---
 ...
diff --git a/test/sql/transitive-transactions.test.lua b/test/sql/transitive-transactions.test.lua
index 14a1e8c..718f951 100644
--- a/test/sql/transitive-transactions.test.lua
+++ b/test/sql/transitive-transactions.test.lua
@@ -60,6 +60,8 @@ fk_defer();
 box.space.CHILD:select();
 box.space.PARENT:select();
 
+box.sql.execute('PRAGMA defer_foreign_keys = 0;')
+
 -- Cleanup
 box.sql.execute('DROP TABLE child;');
 box.sql.execute('DROP TABLE parent;');
diff --git a/test/sql/view_delayed_wal.result b/test/sql/view_delayed_wal.result
index 50efbee..3b68eda 100644
--- a/test/sql/view_delayed_wal.result
+++ b/test/sql/view_delayed_wal.result
@@ -100,4 +100,4 @@ box.space.V2
 -- Since deletion via Lua doesn't remove entry from
 -- SQL data dictionary we have to restart instance to clean up.
 --
-test_run:cmd('restart server default')
+test_run:cmd('restart server default with cleanup=1')
diff --git a/test/sql/view_delayed_wal.test.lua b/test/sql/view_delayed_wal.test.lua
index 630c52b..cca75ad 100644
--- a/test/sql/view_delayed_wal.test.lua
+++ b/test/sql/view_delayed_wal.test.lua
@@ -42,4 +42,4 @@ box.space.V2
 -- Since deletion via Lua doesn't remove entry from
 -- SQL data dictionary we have to restart instance to clean up.
 --
-test_run:cmd('restart server default')
+test_run:cmd('restart server default with cleanup=1')
-- 
2.7.4

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [tarantool-patches] Re: [PATCH v1 0/2] SQL Tests failed on concurrent launch
  2018-06-25 13:39 ` [tarantool-patches] Re: [PATCH v1 0/2] SQL Tests failed on concurrent launch Kirill Shcherbatov
@ 2018-06-25 13:42   ` n.pettik
  2018-06-26  8:01     ` Kirill Yukhin
  0 siblings, 1 reply; 9+ messages in thread
From: n.pettik @ 2018-06-25 13:42 UTC (permalink / raw)
  To: tarantool-patches; +Cc: Kirill Shcherbatov, Kirill Yukhin


> Ok, let's use cleanup on restart server and squash all changes into one commit.

Thx, LGTM.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [tarantool-patches] Re: [PATCH v1 0/2] SQL Tests failed on concurrent launch
  2018-06-25 13:42   ` n.pettik
@ 2018-06-26  8:01     ` Kirill Yukhin
  0 siblings, 0 replies; 9+ messages in thread
From: Kirill Yukhin @ 2018-06-26  8:01 UTC (permalink / raw)
  To: n.pettik; +Cc: tarantool-patches, Kirill Shcherbatov

Hello,
On 25 июн 16:42, n.pettik wrote:
> 
> > Ok, let's use cleanup on restart server and squash all changes into one commit.
> 
> Thx, LGTM.
I've checked the patch into 2.0 branch.

--
Regards, Kirill Yukhin

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-06-26  8:01 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-20 15:55 [tarantool-patches] [PATCH v1 0/2] SQL Tests failed on concurrent launch Kirill Shcherbatov
2018-06-20 15:55 ` [tarantool-patches] [PATCH v1 1/2] sql: finish clean-up in view_delayed_wal test Kirill Shcherbatov
2018-06-21 15:48   ` [tarantool-patches] " n.pettik
2018-06-20 15:55 ` [tarantool-patches] [PATCH v1 2/2] sql: unset pragma in transitive-transactions test Kirill Shcherbatov
2018-06-21 15:45   ` [tarantool-patches] " n.pettik
2018-06-21 16:06     ` Kirill Shcherbatov
2018-06-25 13:39 ` [tarantool-patches] Re: [PATCH v1 0/2] SQL Tests failed on concurrent launch Kirill Shcherbatov
2018-06-25 13:42   ` n.pettik
2018-06-26  8:01     ` Kirill Yukhin

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