diff --git a/queue/example_connection_pool_test.go b/queue/example_connection_pool_test.go index e41cdc639..5425d6c39 100644 --- a/queue/example_connection_pool_test.go +++ b/queue/example_connection_pool_test.go @@ -61,6 +61,13 @@ func (h *QueueConnectionHandler) Discovered(conn *tarantool.Connection, // Set up a queue module configuration for an instance. q := queue.New(conn, h.name) + + // Set up a queue module configuration for an instance. Ideally, this + // should be done before box.cfg({}) or you need to wait some time + // before start a work. + // + // See: + // https://github.com/tarantool/queue/issues/206 opts := queue.CfgOpts{InReplicaset: true, Ttr: 60 * time.Second} if h.err = q.Cfg(opts); h.err != nil { diff --git a/queue/testdata/pool.lua b/queue/testdata/pool.lua index 1bcc11654..9ca98bbf1 100644 --- a/queue/testdata/pool.lua +++ b/queue/testdata/pool.lua @@ -25,6 +25,9 @@ end local queue = require('queue') rawset(_G, 'queue', queue) +-- queue.cfg({in_replicaset = true}) should be called before box.cfg({}) +-- https://github.com/tarantool/queue/issues/206 +queue.cfg({in_replicaset = true, ttr = 60}) local listen = os.getenv("TEST_TNT_LISTEN") box.cfg{