MCPcopy Create free account
hub / github.com/Snapchat/Valdi / waitForNextRenderRequest

Method waitForNextRenderRequest

valdi/test/integration/RuntimeTestsUtils.cpp:163–175  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

161}
162
163void RuntimeWrapper::waitForNextRenderRequest() {
164 auto totalRenderCount = runtimeListener->numberOfRenders + 1;
165 auto str = fmt::format("Waiting for next render, total render count {}", totalRenderCount);
166 logger->log(Valdi::LogTypeInfo, str);
167 try {
168 mainQueue->runUntilTrue(str.c_str(),
169 [&]() -> bool { return runtimeListener->numberOfRenders == totalRenderCount; });
170 } catch (const Valdi::Exception& exc) {
171 VALDI_ERROR(
172 *logger, "Failed to wait for {} renders, reached {}", totalRenderCount, runtimeListener->numberOfRenders);
173 throw exc;
174 }
175}
176
177// Replace a resource from another existing resource to test hot reloading.
178Result<Void> RuntimeWrapper::hotReload(const char* sourceResourcePath, const char* destResourcePath) {

Callers 1

TEST_PFunction · 0.80

Calls 2

runUntilTrueMethod · 0.80
logMethod · 0.65

Tested by

no test coverage detected