summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2024-03-28 11:49:19 -0400
committerNat Goodspeed <nat@lindenlab.com>2024-03-28 11:49:19 -0400
commitba74839cd19c3b17757345ba81b1aa97c57f43d4 (patch)
tree9a2d83100662673220877799a380ddeb3769eef1 /indra/newview
parent15de45261585e8b2d89c5df9091639ecca1e20c4 (diff)
Use LLApp::setQuitting(). Expect killed-script error.
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/tests/llluamanager_test.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/indra/newview/tests/llluamanager_test.cpp b/indra/newview/tests/llluamanager_test.cpp
index 682289bd93..b907ac6619 100644
--- a/indra/newview/tests/llluamanager_test.cpp
+++ b/indra/newview/tests/llluamanager_test.cpp
@@ -430,13 +430,12 @@ namespace tut
);
LuaState L;
auto future = LLLUAmanager::startScriptLine(L, lua);
- // The problem with this test is that the LuaState is destroyed
- // (disconnecting the listener) before the LLTestApp instance mApp is
- // destroyed (sending the shutdown event). Explicitly simulate LLApp's
- // event.
- LLEventPumps::instance().obtain("LLApp").post(llsd::map("status", "quitting"));
+ // Poke LLTestApp to send its preliminary shutdown message.
+ mApp.setQuitting();
// but now we have to give the startScriptLine() coroutine a chance to run
auto [count, result] = future.get();
- ensure_equals(result.asString(), count, 0);
+ ensure_equals("killed Lua script terminated normally", count, -1);
+ ensure_equals("unexpected killed Lua script error",
+ result.asString(), "viewer is stopping");
}
} // namespace tut