From 6f879178d6c8ec7c6a9d4fdb3f42664dea595a0a Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Thu, 19 Sep 2019 16:36:41 -0400 Subject: DRTVWR-476: Re-enable an llcoproceduremanager_test case. Use new Sync class to make the driving logic wait for the coprocedure to run. --- indra/llmessage/tests/llcoproceduremanager_test.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'indra/llmessage/tests/llcoproceduremanager_test.cpp') diff --git a/indra/llmessage/tests/llcoproceduremanager_test.cpp b/indra/llmessage/tests/llcoproceduremanager_test.cpp index f2de547452..734b986f80 100644 --- a/indra/llmessage/tests/llcoproceduremanager_test.cpp +++ b/indra/llmessage/tests/llcoproceduremanager_test.cpp @@ -40,6 +40,7 @@ #include #include "../test/lltut.h" +#include "../test/sync.h" #if LL_WINDOWS @@ -83,19 +84,18 @@ namespace tut template<> template<> void coproceduremanager_object_t::test<1>() { - // TODO: fix me. timing issues.the coproc gets executed after a frame, access violation in release - - /* + Sync sync; int foo = 0; LLUUID queueId = LLCoprocedureManager::instance().enqueueCoprocedure("PoolName", "ProcName", - [&foo] (LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t & ptr, const LLUUID & id) { + [&foo, &sync] (LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t & ptr, const LLUUID & id) { + sync.bump(); foo = 1; }); - ensure_equals("coprocedure failed to update foo", foo, 1); + sync.yield(); + ensure_equals("coprocedure failed to update foo", foo, 1); LLCoprocedureManager::instance().close("PoolName"); - */ } template<> template<> -- cgit v1.2.3