Skip to content

Commit 254bccd

Browse files
committed
wait a bit longer and produce less
for slow machines (ci, i5)
1 parent cc4624b commit 254bccd

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/test/simple_api_test.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ TEST_CASE_METHOD(simple_connected_test, "inserting values using the simple api w
140140
db.insert(line("test_timestamp", key_value_pairs("a1", "b2"), key_value_pairs("c3", "d4"), dummy));
141141
dummy.stamp = "97553045000000000"; //1973-02-03
142142
db.insert(line("test_timestamp", key_value_pairs("e1", "f2"), key_value_pairs("g3", "h4"), dummy));
143-
143+
144144
wait_for([] {return false; }, 3);
145145

146146
auto res = result("test_timestamp");
@@ -157,10 +157,10 @@ SCENARIO_METHOD(simple_connected_test, "more than 1000 inserts per second") {
157157
GIVEN("A connection to the db") {
158158
influxdb::async_api::simple_db asyncdb("http://localhost:8086", db_name);
159159
using Clock = std::chrono::high_resolution_clock;
160-
auto many_times = 123456_times;
160+
auto many_times = 111000_times;
161161

162162
//https://www.influxdata.com/influxdb-1-1-released-with-up-to-60-performance-increase-and-new-query-functionality/
163-
const int MAX_VALUES_PER_TAG = 100000;
163+
const int MAX_VALUES_PER_TAG = 50000; //actually, 100000
164164

165165
WHEN("I send a large number of unique entries") {
166166
auto t1 = Clock::now();
@@ -183,7 +183,7 @@ SCENARIO_METHOD(simple_connected_test, "more than 1000 inserts per second") {
183183
AND_THEN("All entries arrive at the database") {
184184
// wait for asynchronous fill
185185
auto query = std::string("select count(*) from ") + db_name + "..asynctest";
186-
wait_for([this, query, many_times] { return raw_db.get(query).find(std::to_string(many_times.count)) != std::string::npos; }, 100);
186+
wait_for([this, query, many_times] { return raw_db.get(query).find(std::to_string(many_times.count)) != std::string::npos; }, 200);
187187
bool all_entries_arrived = raw_db.get(query).find(std::to_string(many_times.count)) != std::string::npos;
188188

189189
CHECK(all_entries_arrived);

0 commit comments

Comments
 (0)