Example #1
0
 /**
  * Test retry policy - noRetry
  */
 public function testNoRetry()
 {
     $this->_executedRetries = 0;
     $policy = Zend_Service_WindowsAzure_RetryPolicy_AbstractRetryPolicy::noRetry();
     $retries = $policy->execute(array($this, '_countRetries'));
     $this->assertEquals(1, $retries);
 }
Example #2
0
 /**
  * Set retry policy to use when making requests
  *
  * @param Zend_Service_WindowsAzure_RetryPolicy_AbstractRetryPolicy $retryPolicy Retry policy to use when making requests
  */
 public function setRetryPolicy(Zend_Service_WindowsAzure_RetryPolicy_AbstractRetryPolicy $retryPolicy = null)
 {
     $this->_retryPolicy = $retryPolicy;
     if ($this->_retryPolicy === null) {
         $this->_retryPolicy = Zend_Service_WindowsAzure_RetryPolicy_AbstractRetryPolicy::noRetry();
     }
 }