[PATCH] test: don't leave open read views after vinyl/errinj_tx

Vladimir Davydov vdavydov.dev at gmail.com
Fri Mar 15 19:43:14 MSK 2019


See commit 65061cb4d595 ("test: don't leave open read views after
vinyl/iterator") for more details.

Follow-up #3862
---
 test/vinyl/errinj_tx.result   | 10 ++++++++++
 test/vinyl/errinj_tx.test.lua |  5 +++++
 2 files changed, 15 insertions(+)

diff --git a/test/vinyl/errinj_tx.result b/test/vinyl/errinj_tx.result
index a7583b2e..29ec47c8 100644
--- a/test/vinyl/errinj_tx.result
+++ b/test/vinyl/errinj_tx.result
@@ -433,3 +433,13 @@ last_read
 space:drop()
 ---
 ...
+-- Collect all iterators to make sure no read views are left behind,
+-- as they might disrupt the following test run.
+collectgarbage()
+---
+- 0
+...
+box.stat.vinyl().tx.read_views -- 0
+---
+- 0
+...
diff --git a/test/vinyl/errinj_tx.test.lua b/test/vinyl/errinj_tx.test.lua
index cf83b326..b06831b7 100644
--- a/test/vinyl/errinj_tx.test.lua
+++ b/test/vinyl/errinj_tx.test.lua
@@ -192,3 +192,8 @@ while f2:status() ~= 'dead' do fiber.sleep(0.01) end
 last_read
 
 space:drop()
+
+-- Collect all iterators to make sure no read views are left behind,
+-- as they might disrupt the following test run.
+collectgarbage()
+box.stat.vinyl().tx.read_views -- 0
-- 
2.11.0




More information about the Tarantool-patches mailing list