ZF-11137: Zend_Service_Amazon_SimpleDb_OnlineTest needs to wait/sleep more often


Some additional sleeps should be added to avoid errors like:

1)Zend_Service_Amazon_SimpleDb_OnlineTest::testGetAttributes Zend_Service_Amazon_SimpleDb_Exception: Service AmazonSimpleDB is currently unavailable. Please try again later

Related AWS forum thread:…

Goals: - Tests runs that are slower but with less false negatives. - Avoid manual clean up cause by unexpected errors. E.g. testListDomains() is sensitive to the total number of test domains. But if cases die before they can clean up the domains they know about, we leave garbage behind for the next run.


bq. "Avoid manual clean up [...] testListDomains [...]"

My mistake -- that's not an issue.

At least for me, tests/Zend/Service/Amazon/SimpleDb/OnlineTest.php doesn't run without the access key constant fix.

  • All API calls now go through request() to apply mandatory wait and retry.
  • $_testWaitRetries now supplies retry limit (currently 3).
  • Due to mandatory wait, runtime more than doubled but now consistently passes (except for intermittent "Unable to Connect") error.
  • Removed testListDomains's initial assertTrue($page->isLast()) since the results are unreliable, possibly due to consistency/caching on AWS's end. Comment block added about that change. That change, in addition to ZF-11138's patch, we're required to even test the main point of the ticket: "currently unavailable" errors.

Please do not mark as resolved until the patch has been applied to trunk and the appropriate release branch.

Will review today.

Patch applied to trunk and 1.11 release branch.