20 #include <ripple/beast/unit_test.h>
21 #include <ripple/core/JobQueue.h>
22 #include <test/jtx/Env.h>
36 JobQueue& jQueue = env.app().getJobQueue();
45 while (jobRan ==
false)
52 using namespace std::chrono_literals;
71 JobQueue& jQueue = env.app().getJobQueue();
79 while (++yieldCount < 4)
82 BEAST_EXPECT(coro !=
nullptr);
85 while (yieldCount == 0)
90 while (coro->runnable())
92 BEAST_EXPECT(coro->post());
93 while (old == yieldCount)
97 BEAST_EXPECT(++old == yieldCount);
99 BEAST_EXPECT(yieldCount == 4);
108 while (++yieldCount < 4)
123 int old = yieldCount;
124 while (coro->runnable())
127 BEAST_EXPECT(++old == yieldCount);
129 BEAST_EXPECT(yieldCount == 4);
135 using namespace std::chrono_literals;
148 BEAST_EXPECT(coro ==
nullptr);