diff --git a/test/basic_test.lua b/test/basic_test.lua index 9515469..f6a6719 100644 --- a/test/basic_test.lua +++ b/test/basic_test.lua @@ -138,6 +138,8 @@ function g.test_delayed_queue() { name = 'payload', type = 'any' }, }) + local F = { id = 1, status = 2, runat = 3, payload = 4 } + queue:create_index('primary', { parts = {'id'} }) queue:create_index('status', { parts = {'status', 'id'} }) queue:create_index('runat', { parts = {'runat', 'id'} }) @@ -210,7 +212,7 @@ function g.test_delayed_queue() queue:ack(take, { update = { - { '=', 'payload', { finished = 2 } }, + { '=', F.payload, { finished = 2 } }, }, delay = 0.5, }) diff --git a/test/network_test.lua b/test/network_test.lua index a986ff6..19d7506 100644 --- a/test/network_test.lua +++ b/test/network_test.lua @@ -28,6 +28,7 @@ function g.test_untake() { name = 'runat', type = 'number' }, { name = 'payload', type = 'any' }, }) + local F = { id = 1, status = 2, runat = 3, payload = 4 } queue:create_index('primary', { parts = {'id'} }) queue:create_index('status', { parts = {'status', 'id'} }) @@ -77,7 +78,7 @@ function g.test_untake() t.assert_equals(task.id, taken.id, "retutned the same task (2nd)") local processed_at = clock.time() - local acked = tt:call('box.space.queue:ack', {taken, { update = {{'=', 'payload', { processed_at = processed_at }}} }}, {timeout = 1}) + local acked = tt:call('box.space.queue:ack', {taken, { update = {{'=', F.payload, { processed_at = processed_at }}} }}, {timeout = 1}) t.assert_equals(acked[1], taken.id, ":ack() returned taken but completed task") local awaiter_res = awaiter_fin:get()