Skip to content

Commit

Permalink
supriya review
Browse files Browse the repository at this point in the history
  • Loading branch information
Bill Prin committed Sep 28, 2016
1 parent e80a315 commit 9abf110
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions system_tests/monitoring.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@


class TestMonitoring(unittest.TestCase):

def test_fetch_metric_descriptor(self):
METRIC_TYPE = (
'pubsub.googleapis.com/topic/send_message_operation_count')
Expand Down Expand Up @@ -159,7 +158,7 @@ def test_query(self):
query = client.query(METRIC_TYPE, hours=1)
# There may be no data, but we can ask anyway.
for _ in query:
pass # Not necessarily reached.
pass # Not necessarily reached.

def test_create_and_delete_metric_descriptor(self):
METRIC_TYPE = ('custom.googleapis.com/tmp/system_test_example' +
Expand Down Expand Up @@ -203,7 +202,7 @@ def test_write_point(self):
retry_500(client.write_point)(metric, resource, VALUE)

MAX_RETRIES = 7

# need to wrap built-in function for decorators to work
def list_timeseries(query):
return list(query)
Expand All @@ -212,7 +211,6 @@ def _has_timeseries(results):
return len(results) > 0

endtime = datetime.datetime.utcnow()
endtime += datetime.timedelta(minutes=1)
query = client.query(METRIC_TYPE, end_time=endtime, minutes=5)

retry_result = RetryResult(_has_timeseries, max_tries=MAX_RETRIES)(
Expand Down

0 comments on commit 9abf110

Please sign in to comment.