예제 #1
0
 def test_retry_transient_api_failure(self):
     avgs2 = self._get_stats(
         50, [self.alarms[0].rule['threshold'] - v for v in range(6)])
     self.client.metric.aggregation.side_effect = [
         exceptions.ClientException(500, "error"), avgs2
     ]
     self._test_retry_transient()
예제 #2
0
 def test_retry_transient_api_failure(self):
     means = self._get_stats(
         60, [self.alarms[0].rule['threshold'] - v for v in range(5)])
     self.client.metric.get_measures.side_effect = [
         exceptions.ClientException(501, "error2"), means
     ]
     self._test_retry_transient()