diff options
author | Håvard Pettersen <havardpe@yahooinc.com> | 2022-09-12 12:31:16 +0000 |
---|---|---|
committer | Håvard Pettersen <havardpe@yahooinc.com> | 2022-09-12 12:45:52 +0000 |
commit | 19a095712f39cc68477321ba705010f1235bd601 (patch) | |
tree | ee54aaaf7108ecf1c4f7a2db63e0bd1e6320fb9d /vespalib/src/tests/simple_thread_bundle/simple_thread_bundle_test.cpp | |
parent | 33c97cd5a14070178a1499fb7c3abe2e00e663fa (diff) |
thread bundle now available when calculating the global filter
Diffstat (limited to 'vespalib/src/tests/simple_thread_bundle/simple_thread_bundle_test.cpp')
-rw-r--r-- | vespalib/src/tests/simple_thread_bundle/simple_thread_bundle_test.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/vespalib/src/tests/simple_thread_bundle/simple_thread_bundle_test.cpp b/vespalib/src/tests/simple_thread_bundle/simple_thread_bundle_test.cpp index 5d69a18112a..debb34724f6 100644 --- a/vespalib/src/tests/simple_thread_bundle/simple_thread_bundle_test.cpp +++ b/vespalib/src/tests/simple_thread_bundle/simple_thread_bundle_test.cpp @@ -89,6 +89,17 @@ TEST_FF("require that having too many targets fails", SimpleThreadBundle(1), Sta f2.check(Box<size_t>().add(0).add(0)); } +TEST_F("require that ThreadBundle::trivial works the same as SimpleThreadBundle(1)", State(2)) { + ThreadBundle &bundle = ThreadBundle::trivial(); + EXPECT_EQUAL(bundle.size(), 1u); + bundle.run(f.getTargets(0)); + f.check({0,0}); + bundle.run(f.getTargets(1)); + f.check({1,0}); + EXPECT_EXCEPTION(bundle.run(f.getTargets(2)), IllegalArgumentException, ""); + f.check({1,0}); +} + TEST_FF("require that bundles with multiple internal threads work", SimpleThreadBundle(3), State(3)) { f1.run(f2.getTargets(3)); f2.check(Box<size_t>().add(1).add(1).add(1)); |