Skip to content

Call close on KafkaApplication only once#275

Merged
philipp94831 merged 2 commits intomasterfrom
fix/close-once
Jan 23, 2025
Merged

Call close on KafkaApplication only once#275
philipp94831 merged 2 commits intomasterfrom
fix/close-once

Conversation

@philipp94831
Copy link
Copy Markdown
Member

Fixes #263

@philipp94831 philipp94831 self-assigned this Jan 22, 2025
Copy link
Copy Markdown
Contributor

@torbsto torbsto left a comment

Choose a reason for hiding this comment

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

I think a test would be helpful to ensure it is called only once

@philipp94831
Copy link
Copy Markdown
Member Author

I think a test would be helpful to ensure it is called only once

I tried, the problem is that the shutdown hook is not invoked in the tests. We avoid system.exit with a junit plugin but this also avoids the shutdown hook. If we allow system.exit, Gradle tests are aborted

@philipp94831 philipp94831 merged commit 09360ef into master Jan 23, 2025
@philipp94831 philipp94831 deleted the fix/close-once branch January 23, 2025 08:00
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.

Close method is called twice on shutdown

2 participants