aws-cloudformation / aws-cloudformation/cloudformation-cli
Contract Tests and Throttling Exceptions - bug?
- Langage dominant
- Python
- Étoiles
- 336
- Forks
- 172
- Merge moyen
- 3 j 5 min
- PR mergées (30 j)
- 3
Description
Hello - my resource, AWS::ApiGateway::UsagePlan throttles UpdateUsagePlan APIs to 1 every 20 seconds. I handle this in the code using the following `handleError` block -
```
} else if (sdkException instanceof TooManyRequestsException || sdkException instanceof LimitExceededException) {
cfnEx = new CfnThrottlingException(sdkException);
} else {
cfnEx = new CfnInternalFailureException(sdkException);
}
return ProgressEvent.failed(resourceModel, callbackContext, cfnEx.getErrorCode(), cfnEx.getMessage());
```
When I try to test throttling, I see that the Handle returns a Failed state, but continues to retry and the stack succeeds eventually. But, when I run my contract test suite, I see that towards the end of the contract test suite, I see that one of the contract test fails because it runs into a throttling error. But since the Handler returns a failed status, the tests simply fail instead of waiting for the handler to eventually succeed.
How do we deal with this? If I run the failed contract test standalone then, the test passes.
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez par le bloc handleError du handler et la suite de tests de contrat, en vous concentrant sur le test en échec qui rencontre une limitation de débit après l’exécution d’autres tests. Comparez son comportement avec l’exécution de ce test seul et déterminez le traitement attendu pour une réponse de limitation de débit. C’est terminé lorsque la suite de tests de contrat gère ce cas de manière fiable sans échouer à cause d’une limitation de débit transitoire.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- aws, java
- Domaine
- cloud, testing
- Type d'issue
- Bug
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- À clarifier
- Accessibilité débutants
- 35/100