Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(20)

Unified Diff: appengine_module/gae_ts_mon/test/memcache_metric_store_test.py

Issue 1531573003: Handle multiple modifications to distribution metrics correctly. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Add a missing test for coverage Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « appengine_module/gae_ts_mon/test/deferred_metric_store_test.py ('k') | infra_libs/ts_mon/common/errors.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine_module/gae_ts_mon/test/memcache_metric_store_test.py
diff --git a/appengine_module/gae_ts_mon/test/memcache_metric_store_test.py b/appengine_module/gae_ts_mon/test/memcache_metric_store_test.py
index 6982f96da2f3b207461cc7bbf19959a8d19605f3..b013c5c07a62c712b2fc9e5e665d8158dd8708ae 100644
--- a/appengine_module/gae_ts_mon/test/memcache_metric_store_test.py
+++ b/appengine_module/gae_ts_mon/test/memcache_metric_store_test.py
@@ -2,7 +2,6 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-import operator
import random
import unittest
@@ -165,7 +164,7 @@ class MemcacheMetricStoreTest(metric_store_test.MetricStoreTestBase,
self.store.modify_multi([
metric_store.Modification(
- self.gauge_metric.name, (), 'incr', (4, operator.add))])
+ self.gauge_metric.name, (), 'incr', (4, None))])
self.assertEqual(46, self.gauge_metric.get())
@@ -173,13 +172,13 @@ class MemcacheMetricStoreTest(metric_store_test.MetricStoreTestBase,
with self.assertRaises(errors.MonitoringDecreasingValueError):
self.store.modify_multi([
metric_store.Modification(
- self.gauge_metric.name, (), 'incr', (-1, operator.add))])
+ self.gauge_metric.name, (), 'incr', (-1, None))])
def test_modify_multi_bad_type(self):
with self.assertRaises(errors.UnknownModificationTypeError):
self.store.modify_multi([
metric_store.Modification(
- self.gauge_metric.name, (), 'bad', (-1, operator.add))])
+ self.gauge_metric.name, (), 'bad', (-1, None))])
def test_modify_multi_with_fields(self):
self.store.modify_multi([
« no previous file with comments | « appengine_module/gae_ts_mon/test/deferred_metric_store_test.py ('k') | infra_libs/ts_mon/common/errors.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698