Skip to content

Commit

Permalink
fix: adopt tests for 1.10
Browse files Browse the repository at this point in the history
  • Loading branch information
Vladislav Grubov committed Jul 20, 2024
1 parent 950e96e commit 211f4af
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion test/basic_test.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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'} })
Expand Down Expand Up @@ -210,7 +212,7 @@ function g.test_delayed_queue()

queue:ack(take, {
update = {
{ '=', 'payload', { finished = 2 } },
{ '=', F.payload, { finished = 2 } },
},
delay = 0.5,
})
Expand Down
3 changes: 2 additions & 1 deletion test/network_test.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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'} })
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 211f4af

Please sign in to comment.