aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore/src/tests/proton/documentdb/move_operation_limiter/move_operation_limiter_test.cpp
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2021-01-28 09:30:29 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2021-01-28 09:30:29 +0000
commit13683b888b5de3801ab1ea3b539949770c4536af (patch)
tree2c9f6765d2551a104004f9757ac11b006fa0a22b /searchcore/src/tests/proton/documentdb/move_operation_limiter/move_operation_limiter_test.cpp
parentcb12512769744892ec7416f4548697c3d21d0af6 (diff)
In order to ensure that lid stats are sampled at the right time ensure that you do it the *next* time you are in the
master thread. This is to ensure that the sync call has taken effect. This also keep the iterator creation logic in one method enhancing readability.
Diffstat (limited to 'searchcore/src/tests/proton/documentdb/move_operation_limiter/move_operation_limiter_test.cpp')
-rw-r--r--searchcore/src/tests/proton/documentdb/move_operation_limiter/move_operation_limiter_test.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/searchcore/src/tests/proton/documentdb/move_operation_limiter/move_operation_limiter_test.cpp b/searchcore/src/tests/proton/documentdb/move_operation_limiter/move_operation_limiter_test.cpp
index 92ec0d6185b..eaad2ac2576 100644
--- a/searchcore/src/tests/proton/documentdb/move_operation_limiter/move_operation_limiter_test.cpp
+++ b/searchcore/src/tests/proton/documentdb/move_operation_limiter/move_operation_limiter_test.cpp
@@ -54,6 +54,15 @@ struct Fixture {
}
};
+TEST_F("require that hasPending reflects if any jobs are outstanding", Fixture)
+{
+ EXPECT_FALSE(f.limiter->hasPending());
+ f.beginOp();
+ EXPECT_TRUE(f.limiter->hasPending());
+ f.endOp();
+ EXPECT_FALSE(f.limiter->hasPending());
+}
+
TEST_F("require that job is blocked / unblocked when crossing max outstanding ops boundaries", Fixture)
{
f.beginOp();