* [PATCH] test: fix another net.box failure
@ 2019-07-19 6:52 Serge Petrenko
2019-07-19 8:41 ` [tarantool-patches] " Kirill Yukhin
0 siblings, 1 reply; 2+ messages in thread
From: Serge Petrenko @ 2019-07-19 6:52 UTC (permalink / raw)
To: vdavydov.dev; +Cc: tarantool-patches, Serge Petrenko
This last error
```
[035] ...
[035] disconnected_cnt
[035] ---
[035] -- 1
[035] +- 2
[035] ...
[035] conn:close()
[035] ---
[035] ...
[035] disconnected_cnt
[035] ---
[035] -- 2
[035] +- 3
[035] ...
[035] test_run:cmd('stop server connecter')
[035] ---
[035]
```
Happens because net.box is able to connect to tarantool before it has
finished bootstrap. When connecting, net.box tries to fetch schema
executing a couple of selects, but fails to pass access check since
grants aren't applied yet. This is described in detail in
https://github.com/tarantool/tarantool/issues/2763#issuecomment-499046998
So, alter the test so that it tolerates multiple connection failures.
Closes #4273
---
https://github.com/tarantool/tarantool/issues/4273
https://github.com/tarantool/tarantool/tree/sp/gh-4273-netbox
test/box/net.box.result | 11 +++++++----
test/box/net.box.test.lua | 5 +++--
2 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/test/box/net.box.result b/test/box/net.box.result
index 08039562f..1d9f43400 100644
--- a/test/box/net.box.result
+++ b/test/box/net.box.result
@@ -2343,16 +2343,19 @@ connected_cnt
---
- 1
...
-disconnected_cnt
+old_disconnected_cnt = disconnected_cnt
---
-- 1
+...
+disconnected_cnt >= 1
+---
+- true
...
conn:close()
---
...
-disconnected_cnt
+disconnected_cnt == old_disconnected_cnt + 1
---
-- 2
+- true
...
test_run:cmd('stop server connecter')
---
diff --git a/test/box/net.box.test.lua b/test/box/net.box.test.lua
index 3677b3076..de629ab59 100644
--- a/test/box/net.box.test.lua
+++ b/test/box/net.box.test.lua
@@ -949,9 +949,10 @@ test_run:cmd('stop server connecter')
test_run:cmd('start server connecter')
while conn.state ~= 'active' do fiber.sleep(0.1) end
connected_cnt
-disconnected_cnt
+old_disconnected_cnt = disconnected_cnt
+disconnected_cnt >= 1
conn:close()
-disconnected_cnt
+disconnected_cnt == old_disconnected_cnt + 1
test_run:cmd('stop server connecter')
--
--
2.20.1 (Apple Git-117)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-07-19 8:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-19 6:52 [PATCH] test: fix another net.box failure Serge Petrenko
2019-07-19 8:41 ` [tarantool-patches] " Kirill Yukhin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox