Visitar URL original
Merge pull request #159 from tmoonlight/codex/stabilize-release-tests… · tmoonlight/acecode@37de2bf · GitHub
Skip to content

Commit 37de2bf

Browse files
authored
Merge pull request #159 from tmoonlight/codex/stabilize-release-tests-20261024
Stabilize release checks and prepare v1.0.16
2 parents 0162476 + 8fe1c1c commit 37de2bf

4 files changed

Lines changed: 15 additions & 9 deletions

File tree

‎CMakeLists.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ if(CMAKE_HOST_WIN32 AND DEFINED CMAKE_TOOLCHAIN_FILE AND CMAKE_TOOLCHAIN_FILE MA
77
set(VCPKG_TARGET_TRIPLET "x64-windows-static" CACHE STRING "Vcpkg target triplet" FORCE)
88
endif()
99

10-
project(acecode VERSION 1.0.15 LANGUAGES C CXX)
10+
project(acecode VERSION 1.0.16 LANGUAGES C CXX)
1111

1212
include(${CMAKE_SOURCE_DIR}/cmake/acecode_source_guards.cmake)
1313

‎tests/desktop/daemon_pool_test.cpp‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#include <chrono>
1515
#include <filesystem>
1616
#include <fstream>
17+
#include <limits>
1718
#include <mutex>
1819
#include <thread>
1920
#include <vector>
@@ -444,15 +445,18 @@ TEST(DaemonPool, AttachedDaemonStopsWhenKeepAliveIsDisabled) {
444445
}
445446

446447
TEST(DaemonPool, IncompatibleManagedDaemonIsStoppedBeforeReplacementSpawn) {
448+
// A normal mock PID can belong to an unrelated process on a busy runner.
449+
const auto stopped_pid = (std::numeric_limits<int>::max)();
450+
ASSERT_FALSE(acecode::daemon::is_pid_alive(stopped_pid));
447451
auto state = std::make_shared<MockSupervisor::SharedState>();
448452
DaemonPool pool;
449453
pool.set_supervisor_factory_for_test([&] {
450454
return std::unique_ptr<IDaemonSupervisor>(new MockSupervisor(state));
451455
});
452-
pool.set_existing_daemon_probe_for_test([](const ActivateRequest&) {
456+
pool.set_existing_daemon_probe_for_test([stopped_pid](const ActivateRequest&) {
453457
ExistingDaemonProbeResult existing;
454458
existing.action = ExistingDaemonAction::Replace;
455-
existing.pid = 4242;
459+
existing.pid = stopped_pid;
456460
existing.guid = "old-guid";
457461
existing.reason = "protocol mismatch";
458462
return existing;

‎tests/web/web_server_smoke_test.cpp‎

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13510,11 +13510,13 @@ std::vector<acecode::ChatMessage> wait_for_user_messages(
1351013510
std::vector<acecode::ChatMessage> users;
1351113511
const auto deadline = std::chrono::steady_clock::now() + 10s;
1351213512
while (std::chrono::steady_clock::now() < deadline) {
13513-
users.clear();
13514-
for (const auto& message : entry.loop->messages()) {
13515-
if (acecode::is_real_user_message(message)) users.push_back(message);
13516-
}
13517-
if (users.size() >= expected_count && !entry.loop->is_busy()) break;
13513+
const bool idle = entry.loop->try_run_idle_control([&] {
13514+
users.clear();
13515+
for (const auto& message : entry.loop->messages()) {
13516+
if (acecode::is_real_user_message(message)) users.push_back(message);
13517+
}
13518+
});
13519+
if (idle && users.size() >= expected_count) break;
1351813520
std::this_thread::sleep_for(10ms);
1351913521
}
1352013522
return users;

‎vcpkg.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "acecode",
3-
"version-semver": "1.0.15",
3+
"version-semver": "1.0.16",
44
"dependencies": [
55
"cpr",
66
{

0 commit comments

Comments
 (0)