forked from github/server
debug logging did not help. nothing unusual here, just weirdly intermittent.
This commit is contained in:
parent
88f0504f48
commit
772386ffc7
|
@ -34,22 +34,18 @@ function test_build_watch()
|
|||
local u = unit.create(f, r, 1)
|
||||
|
||||
u.number = 20
|
||||
u:add_item("log", 20)
|
||||
u:add_item("log", 30)
|
||||
u.id = 42
|
||||
|
||||
u:set_skill("building", 1)
|
||||
u:add_order("MACHE Wache")
|
||||
process_orders()
|
||||
assert_not_nil(u.building)
|
||||
if 5 ~= u.building.size then
|
||||
-- debug logging to find intermittent errors
|
||||
for k,v in ipairs(f.messages) do
|
||||
print(v)
|
||||
end
|
||||
end
|
||||
-- stage two needs skill 2, this unit can only build a first stage:
|
||||
assert_equal(5, u.building.size)
|
||||
|
||||
u:set_skill("building", 2)
|
||||
u:clear_orders()
|
||||
u:add_order("MACHE Wache " .. itoa36(u.building.id))
|
||||
process_orders()
|
||||
assert_not_nil(u.building)
|
||||
|
|
Loading…
Reference in New Issue