Skip to content

KAFKA-16878: Remove powermock and easymock from code base#16236

Merged
chia7712 merged 1 commit into
apache:trunkfrom
FrankYang0529:KAFKA-16878
Jun 8, 2024
Merged

KAFKA-16878: Remove powermock and easymock from code base#16236
chia7712 merged 1 commit into
apache:trunkfrom
FrankYang0529:KAFKA-16878

Conversation

@FrankYang0529

Copy link
Copy Markdown
Member

This is the follow-up of KAFKA-16223. It should include following changes:

  • remove all related code from code base
  • remove testsToExclude from build.gradle

Committer Checklist (excluded from commit message)

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

@chia7712 chia7712 left a comment

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.

LGTM

@chia7712

chia7712 commented Jun 7, 2024

Copy link
Copy Markdown
Member

@FrankYang0529 could you please rebase code to trigger QA?

@mimaison

mimaison commented Jun 7, 2024

Copy link
Copy Markdown
Member

Wow, we're finally doing it!
According to KAFKA-7438, it looks like it almost took us 6 years to do it.

@mimaison mimaison left a comment

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.

Thanks for the PR!
We still have a handful of comments mentioning EasyMock/PowerMock, it would be good to remove them as well.

Comment thread build.gradle
// The suites are for running sets of tests in IDEs.
// Gradle will run each test class, so we exclude the suites to avoid redundantly running the tests twice.
def testsToExclude = ['**/*Suite.class']
// Exclude PowerMock tests when running with Java 16 or newer until a version of PowerMock that supports the relevant versions is released

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.

There's another comment about PowerMock at line 822, can we remove it as well?

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.

There are also comments about EasyMock in 4 places:

  • 2 in DescribeTopicPartitionsRequestHandlerTest
  • 2 in KafkaApisTest
    Let's clean those up as well.

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.

Hi @mimaison, thanks for the review. I remove all remaining comments.

@chia7712

chia7712 commented Jun 7, 2024

Copy link
Copy Markdown
Member

Wow, we're finally doing it!
According to KAFKA-7438, it looks like it almost took us 6 years to do it.

That is a lengthy journey 😄

@chia7712

chia7712 commented Jun 8, 2024

Copy link
Copy Markdown
Member

@FrankYang0529 thanks for this patch. I will merge it after getting approve from @mimaison

@chia7712

chia7712 commented Jun 8, 2024

Copy link
Copy Markdown
Member

oh, the QA is not completed. I re-trigger it ...

@FrankYang0529

Copy link
Copy Markdown
Member Author

oh, the QA is not completed. I re-trigger it ...

I rebase trunk branch to include #16248.

@ocadaruma

Copy link
Copy Markdown
Contributor

@FrankYang0529 FYI it turned out there's another blocking test so we may need to wait #16249 gets merged not only 16248

@FrankYang0529

Copy link
Copy Markdown
Member Author

@FrankYang0529 FYI it turned out there's another blocking test so we may need to wait #16249 gets merged not only 16248

Thank you for the reminder. We will wait for it 👍

@showuon

showuon commented Jun 8, 2024

Copy link
Copy Markdown
Member

#16249 is merged. FYI.

Comment thread build.gradle
toolVersion = versions.jacoco
}

// NOTE: Jacoco Gradle plugin does not support "offline instrumentation" this means that classes mocked by PowerMock

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.

You can't just remove the first line, the following line does not mean anything now.

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.

Sorry for that. I remove related comments.

Signed-off-by: PoAn Yang <payang@apache.org>
@FrankYang0529

Copy link
Copy Markdown
Member Author

#16249 is merged. FYI.

Rebased it. Thanks.

@chia7712

chia7712 commented Jun 8, 2024

Copy link
Copy Markdown
Member

failed tests pass on my local.

@chia7712
chia7712 merged commit 3d5d150 into apache:trunk Jun 8, 2024
@ijuma

ijuma commented Jun 8, 2024

Copy link
Copy Markdown
Member

Wow, we're finally doing it! According to KAFKA-7438, it looks like it almost took us 6 years to do it.

Well done team, this was a Herculean effort!

@FrankYang0529
FrankYang0529 deleted the KAFKA-16878 branch June 9, 2024 00:10
gongxuanzhang pushed a commit to gongxuanzhang/kafka that referenced this pull request Jun 12, 2024
Reviewers: TaiJuWu <tjwu1217@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>
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.

7 participants