Skip to content

MINOR: Flaky test fixes#21986

Open
AndrewJSchofield wants to merge 1 commit intoapache:trunkfrom
AndrewJSchofield:flaky-test-fixes
Open

MINOR: Flaky test fixes#21986
AndrewJSchofield wants to merge 1 commit intoapache:trunkfrom
AndrewJSchofield:flaky-test-fixes

Conversation

@AndrewJSchofield
Copy link
Copy Markdown
Member

@AndrewJSchofield AndrewJSchofield commented Apr 7, 2026

Fixes a couple of flaky tests.

Reviewers: Chia-Ping Tsai chia7712@gmail.com, Apoorv Mittal
apoorvmittal10@gmail.com

} catch (Exception e) {
if (!(e instanceof GroupAuthorizationException || e instanceof TopicAuthorizationException || e instanceof InvalidTopicException))
if (!(e instanceof GroupAuthorizationException || e instanceof TopicAuthorizationException
|| e instanceof InvalidTopicException || e instanceof UnknownServerException))
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is this intended as a bug fix? the exception thrown by processBackgroundEventsOnClose will be handled by swallow

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

That's true, but it will then set firstException in ShareConsumerImpl.close(Duration, boolean) and the exception will eventually be thrown by that method.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Out of curiosity, since we are swallowing UnknownServerException in processBackgroundEventsOnClose, shouldn't we do the same in sendAcknowledgementsAndLeaveGroup for consistency? Both are steps in the close sequence.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yes, I was thinking that. There's no hurry to get this into 4.3 because it just fixes a minimally flaky test. I'll spend a bit more time here.

Copy link
Copy Markdown
Contributor

@apoorvmittal10 apoorvmittal10 left a comment

Choose a reason for hiding this comment

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

LGTM, agree that the exception swallow is marked false when the client is instatiated correctly oterwise it will fail with original exception.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants