diff options
Diffstat (limited to 'testsuite/Testsrc/Testlib/TestServer/TestPlugins/TestProbes.py')
-rw-r--r-- | testsuite/Testsrc/Testlib/TestServer/TestPlugins/TestProbes.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/testsuite/Testsrc/Testlib/TestServer/TestPlugins/TestProbes.py b/testsuite/Testsrc/Testlib/TestServer/TestPlugins/TestProbes.py index 0a971c245..7673c73d2 100644 --- a/testsuite/Testsrc/Testlib/TestServer/TestPlugins/TestProbes.py +++ b/testsuite/Testsrc/Testlib/TestServer/TestPlugins/TestProbes.py @@ -477,6 +477,7 @@ text datalist = ["a", "b", "c"] probes = self.get_probes_object() + probes.core.metadata_cache_mode = 'off' client = Mock() client.hostname = "foo.example.com" probes.ReceiveData(client, datalist) @@ -485,6 +486,15 @@ text [call(client, "a"), call(client, "b"), call(client, "c")]) mock_write_data.assert_called_with(client) + self.assertFalse(probes.core.metadata_cache.expire.called) + + # change the datalist, ensure that the cache is cleared + probes.probedata[client.hostname] = ClientProbeDataSet(a=1, b=2, c=3) + probes.core.metadata_cache_mode = 'aggressive' + probes.ReceiveData(client, ['a', 'b', 'd']) + + mock_write_data.assert_called_with(client) + probes.core.metadata_cache.expire.assert_called_with(client.hostname) def test_ReceiveDataItem(self): probes = self.get_probes_object() |