Skip to content

Fix flakey integ test by adding params#7146

Open
RanVaknin wants to merge 1 commit into
masterfrom
rvaknin/fix-cloudwatch-alarms-flakey-integ-test
Open

Fix flakey integ test by adding params#7146
RanVaknin wants to merge 1 commit into
masterfrom
rvaknin/fix-cloudwatch-alarms-flakey-integ-test

Conversation

@RanVaknin

@RanVaknin RanVaknin commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Context

testExceptionHandling integ test in the Cloudwatch test package was flakey because the service was returning a non deterministic exception. We expected it to return MissingParameter exception but it sometimes returned InvalidParameterCombination exception instead.

I was able to reproduce it by running test case repeatedly 100 times, seeing the following:
79/100 MissingParameter
21/100 InvalidParameterCombination

Fix

The fix adds all the other required fields, except for MetricName. Resulted in deterministic 100/100 MissingParameter exception.

@RanVaknin
RanVaknin marked this pull request as ready for review July 14, 2026 21:58
@RanVaknin
RanVaknin requested a review from a team as a code owner July 14, 2026 21:58
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import static software.amazon.awssdk.testutils.service.AwsTestBase.isValidSdkServiceException;

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unused import

import software.amazon.awssdk.auth.credentials.StaticCredentialsProvider;
import software.amazon.awssdk.core.CompressionConfiguration;
import software.amazon.awssdk.core.SdkGlobalTime;
import software.amazon.awssdk.core.exception.SdkServiceException;

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unused import

@RanVaknin
RanVaknin added this pull request to the merge queue Jul 17, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to Branch Protection failures Jul 17, 2026
You're not authorized to push to this branch. Visit "About protected branches" for more information.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants