Skip to content

test(cloudwatchlogs): retry IsLogGroupExists to de-flake TestLogGroupClass - #755

Open
bhavya76 wants to merge 1 commit into
mainfrom
fix/loggroupclass-flaky-isloggroupexists-retry
Open

test(cloudwatchlogs): retry IsLogGroupExists to de-flake TestLogGroupClass#755
bhavya76 wants to merge 1 commit into
mainfrom
fix/loggroupclass-flaky-isloggroupexists-retry

Conversation

@bhavya76

@bhavya76 bhavya76 commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Description of the issue

TestLogGroupClass intermittently fails at assert.True(IsLogGroupExists(...)) even when the agent log confirms the group was created. DescribeLogGroups is eventually consistent, so a class-filtered lookup immediately after creation can return empty, and the check runs once with no retry.

Description of changes

Add IsLogGroupExistsWithRetry (polls IsLogGroupExists, bounded by attempts/interval) and use it in TestLogGroupClass with 6 attempts at 15s.

License

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Tests

go build ./util/awsservice/... and go vet ./test/cloudwatchlogs/... pass; gofmt clean.

@bhavya76
bhavya76 marked this pull request as ready for review September 3, 2026 15:53
@bhavya76
bhavya76 requested a review from a team as a code owner September 3, 2026 15:53
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.

1 participant