8000 Connection is recreated on every call, when instance is down · Issue #518 · tarantool/vshard · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Connection is recreated on every call, when instance is down #518
Closed
@Serpentian

Description

@Serpentian

Reproducer

diff --git a/test/replicaset-luatest/replicaset_3_test.lua b/test/replicaset-luatest/replicaset_3_test.lua
index bbc5ca4..d23c5c4 100644
--- a/test/replicaset-luatest/replicaset_3_test.lua
+++ b/test/replicaset-luatest/replicaset_3_test.lua
@@ -501,3 +501,21 @@ test_group.test_stateless_balancing_callre = function(g)
     reset_get_uuid(g.replica_1_b)
     reset_get_uuid(g.replica_1_c)
 end
+
+--
+-- Connection has been recreated on every call, when
+-- instance is down.
+--
+test_group.test_conn_is_not_recreated = function(g)
+    local _, rs = next(vreplicaset.buildall(global_cfg))
+    rs:wait_connected(vtest.wait_timeout)
+
+    -- Kill master, the connection should not be recreated.
+    g.replica_1_a:stop()
+    local conn = rs.master.conn
+    rs:callrw('echo', {'hello'})
+    t.assert_equals(conn, rs.master.conn)
+
+    g.replica_1_a:start()
+    rs:wait_connected(vtest.wait_timeout)
+end

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0