feat delete log
Some checks failed
android / build (push) Successful in 1m37s
linux-arm-gcc / linux-gcc-arm (Release) (push) Failing after 2m24s
linux-aarch64-cpu-gcc / linux-gcc-aarch64 (Release) (push) Failing after 4m20s
linux-arm-gcc / linux-gcc-arm (Debug) (push) Failing after 4m37s
linux-mips-gcc / linux-gcc-mipsel (Release) (push) Failing after 3m45s
linux-mips-gcc / linux-gcc-mipsel (Debug) (push) Failing after 5m21s
linux-mips64-gcc / linux-gcc-mips64el (Debug) (push) Failing after 3m2s
linux-aarch64-cpu-gcc / linux-gcc-aarch64 (Debug) (push) Failing after 5m37s
linux-x64-gcc / linux-gcc (Debug) (push) Failing after 2m6s
linux-mips64-gcc / linux-gcc-mips64el (Release) (push) Failing after 3m24s
linux-x64-gcc / linux-gcc (Release) (push) Successful in 2m15s
linux-arm-gcc / linux-gcc-armhf (Release) (push) Failing after 9m3s
linux-riscv64-gcc / linux-gcc-riscv64 (Release) (push) Failing after 3m59s
linux-arm-gcc / linux-gcc-armhf (Debug) (push) Failing after 10m46s
linux-riscv64-gcc / linux-gcc-riscv64 (Debug) (push) Failing after 6m23s
linux-x86-gcc / linux-gcc (Debug) (push) Successful in 6m8s
linux-x86-gcc / linux-gcc (Release) (push) Successful in 5m21s

This commit is contained in:
tqcq 2024-06-11 22:22:29 +08:00
parent 7321310b1f
commit 2a09d4cef7

View File

@ -7,7 +7,7 @@ namespace fiber {
namespace detail {
TEST(Fiber, Base) {
constexpr auto kMaxCnt = 5000;
constexpr auto kMaxCnt = 5000000;
int cnt = 0;
// 0 -> master fiber
@ -24,16 +24,14 @@ TEST(Fiber, Base) {
ASSERT_EQ(Fiber::Current(), fibers[i].get());
++cnt;
Fiber::MasterFiber()->Resume();
TILE_LOG_INFO("worke cnt: {}", cnt);
}
}));
}
while (cnt < kMaxCnt) {
int old = cnt;
auto next_fiber = fibers[Random(1, 1)].get();
auto next_fiber = fibers[Random(1, 9)].get();
TILE_LOG_INFO("cnt: {}", cnt);
next_fiber->Resume();
ASSERT_EQ(old + 1, cnt);
ASSERT_EQ(Fiber::Current(), Fiber::MasterFiber());