This is an automated email from the ASF dual-hosted git repository. bcall pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git
commit 6832b58741d8ebed1bffa8b669a18c1a81b6df0f Author: Walter Karas <[email protected]> AuthorDate: Mon Nov 4 14:16:11 2019 -0600 Make MIOBufferWriter unit tests work when compiled without -DDEBUG. (cherry picked from commit 9639dddff0a30cec1769b342897c01b1c6d3c463) --- iocore/eventsystem/I_MIOBufferWriter.h | 6 ++++++ iocore/eventsystem/unit_tests/test_MIOBufferWriter.cc | 4 ---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/iocore/eventsystem/I_MIOBufferWriter.h b/iocore/eventsystem/I_MIOBufferWriter.h index 8568816..08e29a7 100644 --- a/iocore/eventsystem/I_MIOBufferWriter.h +++ b/iocore/eventsystem/I_MIOBufferWriter.h @@ -27,6 +27,12 @@ #include <iosfwd> #include "tscore/ink_assert.h" + +#if defined(UNIT_TEST_BUFFER_WRITER) +#undef ink_assert +#define ink_assert ink_release_assert +#endif + #include "tscore/BufferWriter.h" #if !defined(UNIT_TEST_BUFFER_WRITER) diff --git a/iocore/eventsystem/unit_tests/test_MIOBufferWriter.cc b/iocore/eventsystem/unit_tests/test_MIOBufferWriter.cc index 30239b3..3479946 100644 --- a/iocore/eventsystem/unit_tests/test_MIOBufferWriter.cc +++ b/iocore/eventsystem/unit_tests/test_MIOBufferWriter.cc @@ -189,12 +189,8 @@ TEST_CASE("MIOBufferWriter", "[MIOBW]") REQUIRE(bw.extent() == ((iobbIdx * BlockSize) + blockUsed)); -// These test are disabled by default because they consistently fail on FreeBSD only, and may fail on Linux flavors -// when Leif or Alan's lumbago is hurting. -#if 0 REQUIRE_THROWS_AS(bw.fill(bw.auxBufferCapacity() + 1), InkAssertExcept); REQUIRE_THROWS_AS(bw.data(), InkAssertExcept); -#endif } void
