Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 196af8d

Browse files
committed
The builder machine is too fast.
1 parent 326a7cb commit 196af8d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

shell/common/shell_unittests.cc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@
55
#define FML_USED_ON_EMBEDDER
66

77
#include <algorithm>
8+
#include <chrono>
89
#include <ctime>
910
#include <future>
1011
#include <memory>
12+
#include <thread>
1113
#include <utility>
1214
#include <vector>
1315

@@ -51,6 +53,8 @@
5153
#include "flutter/vulkan/vulkan_application.h" // nogncheck
5254
#endif
5355

56+
using namespace std::chrono_literals;
57+
5458
// CREATE_NATIVE_ENTRY is leaky by design
5559
// NOLINTBEGIN(clang-analyzer-core.StackAddressEscape)
5660

@@ -733,6 +737,9 @@ TEST_F(ShellTest, FrameRasterizedCallbackIsCalled) {
733737
auto settings = CreateSettingsForFixture();
734738
std::unique_ptr<Shell> shell = CreateShell(settings);
735739

740+
// Wait to make |start| bigger than zero
741+
std::this_thread::sleep_for(1ms);
742+
736743
// We MUST put |start| after |CreateShell()| because the clock source will be
737744
// reset through |TimePoint::SetClockSource()| in
738745
// |DartVMInitializer::Initialize()| within |CreateShell()|.

0 commit comments

Comments
 (0)