未验证 提交 67c78083 编写于 作者: L liyuqian 提交者: GitHub

Remove persistent cache unittest timeout (#13091)

This fixes https://github.com/flutter/flutter/issues/42465
上级 d9d92a56
......@@ -36,6 +36,11 @@ TEST_F(ShellTest, CacheSkSLWorks) {
auto settings = CreateSettingsForFixture();
settings.cache_sksl = true;
settings.dump_skp_on_shader_compilation = true;
fml::AutoResetWaitableEvent firstFrameLatch;
settings.frame_rasterized_callback =
[&firstFrameLatch](const FrameTiming& t) { firstFrameLatch.Signal(); };
auto sksl_config = RunConfiguration::InferFromSettings(settings);
sksl_config.SetEntrypoint("emptyMain");
std::unique_ptr<Shell> shell = CreateShell(settings);
......@@ -55,9 +60,7 @@ TEST_F(ShellTest, CacheSkSLWorks) {
root->Add(physical_shape_layer);
};
PumpOneFrame(shell.get(), 100, 100, builder);
fml::Status result =
shell->WaitForFirstFrame(fml::TimeDelta::FromMilliseconds(1000));
ASSERT_TRUE(result.ok());
firstFrameLatch.Wait();
WaitForIO(shell.get());
// Some skp should be dumped due to shader compilations.
......@@ -88,9 +91,9 @@ TEST_F(ShellTest, CacheSkSLWorks) {
shell = CreateShell(settings);
PlatformViewNotifyCreated(shell.get());
RunEngine(shell.get(), std::move(normal_config));
firstFrameLatch.Reset();
PumpOneFrame(shell.get(), 100, 100, builder);
result = shell->WaitForFirstFrame(fml::TimeDelta::FromMilliseconds(1000));
ASSERT_TRUE(result.ok());
firstFrameLatch.Wait();
WaitForIO(shell.get());
// To check that all shaders are precompiled, verify that no new skp is dumped
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册