diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2020-01-03 10:47:26 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2020-01-03 10:47:26 +0000 |
commit | c1b1440c4eb7d997a4ed8bc07a6e18b9e09007c2 (patch) | |
tree | c45023a71a228761c3d6da014e7a9ad2f4eb32de | |
parent | e549978610aa127df17492d80d892742de6fd479 (diff) |
Update tests after changing how executors are selected.
-rw-r--r-- | searchcore/src/tests/proton/attribute/attribute_test.cpp | 10 | ||||
-rw-r--r-- | searchlib/src/tests/common/sequencedtaskexecutor/sequencedtaskexecutor_test.cpp | 10 |
2 files changed, 8 insertions, 12 deletions
diff --git a/searchcore/src/tests/proton/attribute/attribute_test.cpp b/searchcore/src/tests/proton/attribute/attribute_test.cpp index 3da27cde10e..2d75bb8906b 100644 --- a/searchcore/src/tests/proton/attribute/attribute_test.cpp +++ b/searchcore/src/tests/proton/attribute/attribute_test.cpp @@ -9,8 +9,6 @@ #include <vespa/document/update/documentupdate.h> #include <vespa/eval/tensor/tensor.h> #include <vespa/eval/tensor/default_tensor_engine.h> -#include <vespa/eval/tensor/types.h> -#include <vespa/fastos/file.h> #include <vespa/searchcommon/attribute/attributecontent.h> #include <vespa/searchcore/proton/attribute/attribute_collection_spec_factory.h> #include <vespa/searchcore/proton/attribute/attribute_writer.h> @@ -22,13 +20,11 @@ #include <vespa/searchcore/proton/test/attribute_utils.h> #include <vespa/searchcorespi/flush/iflushtarget.h> #include <vespa/searchlib/attribute/attributefactory.h> -#include <vespa/searchlib/attribute/attributevector.hpp> #include <vespa/searchlib/attribute/bitvector_search_cache.h> #include <vespa/searchlib/attribute/imported_attribute_vector.h> #include <vespa/searchlib/attribute/imported_attribute_vector_factory.h> #include <vespa/searchlib/attribute/integerbase.h> #include <vespa/searchlib/attribute/predicate_attribute.h> -#include <vespa/searchlib/attribute/singlenumericattribute.hpp> #include <vespa/searchlib/common/foregroundtaskexecutor.h> #include <vespa/searchlib/common/idestructorcallback.h> #include <vespa/searchlib/common/sequencedtaskexecutorobserver.h> @@ -38,13 +34,15 @@ #include <vespa/searchlib/predicate/predicate_index.h> #include <vespa/searchlib/tensor/tensor_attribute.h> #include <vespa/searchlib/test/directory_handler.h> -#include <vespa/searchlib/util/filekit.h> #include <vespa/vespalib/io/fileutil.h> #include <vespa/vespalib/util/exceptions.h> #include <vespa/vespalib/test/insertion_operators.h> #include <vespa/vespalib/testkit/testapp.h> #include <vespa/searchcommon/attribute/iattributevector.h> #include <vespa/vespalib/btree/btreeroot.hpp> +#include <vespa/searchlib/attribute/singlenumericattribute.hpp> + + #include <vespa/log/log.h> LOG_SETUP("attribute_test"); @@ -751,7 +749,7 @@ TEST_F("require that attribute writer spreads write over 2 write contexts", Fixt TEST_DO(putAttributes(f, {0, 1})); } -TEST_F("require that attribute writer spreads write over 3 write contexts", Fixture(8)) +TEST_F("require that attribute writer spreads write over 3 write contexts", Fixture(3)) { TEST_DO(putAttributes(f, {0, 1, 2})); } diff --git a/searchlib/src/tests/common/sequencedtaskexecutor/sequencedtaskexecutor_test.cpp b/searchlib/src/tests/common/sequencedtaskexecutor/sequencedtaskexecutor_test.cpp index f8ab03d7710..77caf535405 100644 --- a/searchlib/src/tests/common/sequencedtaskexecutor/sequencedtaskexecutor_test.cpp +++ b/searchlib/src/tests/common/sequencedtaskexecutor/sequencedtaskexecutor_test.cpp @@ -101,7 +101,7 @@ TEST_F("require that task with different component ids are not serialized", Fixt std::shared_ptr<TestObj> tv(std::make_shared<TestObj>()); EXPECT_EQUAL(0, tv->_val); f._threads.execute(0, [=]() { usleep(2000); tv->modify(0, 14); }); - f._threads.execute(2, [=]() { tv->modify(14, 42); }); + f._threads.execute(1, [=]() { tv->modify(14, 42); }); tv->wait(2); if (tv->_fail != 1) { continue; @@ -173,16 +173,14 @@ vespalib::string makeAltComponentId(Fixture &f) } -TEST_F("require that task with different string component ids are not serialized", - Fixture) +TEST_F("require that task with different string component ids are not serialized", Fixture) { - int tryCnt = detectSerializeFailure(f, "2", 100); + int tryCnt = detectSerializeFailure(f, "1", 100); EXPECT_TRUE(tryCnt < 100); } -TEST_F("require that task with different string component ids mapping to the same executor id are serialized", - Fixture) +TEST_F("require that task with different string component ids mapping to the same executor id are serialized", Fixture) { vespalib::string altComponentId = makeAltComponentId(f); LOG(info, "second string component id is \"%s\"", altComponentId.c_str()); |