Skip to content

Commit 897d2c9

Browse files
committed
FIX: Fix stuck tests
1 parent d0b2158 commit 897d2c9

File tree

4 files changed

+5
-6
lines changed

4 files changed

+5
-6
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ else()
137137
FetchContent_MakeAvailable(json)
138138
endif()
139139
# cpp-httplib
140-
set(httplib_version 0.12.2)
140+
set(httplib_version 0.11.4)
141141
if(${PROJECT_NAME_UPPERCASE}_USE_EXTERNAL_HTTPLIB)
142142
find_package(httplib ${httplib_version} REQUIRED)
143143
else()

scripts/test.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
#! /usr/bin/env bash
2-
build/test/databentoTests
2+
cd build
3+
ctest --timeout 300 --output-on-failure --tests-regex databentoTests

test/src/live_blocking_tests.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,9 +266,8 @@ TEST_F(LiveBlockingTests, TestStop) {
266266
}
267267
const std::string rec_str{reinterpret_cast<const char*>(&kRec),
268268
sizeof(kRec)};
269-
while (self.UncheckedSend(rec_str) <
269+
while (self.UncheckedSend(rec_str) ==
270270
static_cast<::ssize_t>(rec_str.size())) {
271-
return;
272271
}
273272
}}};
274273

test/src/live_threaded_tests.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,9 @@ TEST_F(LiveThreadedTests, TestStop) {
126126
while (call_count < 1) {
127127
std::this_thread::yield();
128128
}
129-
std::this_thread::sleep_for(std::chrono::milliseconds{50});
130129
const std::string rec_str{reinterpret_cast<const char*>(&kRec),
131130
sizeof(kRec)};
132-
while (self.UncheckedSend(rec_str) <
131+
while (self.UncheckedSend(rec_str) ==
133132
static_cast<::ssize_t>(rec_str.size())) {
134133
}
135134
}}};

0 commit comments

Comments
 (0)