Skip to content

Commit a572304

Browse files
committed
Let the snapshot wait exist in both configurations
The cases that use it are compiled in both on purpose: a case removed from the binary stays registered with CTest and reports a pass without running, so they skip in SetUp instead. Putting the helper they call behind ENABLE_ASYNC_EXPORT broke that, and six call sites failed to compile in a synchronous build. It has a stub there now, inline so that an unused static function does not trip the maintainer mode warning ratchet. Synchronous with maintainer mode builds clean and skips what it should, asynchronous passes 28 of 28, and asynchronous with maintainer mode builds with no warnings. Signed-off-by: thc1006 <84045975+thc1006@users.noreply.github.com>
1 parent 4c009c2 commit a572304

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

‎exporters/elasticsearch/test/es_log_record_exporter_test.cc‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,17 @@ bool WaitForWatermarks(logs_exporter::ElasticsearchLogRecordExporter &exporter,
298298
return false;
299299
}
300300
} // namespace
301+
#else
302+
namespace
303+
{
304+
// The cases that call this skip in SetUp when there is no wait to observe, but they are compiled
305+
// in both configurations on purpose: a case removed from the binary stays registered with CTest
306+
// and reports a pass without running. So the helper has to exist in both too.
307+
inline bool WaitForWatermarks(logs_exporter::ElasticsearchLogRecordExporter &, std::uint64_t)
308+
{
309+
return false;
310+
}
311+
} // namespace
301312
#endif // ENABLE_ASYNC_EXPORT
302313

303314
// ---------------------------------------------------------------------------

0 commit comments

Comments
 (0)