Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/ign-transport8' into ign-transpo…
Browse files Browse the repository at this point in the history
…rt11
  • Loading branch information
caguero committed Jul 13, 2023
2 parents 65994b2 + b3a8182 commit ab548b3
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 @@ -716,16 +716,15 @@ namespace ignition
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_IGN_TOOLS)
ruby ${CMAKE_CURRENT_SOURCE_DIR}/ign_log_record_no_overwrite.rb
)

add_test(ign_log_record_force
ruby ${CMAKE_CURRENT_SOURCE_DIR}/ign_log_record_force.rb
)
# Test disabled on Citadel
#add_test(ign_log_record_force
# ruby ${CMAKE_CURRENT_SOURCE_DIR}/ign_log_record_force.rb
#)

set_tests_properties(
ign_log_record_no_overwrite
ign_log_record_force
# Test disabled on Citadel
# ign_log_record_force
PROPERTIES
ENVIRONMENT
"IGN_CONFIG_PATH=${IGN_CONFIG_PATH};IGN_TRANSPORT_LOG_SQL_PATH=${PROJECT_SOURCE_DIR}/log/sql"
Expand Down

0 comments on commit ab548b3

Please sign in to comment.