Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
Signed-off-by: Aleksandr Ivanov <[email protected]>
  • Loading branch information
alexander-e1off committed Jul 23, 2024
1 parent 4a2f539 commit 2b8e06f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
16 changes: 9 additions & 7 deletions src/groups/mwc/mwcio/mwcio_ntcchannelfactory.t.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,16 @@ static const ChannelWatermarkType::Enum WAT_HIGH =
static const ChannelWatermarkType::Enum WAT_LOW =
ChannelWatermarkType::e_LOW_WATERMARK;

// Adjust attempt interval depending on the platform
#if defined(BSLS_PLATFORM_OS_SOLARIS) || defined(BSLS_PLATFORM_OS_AIX)
static const int k_ATTEMPT_INTERVAL_MS = 100;
#elif defined( \
__has_feature) // Clang-supported method for checking sanitizers.
#if __has_feature(memory_sanitizer) || __has_feature(thread_sanitizer) || __has_feature(undefined_behavior_sanitizer)
static const int k_ATTEMPT_INTERVAL_MS = 100;
#else
static const int k_ATTEMPT_INTERVAL_MS = 10;
#endif
static const int k_ATTEMPT_INTERVAL_MS =
(__has_feature(memory_sanitizer) || __has_feature(thread_sanitizer) ||
__has_feature(undefined_behavior_sanitizer))
? 100
: 10;
#elif defined(__SANITIZE_MEMORY__) || defined(__SANITIZE_THREAD__) || \
defined(__SANITIZE_UNDEFINED__)
// GCC-supported macros for checking MSAN, TSAN and UBSAN.
Expand Down Expand Up @@ -660,8 +661,9 @@ void Tester::connect(int line,

ConnectOptions reqOptions(options, s_allocator_p);

reqOptions.setAttemptInterval(
bsls::TimeInterval(0, k_ATTEMPT_INTERVAL_MS * bdlt::TimeUnitRatio::k_NS_PER_MS));
reqOptions.setAttemptInterval(bsls::TimeInterval(
0,
k_ATTEMPT_INTERVAL_MS * bdlt::TimeUnitRatio::k_NS_PER_MS));

HandleMap::iterator serverIter = d_handleMap.find(endpointOrServer);
if (serverIter != d_handleMap.end()) {
Expand Down
4 changes: 2 additions & 2 deletions src/groups/mwc/mwcma/mwcma_countingallocator.t.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,8 @@ static void test3_deallocate()
const bool skipTestForSanitizers = __has_feature(address_sanitizer) ||
__has_feature(memory_sanitizer) ||
__has_feature(thread_sanitizer);
#elif defined(__SANITIZE_ADDRESS__) || \
defined(__SANITIZE_MEMORY__ || defined(__SANITIZE_THREAD__)
#elif defined(__SANITIZE_ADDRESS__) || defined(__SANITIZE_MEMORY__) || \
defined(__SANITIZE_THREAD__)
// GCC-supported macros for checking ASAN, MSAN and TSAN.
const bool skipTestForSanitizers = true;
#else
Expand Down

0 comments on commit 2b8e06f

Please sign in to comment.