Browse Source

fix: remove build process test

legacy
Dnomd343 2 years ago
parent
commit
5c7e844457
  1. 9
      test/codec/short_code.cc

9
test/codec/short_code.cc

@ -79,24 +79,15 @@ TEST(ShortCode, DISABLED_global) {
TEST(ShortCode, speed_up) { TEST(ShortCode, speed_up) {
std::thread threads[4]; std::thread threads[4];
/// speed up to normal mode
EXPECT_EQ(BasicRanges::status(), BasicRanges::NOT_INIT);
for (auto &t : threads) { for (auto &t : threads) {
t = std::thread(ShortCode::speed_up, ShortCode::NORMAL); t = std::thread(ShortCode::speed_up, ShortCode::NORMAL);
} }
usleep(1000); // wait 1ms -> avoid mutex unlocked
EXPECT_EQ(BasicRanges::status(), BasicRanges::BUILDING);
for (auto &t : threads) { t.join(); } for (auto &t : threads) { t.join(); }
EXPECT_EQ(BasicRanges::status(), BasicRanges::AVAILABLE); EXPECT_EQ(BasicRanges::status(), BasicRanges::AVAILABLE);
/// speed up to fast mode
EXPECT_EQ(AllCases::status(), AllCases::NOT_INIT);
for (auto &t : threads) { for (auto &t : threads) {
t = std::thread(ShortCode::speed_up, ShortCode::FAST); t = std::thread(ShortCode::speed_up, ShortCode::FAST);
} }
usleep(1000); // wait 1ms -> avoid mutex unlocked
EXPECT_EQ(AllCases::status(), AllCases::BUILDING);
for (auto &t : threads) { t.join(); } for (auto &t : threads) { t.join(); }
EXPECT_EQ(AllCases::status(), AllCases::AVAILABLE); EXPECT_EQ(AllCases::status(), AllCases::AVAILABLE);
} }

Loading…
Cancel
Save