Skip to content

[LI-HOTFIX] Cleaning up fetcher threads in ReplicaManagerTest#149

Closed
gitlw wants to merge 6 commits into
linkedin:2.4-lifrom
gitlw:trim_fetcher_threads
Closed

[LI-HOTFIX] Cleaning up fetcher threads in ReplicaManagerTest#149
gitlw wants to merge 6 commits into
linkedin:2.4-lifrom
gitlw:trim_fetcher_threads

Conversation

@gitlw

@gitlw gitlw commented Apr 28, 2021

Copy link
Copy Markdown

TICKET = N/A
LI_DESCRIPTION =
At the end of the ReplicaManagerTest.testIllegalRequiredAcks test,
there is logic to verify that there are no non-daemon threads with
TestUtils.assertNoNonDaemonThreads(this.getClass.getName)

However, some other test in the same class could have left some
non-daemon threads running, which will cause the test above to fail.

This PR ensures that each test method closes the fetcher threads
it may have created. Also, validation is added to the tearDown
method to ensure no non-daemon threads are left running by each test method.

EXIT_CRITERIA = N/A

More detailed description of your change,
if necessary. The PR title and PR message become
the squashed commit message, so use a separate
comment to ping reviewers.

Summary of testing strategy (including rationale)
for the feature or bug fix. Unit and/or integration
tests are expected for any behaviour change and
system tests should be considered for larger changes.

Committer Checklist (excluded from commit message)

  • Verify design and implementation
  • Verify test coverage and CI build status
  • Verify documentation (including upgrade notes)

gitlw added 4 commits April 30, 2021 17:06
TICKET = N/A
LI_DESCRIPTION =
At the end of the ReplicaManagerTest.testIllegalRequiredAcks test,
there is logic to verify that there are no non-daemon threads with
TestUtils.assertNoNonDaemonThreads(this.getClass.getName)

However, some other test in the same class could have left some
non-daemon threads running, which will case the test above to fail.

This PR ensures that each test method closes the fetcher threads
it may have created. Also a validation is added to the tearDown
method to ensure no non-daemon threads are running.

EXIT_CRITERIA = N/A
@gitlw gitlw force-pushed the trim_fetcher_threads branch from 8b73000 to 150b9d2 Compare May 3, 2021 17:55
Comment thread core/src/main/scala/kafka/server/ReplicaFetcherManager.scala
@gitlw gitlw marked this pull request as draft May 3, 2021 21:33
@gitlw gitlw closed this Jan 28, 2022
@gitlw gitlw deleted the trim_fetcher_threads branch January 28, 2022 05:29
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