diff options
Diffstat (limited to 'searchlib/src/tests')
4 files changed, 8 insertions, 15 deletions
diff --git a/searchlib/src/tests/attribute/searchable/attribute_searchable_adapter_test.cpp b/searchlib/src/tests/attribute/searchable/attribute_searchable_adapter_test.cpp index 9ed08643def..c7dde172b9d 100644 --- a/searchlib/src/tests/attribute/searchable/attribute_searchable_adapter_test.cpp +++ b/searchlib/src/tests/attribute/searchable/attribute_searchable_adapter_test.cpp @@ -520,7 +520,7 @@ TEST("require that attribute parallel wand works") { } else { fprintf(stderr, " (fast_search: %s, strict: %s)\n", as_str(fast_search), as_str(strict)); - assert(false); + LOG_ABORT("should not reach here"); } } } diff --git a/searchlib/src/tests/diskindex/pagedict4/pagedict4_hugeword_cornercase_test.cpp b/searchlib/src/tests/diskindex/pagedict4/pagedict4_hugeword_cornercase_test.cpp index ea0f769cc51..8fb0e48663c 100644 --- a/searchlib/src/tests/diskindex/pagedict4/pagedict4_hugeword_cornercase_test.cpp +++ b/searchlib/src/tests/diskindex/pagedict4/pagedict4_hugeword_cornercase_test.cpp @@ -128,8 +128,7 @@ PostingListCounts makeCounts(uint32_t wantLen) return counts2; } } - LOG(info, "Could not calculate counts with wanted compressed length"); - LOG_ABORT("should not be reached"); + LOG_ABORT("Could not calculate counts with wanted compressed length"); } using StartOffset = search::bitcompression::PageDict4StartOffset; diff --git a/searchlib/src/tests/util/ioerrorhandler/ioerrorhandler_test.cpp b/searchlib/src/tests/util/ioerrorhandler/ioerrorhandler_test.cpp index aaa2a138353..fb1c1a356f6 100644 --- a/searchlib/src/tests/util/ioerrorhandler/ioerrorhandler_test.cpp +++ b/searchlib/src/tests/util/ioerrorhandler/ioerrorhandler_test.cpp @@ -213,8 +213,7 @@ TEST_F("Test that ioerror handler can process read error", Fixture) injectErrno = EIO; injectreadErrnoTrigger = 1; f.file->ReadBuf(buf, fileSize); - LOG(error, "Should never get here"); - LOG_ABORT("should not be reached"); + LOG_ABORT("Should never get here"); } catch (std::runtime_error &e) { LOG(info, "Caught std::runtime_error exception: %s", e.what()); EXPECT_TRUE(strstr(e.what(), "Input/output error") != nullptr); @@ -253,8 +252,7 @@ TEST_F("Test that ioerror handler can process pread error", Fixture) injectErrno = EIO; injectpreadErrnoTrigger = 1; f.file->ReadBuf(buf, fileSize, 0); - LOG(error, "Should never get here"); - LOG_ABORT("should not be reached"); + LOG_ABORT("Should never get here"); } catch (std::runtime_error &e) { LOG(info, "Caught std::runtime_error exception: %s", e.what()); EXPECT_TRUE(strstr(e.what(), "Input/output error") != nullptr); @@ -287,8 +285,7 @@ TEST_F("Test that ioerror handler can process write error", Fixture) injectErrno = EIO; injectwriteErrnoTrigger = 1; f.writeTestString(); - LOG(error, "Should never get here"); - LOG_ABORT("should not be reached"); + LOG_ABORT("Should never get here"); } catch (std::runtime_error &e) { LOG(info, "Caught std::runtime_error exception: %s", e.what()); EXPECT_TRUE(strstr(e.what(), "Input/output error") != nullptr); @@ -322,8 +319,7 @@ TEST_F("Test that ioerror handler can process pwrite error", Fixture) injectErrno = EIO; injectpwriteErrnoTrigger = 1; f.writeTestString(); - LOG(error, "Should never get here"); - LOG_ABORT("should not be reached"); + LOG_ABORT("Should never get here"); } catch (std::runtime_error &e) { LOG(info, "Caught std::runtime_error exception: %s", e.what()); EXPECT_TRUE(strstr(e.what(), "Input/output error") != nullptr); diff --git a/searchlib/src/tests/util/sigbushandler/sigbushandler_test.cpp b/searchlib/src/tests/util/sigbushandler/sigbushandler_test.cpp index 1253cab4a74..658ad17544a 100644 --- a/searchlib/src/tests/util/sigbushandler/sigbushandler_test.cpp +++ b/searchlib/src/tests/util/sigbushandler/sigbushandler_test.cpp @@ -63,8 +63,7 @@ TEST("Test that sigbus handler can trap synthetic sigbus") if (sigsetjmp(sjb, 1) == 0) { sbh.setUnwind(&sjb); kill(getpid(), SIGBUS); - LOG(error, "Should never get here"); - LOG_ABORT("should not be reached"); + LOG_ABORT("Should never get here"); } EXPECT_TRUE(sbh.fired()); { @@ -100,8 +99,7 @@ TEST("Test that sigbus handler can trap normal sigbus") if (sigsetjmp(sjb, 1) == 0) { sbh.setUnwind(&sjb); r = *p; - LOG(error, "Should never get here"); - LOG_ABORT("should not be reached"); + LOG_ABORT("Should never get here"); } EXPECT_TRUE(sbh.fired()); EXPECT_TRUE(r == '\0'); |