aws-cloudformation / aws-cloudformation/cloudformation-cli

Contract Tests and Throttling Exceptions - bug?

Aperta
#800 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
contract tests
Lingua principale
Python
Stelle
336
Fork
172
Merge medio
3g 5m
PR unite (30g)
3

Descrizione

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.

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia dal blocco handleError dell’handler e dalla suite di test del contratto, concentrandoti sul test fallito che incontra un throttling dopo l’esecuzione di altri test. Confronta il suo comportamento con l’esecuzione indipendente di quel test e determina la gestione prevista per una risposta di throttling. Il lavoro è completato quando la suite di test del contratto gestisce questo caso in modo affidabile senza fallire a causa di un throttling transitorio.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
aws, java
Ambito
cloud, testing
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.