diff options
author | Arne H Juul <arnej@yahoo-inc.com> | 2016-11-24 13:19:22 +0100 |
---|---|---|
committer | Arne H Juul <arnej@yahoo-inc.com> | 2016-11-24 13:19:22 +0100 |
commit | e588e18328aee27885d9431ab0e3e854d4f35275 (patch) | |
tree | 730a1548f5eb3a6412a7c83d440fdc04788eb777 /searchcore/src/tests/proton/server/disk_mem_usage_filter/disk_mem_usage_filter_test.cpp | |
parent | 28fca4aa18acb37ab9d242eb3edf5d8bfbd10c8f (diff) |
also count number of memory mapped areas
Diffstat (limited to 'searchcore/src/tests/proton/server/disk_mem_usage_filter/disk_mem_usage_filter_test.cpp')
-rw-r--r-- | searchcore/src/tests/proton/server/disk_mem_usage_filter/disk_mem_usage_filter_test.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/searchcore/src/tests/proton/server/disk_mem_usage_filter/disk_mem_usage_filter_test.cpp b/searchcore/src/tests/proton/server/disk_mem_usage_filter/disk_mem_usage_filter_test.cpp index 70e559e2d23..148ea5d8a43 100644 --- a/searchcore/src/tests/proton/server/disk_mem_usage_filter/disk_mem_usage_filter_test.cpp +++ b/searchcore/src/tests/proton/server/disk_mem_usage_filter/disk_mem_usage_filter_test.cpp @@ -25,7 +25,8 @@ struct Fixture _filter.setMemoryStats(vespalib::ProcessMemoryStats(10000000, 10000001, 10000002, - 10000003)); + 10000003, + 42)); } void testWrite(const vespalib::string &exp) { @@ -51,7 +52,8 @@ struct Fixture _filter.setMemoryStats(vespalib::ProcessMemoryStats(58720259, 58720258, 58720257, - 58720256)); + 58720256, + 43)); } }; @@ -62,6 +64,12 @@ TEST_F("Check that default filter allows write", Fixture) f.testWrite(""); } +TEST_F("Check that stats are wired through", Fixture) +{ + EXPECT_EQUAL(42, f._filter.getMemoryStats().getMappingsCount()); + f.triggerMemoryLimit(); + EXPECT_EQUAL(43, f._filter.getMemoryStats().getMappingsCount()); +} TEST_F("Check that disk limit can be reached", Fixture) { |