Skip to content

Commit

Permalink
Merge branch 'gz-transport12' into srmainwaring/12/node-abstract-request
Browse files Browse the repository at this point in the history
  • Loading branch information
caguero authored Jul 24, 2023
2 parents a86e517 + a1b1559 commit d6c8de2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
7 changes: 3 additions & 4 deletions include/gz/transport/Discovery.hh
Original file line number Diff line number Diff line change
Expand Up @@ -732,16 +732,15 @@ namespace gz
std::lock_guard<std::mutex> lock(this->mutex);
if (!this->initialized)
{
++this->numHeartbeatsUninitialized;
if (this->numHeartbeatsUninitialized == 2)
if (this->numHeartbeatsUninitialized == 2u)
{
// We consider the discovery initialized after two cycles of
// heartbeats sent.
// We consider discovery initialized after two heartbeat cycles.
this->initialized = true;

// Notify anyone waiting for the initialization phase to finish.
this->initializedCv.notify_all();
}
++this->numHeartbeatsUninitialized;
}

this->timeNextHeartbeat = std::chrono::steady_clock::now() +
Expand Down
11 changes: 7 additions & 4 deletions log/test/integration/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,15 @@ if (HAVE_GZ_TOOLS)
ruby ${CMAKE_CURRENT_SOURCE_DIR}/gz_log_record_no_overwrite.rb
)

add_test(gz_log_record_force
ruby ${CMAKE_CURRENT_SOURCE_DIR}/gz_log_record_force.rb
)
# Test disabled
# add_test(gz_log_record_force
# ruby ${CMAKE_CURRENT_SOURCE_DIR}/gz_log_record_force.rb
# )

set_tests_properties(
gz_log_record_no_overwrite
gz_log_record_force
# Test disabled
# gz_log_record_force
PROPERTIES
ENVIRONMENT
"GZ_CONFIG_PATH=${GZ_CONFIG_PATH};GZ_TRANSPORT_LOG_SQL_PATH=${PROJECT_SOURCE_DIR}/log/sql"
Expand Down

0 comments on commit d6c8de2

Please sign in to comment.