aws-cloudformation / aws-cloudformation/cloudformation-cli

Contract Tests and Throttling Exceptions - bug?

オープン
#800 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
contract tests
主要言語
Python
スター
336
フォーク
172
平均マージ
3日 5分
マージ済み PR(30日)
3

説明

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.

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

ハンドラーの handleError ブロックとコントラクトテストスイートから始め、他のテストの実行後にスロットリングに遭遇する失敗したテストに焦点を当てます。そのテストを単独で実行した場合の挙動と比較し、スロットリング応答に対して期待される処理を特定します。コントラクトテストスイートがこのケースを確実に処理し、一時的なスロットリングが原因で失敗しなくなれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
aws, java
領域
cloud, testing
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。