diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2020-02-27 16:43:55 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2020-02-27 16:49:17 +0000 |
commit | 752ced912014457c04d2c3670fd7d8b9eda49fa7 (patch) | |
tree | 404a21f60b4df37a1d4e718096eed971bf7522bc /searchcore/src/tests/proton/attribute/exclusive_attribute_read_accessor/exclusive_attribute_read_accessor_test.cpp | |
parent | dda41637e506d6f0fdf88f875350adab2743bd1d (diff) |
Add getStats and setTaskLimit to interface to make it easy to swap implementation.
Also make do with ISequenceHandlerInterface.
Diffstat (limited to 'searchcore/src/tests/proton/attribute/exclusive_attribute_read_accessor/exclusive_attribute_read_accessor_test.cpp')
-rw-r--r-- | searchcore/src/tests/proton/attribute/exclusive_attribute_read_accessor/exclusive_attribute_read_accessor_test.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/searchcore/src/tests/proton/attribute/exclusive_attribute_read_accessor/exclusive_attribute_read_accessor_test.cpp b/searchcore/src/tests/proton/attribute/exclusive_attribute_read_accessor/exclusive_attribute_read_accessor_test.cpp index 420e18db5af..d2eba28bc9b 100644 --- a/searchcore/src/tests/proton/attribute/exclusive_attribute_read_accessor/exclusive_attribute_read_accessor_test.cpp +++ b/searchcore/src/tests/proton/attribute/exclusive_attribute_read_accessor/exclusive_attribute_read_accessor_test.cpp @@ -24,13 +24,13 @@ createAttribute() struct Fixture { AttributeVector::SP attribute; - SequencedTaskExecutor writer; + std::unique_ptr<ISequencedTaskExecutor> writer; ExclusiveAttributeReadAccessor accessor; Fixture() : attribute(createAttribute()), - writer(1), - accessor(attribute, writer) + writer(SequencedTaskExecutor::create(1)), + accessor(attribute, *writer) {} }; @@ -38,7 +38,7 @@ TEST_F("require that attribute write thread is blocked while guard is held", Fix { ReadGuard::UP guard = f.accessor.takeGuard(); Gate gate; - f.writer.execute(f.writer.getExecutorId(f.attribute->getNamePrefix()), [&gate]() { gate.countDown(); }); + f.writer->execute(f.writer->getExecutorId(f.attribute->getNamePrefix()), [&gate]() { gate.countDown(); }); bool reachedZero = gate.await(100); EXPECT_FALSE(reachedZero); EXPECT_EQUAL(1u, gate.getCount()); |