Skip to content

Commit 571ff23

Browse files
committed
a
1 parent 96b5e73 commit 571ff23

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

common/test/test_throttle.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
#include "../../test/gtest.h"
1111
#include "../../test/ci-tools.h"
1212

13-
/*
1413
TEST(Throttle, basic) {
1514
// baseline
1615
uint64_t total = 10UL * 1024 * 1024;
@@ -110,7 +109,6 @@ TEST(Throttle, pulse) {
110109
EXPECT_GT((uint64_t) duration.count(), 9UL * 1000 * 1000);
111110
EXPECT_LT((uint64_t) duration.count(), 20UL * 1000 * 1000);
112111
}
113-
*/
114112

115113
template <typename IDLE>
116114
void test_with_idle(IDLE&& idle) {
@@ -134,7 +132,7 @@ void test_with_idle(IDLE&& idle) {
134132
EXPECT_LT((uint64_t) duration.count(), 2UL * 1000 * 1000);
135133
}
136134

137-
/*TEST(Throttle, no_sleep) {
135+
TEST(Throttle, no_sleep) {
138136
test_with_idle([] {});
139137
}
140138

@@ -165,7 +163,7 @@ TEST(Throttle, try_consume) {
165163
LOG_INFO("Act ` times in 10 sec, prevent ` acts", DEC(count).comma(true),
166164
DEC(failure).comma(true));
167165
EXPECT_LT(count, 11000UL);
168-
}*/
166+
}
169167

170168
////////////////////////////////////////
171169
// The sleep and semaphore in macOS is less efficient and always cause variance, so skip macOS
@@ -220,15 +218,15 @@ TEST_P(FindAppropriateSliceNumTest, run) {
220218
#define INSTANTIATE_TEST_P INSTANTIATE_TEST_CASE_P
221219
#endif
222220

223-
/*INSTANTIATE_TEST_P(Throttle,
221+
INSTANTIATE_TEST_P(Throttle,
224222
FindAppropriateSliceNumTest, testing::Values(
225223
FindAppropriateSliceNumSuite{10, 0.01},
226224
FindAppropriateSliceNumSuite{50, 0.02},
227225
FindAppropriateSliceNumSuite{100, 0.03},
228226
FindAppropriateSliceNumSuite{500, 0.08},
229227
FindAppropriateSliceNumSuite{1000, 0.08},
230228
FindAppropriateSliceNumSuite{5000, 0.85} // Unacceptable
231-
));*/
229+
));
232230

233231
////////////////////////////////////////
234232

0 commit comments

Comments
 (0)