Skip to content

HBASE-28947 Backport "HBASE-27598 Upgrade mockito to 4.x" to branch-2.5 - #6415

Merged
NihalJain merged 1 commit into
apache:branch-2.5from
NihalJain:HBASE-28944
Nov 7, 2024
Merged

HBASE-28947 Backport "HBASE-27598 Upgrade mockito to 4.x" to branch-2.5#6415
NihalJain merged 1 commit into
apache:branch-2.5from
NihalJain:HBASE-28944

Conversation

@NihalJain

@NihalJainNihalJain commented Oct 30, 2024

Copy link
Copy Markdown
Contributor
  • Hadoop versions having HDFS-15915 need to either have mockito in their runtime or need to explicitly add it. For eg: see "HBASE-28944 TestShadedHBaseTestingUtility fails with NCDFE: org/mockito/stubbing/Answer"
  • Hence, instead of changing dependencies explicitly, we fall back to backporting HBASE-27598 which "Upgrade mockito to 4.x" for branch-2.5" which is present on all other branches, where this test seems to work as expected
  • Backports HBASE-27598 Upgrade mockito to 4.x #4998
  • Also as part of this fix we have made additional changes for the mockito migration as needed

@NihalJain

NihalJain commented Oct 30, 2024

Copy link
Copy Markdown
ContributorAuthor

Verified the test passes with this change:

[INFO] Running org.apache.hbase.shaded.TestShadedHBaseTestingUtility
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.801 s - in org.apache.hbase.shaded.TestShadedHBaseTestingUtility
[INFO] [INFO] Results:
[INFO] [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 24.297 s
[INFO] Finished at: 2024-10-30T16:57:15+05:30
[INFO] ------------------------------------------------------------------------

@stoty

Copy link
Copy Markdown
Contributor

Shouldn't we just call it HBASE-27598 ?
Isn't this 99% the same ?

@stoty

Copy link
Copy Markdown
Contributor

We should also make sure that this works with 3.2.4. (The precommit CI should be enough)

@NihalJain

Copy link
Copy Markdown
ContributorAuthor

Shouldn't we just call it HBASE-27598 ? Isn't this 99% the same ?

Sure I just wanted to keep the context in jira hence avoided updating title. But yeah let me close current jira as duplicate HBASE-28944 and create a backport jira for HBASE-27598 ?

@Apache-HBase

This comment has been minimized.

- Hadoop versions having HDFS-15915 need to either have mockito in their runtime or need to explicitly add it, see "HBASE-28944 TestShadedHBaseTestingUtility fails with NCDFE: org/mockito/stubbing/Answer"
- Hence, instead of changing dependencies explicitly, we fall back to backporting HBASE-27598 which "Upgrade mockito to 4.x" for branch-2.5" which is present on all other branches, where this test seems to work as expected
- Also as part of this fix we have made additional changes for the mockito migration as needed
@NihalJainNihalJain changed the title HBASE-28944 TestShadedHBaseTestingUtility fails with NCDFE: org/mocki…HBASE-28947 Backport "HBASE-27598 Upgrade mockito to 4.x" to branch-2.5Oct 30, 2024
@NihalJain

Copy link
Copy Markdown
ContributorAuthor

Shouldn't we just call it HBASE-27598 ? Isn't this 99% the same ?

Sure I just wanted to keep the context in jira hence avoided updating title. But yeah let me close current jira as duplicate HBASE-28944 and create a backport jira for HBASE-27598 ?

Updated!

@Apache-HBase

This comment has been minimized.

@stoty

Copy link
Copy Markdown
Contributor

LGTM but, ideally @Apache9 should also look at this, perhaps he had a specific reason not to backport to branch-2.5.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@NihalJain

Copy link
Copy Markdown
ContributorAuthor

Hi @Apache9 could you please have a look at this?

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeLogfileComment
+0 🆗reexec0m 41sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+0 🆗codespell0m 0scodespell was not available.
+0 🆗detsecrets0m 0sdetect-secrets was not available.
+1 💚@author0m 0sThe patch does not contain any @author tags.
+1 💚hbaseanti0m 0sPatch does not have any anti-patterns.
_ branch-2.5 Compile Tests _
+0 🆗mvndep0m 18sMaven dependency ordering for branch
+1 💚mvninstall2m 49sbranch-2.5 passed
+1 💚compile5m 10sbranch-2.5 passed
+1 💚checkstyle1m 10sbranch-2.5 passed
+1 💚spotbugs14m 11sbranch-2.5 passed
+1 💚spotless0m 57sbranch has no errors when running spotless:check.
_ Patch Compile Tests _
+0 🆗mvndep0m 21sMaven dependency ordering for patch
+1 💚mvninstall3m 37sthe patch passed
+1 💚compile7m 25sthe patch passed
+1 💚javac7m 25sthe patch passed
+1 💚blanks0m 0sThe patch has no blanks issues.
-0 ⚠️checkstyle1m 34s/results-checkstyle-root.txtroot: The patch generated 1 new + 42 unchanged - 0 fixed = 43 total (was 42)
+1 💚xmllint0m 0sNo new issues.
+1 💚spotbugs16m 51sthe patch passed
+1 💚hadoopcheck22m 44sPatch does not cause any errors with Hadoop 2.10.2 or 3.2.4 3.3.6 3.4.0.
+1 💚spotless0m 58spatch has no errors when running spotless:check.
_ Other Tests _
+1 💚asflicense1m 20sThe patch does not generate ASF License warnings.
83m 20s
SubsystemReport/Notes
DockerClientAPI=1.47 ServerAPI=1.47 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6415/7/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#6415
Optional Testsdupname asflicense javac spotbugs checkstyle codespell detsecrets compile hadoopcheck hbaseanti spotless xmllint
unameLinux ecf8f5dc1f18 5.4.0-200-generic #220-Ubuntu SMP Fri Sep 27 13:19:16 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionbranch-2.5 / 3dc8cd8
Default JavaEclipse Adoptium-11.0.23+9
Max. process+thread count178 (vs. ulimit of 30000)
modulesC: hbase-client hbase-http hbase-server hbase-mapreduce hbase-rest hbase-hbtop . U: .
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6415/7/console
versionsgit=2.34.1 maven=3.9.8 spotbugs=4.7.3 xmllint=20913
Powered byApache Yetus 0.15.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeLogfileComment
+0 🆗reexec0m 49sDocker mode activated.
-0 ⚠️yetus0m 6sUnprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --author-ignore-list --blanks-eol-ignore-file --blanks-tabs-ignore-file --quick-hadoopcheck
_ Prechecks _
_ branch-2.5 Compile Tests _
+0 🆗mvndep0m 21sMaven dependency ordering for branch
+1 💚mvninstall3m 17sbranch-2.5 passed
+1 💚compile2m 30sbranch-2.5 passed
+1 💚javadoc5m 24sbranch-2.5 passed
+1 💚shadedjars6m 7sbranch has no errors when building our shaded downstream artifacts.
_ Patch Compile Tests _
+0 🆗mvndep0m 15sMaven dependency ordering for patch
+1 💚mvninstall2m 58sthe patch passed
+1 💚compile2m 52sthe patch passed
+1 💚javac2m 52sthe patch passed
+1 💚javadoc4m 48sthe patch passed
+1 💚shadedjars5m 39spatch has no errors when building our shaded downstream artifacts.
_ Other Tests _
-1 ❌unit259m 48s/patch-unit-root.txtroot in the patch failed.
300m 50s
SubsystemReport/Notes
DockerClientAPI=1.47 ServerAPI=1.47 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6415/7/artifact/yetus-jdk17-hadoop3-check/output/Dockerfile
GITHUB PR#6415
Optional Testsjavac javadoc unit compile shadedjars
unameLinux 97cd8a50bd13 5.4.0-200-generic #220-Ubuntu SMP Fri Sep 27 13:19:16 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionbranch-2.5 / 3dc8cd8
Default JavaEclipse Adoptium-17.0.11+9
Test Resultshttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6415/7/testReport/
Max. process+thread count4907 (vs. ulimit of 30000)
modulesC: hbase-client hbase-http hbase-server hbase-mapreduce hbase-rest hbase-hbtop . U: .
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6415/7/console
versionsgit=2.34.1 maven=3.9.8
Powered byApache Yetus 0.15.0 https://yetus.apache.org

This message was automatically generated.

@NihalJain

Copy link
Copy Markdown
ContributorAuthor

Hi @Apache9 did you get a chance to have a look at this PR?

@ndimidukndimiduk 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.

Skimmed. looks alight to me.

@Apache9Apache9 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM.

In fact most changes are just boiler plate changes, just make the code can compile and can pass all the UTs are enough.

@NihalJain
NihalJain merged commit c4f0d52 into apache:branch-2.5Nov 7, 2024
@NihalJain

Copy link
Copy Markdown
ContributorAuthor

Failures were not related, merged! Thank you for your review @stoty@ndimiduk and @Apache9

sanjeet006py pushed a commit to sanjeet006py/hbase that referenced this pull request Sep 26, 2025
….5 (apache#6415)
- Hadoop versions having HDFS-15915 need to either have mockito in their runtime or need to explicitly add it, see "HBASE-28944 TestShadedHBaseTestingUtility fails with NCDFE: org/mockito/stubbing/Answer"
- Hence, instead of changing dependencies explicitly, we fall back to backporting HBASE-27598 which "Upgrade mockito to 4.x" for branch-2.5" which is present on all other branches, where this test seems to work as expected
- Also as part of this fix we have made additional changes for the mockito migration as needed
Signed-off-by: Duo Zhang zhangduo@apache.org
Signed-off-by: Nick Dimiduk <ndimiduk@apache.org>
Reviewed by: Istvan Toth <stoty@apache.org>
Sign up for freeto 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.

5 participants

@NihalJain@stoty@Apache-HBase@ndimiduk@Apache9