From 98241f99a65f82a0af35f3d1d9e5cd4cddf4e7ab Mon Sep 17 00:00:00 2001 From: Mislav Bradac Date: Wed, 9 Aug 2017 16:10:58 +0200 Subject: [PATCH] Fix remaining falling tests in release mode Reviewers: buda, mferencevic Reviewed By: buda Subscribers: pullbot Differential Revision: https://phabricator.memgraph.io/D655 --- src/database/graph_db_accessor.hpp | 4 ++-- src/database/indexes/label_property_index.hpp | 10 +++++----- tests/concurrent/push_queue.cpp | 1 - 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/database/graph_db_accessor.hpp b/src/database/graph_db_accessor.hpp index 168c8e38a..21f0ddccb 100644 --- a/src/database/graph_db_accessor.hpp +++ b/src/database/graph_db_accessor.hpp @@ -180,8 +180,8 @@ class GraphDbAccessor { debug_assert(db_.label_property_index_.IndexExists( LabelPropertyIndex::Key(label, property)), "Label+property index doesn't exist."); - debug_assert(value.type() != PropertyValue::Type::Null, - "Can't query index for propery value type null."); + permanent_assert(value.type() != PropertyValue::Type::Null, + "Can't query index for propery value type null."); return iter::imap([this, current_state]( auto vlist) { return VertexAccessor(*vlist, *this); }, db_.label_property_index_.GetVlists( diff --git a/src/database/indexes/label_property_index.hpp b/src/database/indexes/label_property_index.hpp index ed06a6c15..a27724b4b 100644 --- a/src/database/indexes/label_property_index.hpp +++ b/src/database/indexes/label_property_index.hpp @@ -249,11 +249,11 @@ class LabelPropertyIndex { debug_assert(ready_for_use_.access().contains(key), "Index not yet ready."); auto type = [](const auto &bound) { return bound.value().value().type(); }; - debug_assert(lower || upper, "At least one bound must be provided"); - debug_assert(!lower || type(lower) != PropertyValue::Type::Null, - "Null value is not a valid index bound"); - debug_assert(!upper || type(upper) != PropertyValue::Type::Null, - "Null value is not a valid index bound"); + permanent_assert(lower || upper, "At least one bound must be provided"); + permanent_assert(!lower || type(lower) != PropertyValue::Type::Null, + "Null value is not a valid index bound"); + permanent_assert(!upper || type(upper) != PropertyValue::Type::Null, + "Null value is not a valid index bound"); // helper function for creating a bound with an IndexElement auto make_index_bound = [](const auto &optional_bound, bool bottom) { diff --git a/tests/concurrent/push_queue.cpp b/tests/concurrent/push_queue.cpp index 8a637d26e..37785611a 100644 --- a/tests/concurrent/push_queue.cpp +++ b/tests/concurrent/push_queue.cpp @@ -82,7 +82,6 @@ TEST_F(IntQueue, IteratorEnd) { EXPECT_NE(it, cpq.end()); for (int i = 0; i < 5; i++) it++; EXPECT_EQ(it, cpq.end()); - EXPECT_DEATH(*it, "Dereferencing"); } TEST_F(IntQueue, IteratorCopy) {