aboutsummaryrefslogtreecommitdiff
path: root/unit_tests/scripts
diff options
context:
space:
mode:
authorBenoit Germain <benoit.germain@ubisoft.com>2025-03-17 12:34:08 +0100
committerBenoit Germain <benoit.germain@ubisoft.com>2025-03-17 12:34:08 +0100
commita57690123ae3ce5bdd7e970690f1380e88e4eaf6 (patch)
treed526e8f545cef2b1c23978cb9ee5c94dbc9cda2c /unit_tests/scripts
parentd93de7ca51edea911eeecb7c8edcffe77298ed07 (diff)
downloadlanes-a57690123ae3ce5bdd7e970690f1380e88e4eaf6.tar.gz
lanes-a57690123ae3ce5bdd7e970690f1380e88e4eaf6.tar.bz2
lanes-a57690123ae3ce5bdd7e970690f1380e88e4eaf6.zip
Raise a regular Lua error instead of throwing a C++ std::logic_error exception in Universe::UniverseGC
Diffstat (limited to 'unit_tests/scripts')
-rw-r--r--unit_tests/scripts/lane/uncooperative_shutdown.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/unit_tests/scripts/lane/uncooperative_shutdown.lua b/unit_tests/scripts/lane/uncooperative_shutdown.lua
index 51e5762..89e1ff8 100644
--- a/unit_tests/scripts/lane/uncooperative_shutdown.lua
+++ b/unit_tests/scripts/lane/uncooperative_shutdown.lua
@@ -8,7 +8,7 @@ local lanes = require "lanes".configure{shutdown_timeout = 0.001, on_state_creat
8-- launch lanes that blocks forever 8-- launch lanes that blocks forever
9local lane = function() 9local lane = function()
10 local fixture = require "fixture" 10 local fixture = require "fixture"
11 fixture.forever() 11 fixture.sleep_for()
12end 12end
13 13
14-- the generator 14-- the generator
@@ -20,5 +20,5 @@ local h1 = g1()
20-- wait until the lane is running 20-- wait until the lane is running
21repeat until h1.status == "running" 21repeat until h1.status == "running"
22 22
23-- let the script end, Lanes should throw std::logic_error because the lane did not gracefully terminate 23-- this finalizer returns an error string that telling Universe::__gc will use to raise an error when it detects the uncooperative lane
24lanes.finally(fixture.throwing_finalizer) 24lanes.finally(fixture.throwing_finalizer)