[Tarantool-patches] [PATCH v1] test: flaky hang vinyl/ddl.test.lua test

Alexander V. Tikhonov avtikhon at tarantool.org
Mon Nov 16 13:31:14 MSK 2020


Found hanging test vinyl/ddl.test.lua on:

  [159]  inspector:wait_cond(function() return box.space.test.index.pk:count() == box.space.test.index.tk:count() end)
  [159]  ---
  [159]  - true
  [159]  ...
  [159] -box.snapshot()
  [159] ----
  [159] -- ok
  [159] -...

The issue happend because space index was nil at the moment of check
and the test hanged. To avoid of it, need to check that the index
created before it's use.

Closes #4353
---

Github: https://github.com/tarantool/tarantool/tree/avtikhon/gh-4353-hang-ddl
Issue: https://github.com/tarantool/tarantool/issues/4353

 test/engine/ddl.result   | 8 ++++++++
 test/engine/ddl.test.lua | 2 ++
 test/engine/suite.ini    | 4 ----
 3 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/test/engine/ddl.result b/test/engine/ddl.result
index 8b44d1ee1..f1c3b43d5 100644
--- a/test/engine/ddl.result
+++ b/test/engine/ddl.result
@@ -2568,6 +2568,10 @@ inspector:cmd("restart server default")
 inspector = require('test_run').new()
 ---
 ...
+inspector:wait_cond(function() return box.space.test.index ~= nil end)
+---
+- true
+...
 inspector:wait_cond(function() return box.space.test.index.pk:count() == box.space.test.index.sk:count() end)
 ---
 - true
@@ -2580,6 +2584,10 @@ box.snapshot()
 ---
 - ok
 ...
+inspector:wait_cond(function() return box.space.test.index ~= nil end)
+---
+- true
+...
 inspector:wait_cond(function() return box.space.test.index.pk:count() == box.space.test.index.sk:count() end)
 ---
 - true
diff --git a/test/engine/ddl.test.lua b/test/engine/ddl.test.lua
index 1d77705dd..c3290e655 100644
--- a/test/engine/ddl.test.lua
+++ b/test/engine/ddl.test.lua
@@ -1023,9 +1023,11 @@ inspector:cmd("restart server default")
 
 inspector = require('test_run').new()
 
+inspector:wait_cond(function() return box.space.test.index ~= nil end)
 inspector:wait_cond(function() return box.space.test.index.pk:count() == box.space.test.index.sk:count() end)
 inspector:wait_cond(function() return box.space.test.index.pk:count() == box.space.test.index.tk:count() end)
 box.snapshot()
+inspector:wait_cond(function() return box.space.test.index ~= nil end)
 inspector:wait_cond(function() return box.space.test.index.pk:count() == box.space.test.index.sk:count() end)
 inspector:wait_cond(function() return box.space.test.index.pk:count() == box.space.test.index.tk:count() end)
 
diff --git a/test/engine/suite.ini b/test/engine/suite.ini
index 01899f088..aa20099d9 100644
--- a/test/engine/suite.ini
+++ b/test/engine/suite.ini
@@ -13,10 +13,6 @@ pretest_clean = True
 fragile = {
     "retries": 10,
     "tests": {
-        "ddl.test.lua": {
-            "issues": [ "gh-4353" ],
-            "checksums": [ "dd8851d80183cc75052119ba646e295d" ]
-        },
         "gh-4973-concurrent-alter-fails.test.lua": {
             "issues": [ "gh-5157" ],
             "checksums": [ "4e797e63335cebe24dab15eae4aa8044" ]
-- 
2.25.1



More information about the Tarantool-patches mailing list