Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add unit tests for org.apache.hadoop.hbase.util.Strings #363

Merged
merged 1 commit into from
Jul 10, 2019

Conversation

EricHetti
Copy link
Contributor

I've analysed your codebase and noticed that org.apache.hadoop.hbase.util.Strings is not fully tested.
I've written some tests for the methods in this class with the help of Diffblue Cover.

Hopefully, these tests will help you detect any regressions caused by future code changes. If you would find it useful to have additional tests written for this repository, I would be more than happy to look at other classes that you consider important in a subsequent PR.

@Apache-HBase
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
0 reexec 138 Docker mode activated.
_ Prechecks _
+1 hbaseanti 0 Patch does not have any anti-patterns.
+1 @author 0 The patch does not contain any @author tags.
+1 test4tests 0 The patch appears to include 1 new or modified test files.
_ master Compile Tests _
+1 mvninstall 255 master passed
+1 compile 21 master passed
+1 checkstyle 24 master passed
+1 shadedjars 278 branch has no errors when building our shaded downstream artifacts.
+1 findbugs 42 master passed
+1 javadoc 20 master passed
_ Patch Compile Tests _
+1 mvninstall 258 the patch passed
+1 compile 23 the patch passed
+1 javac 23 the patch passed
-1 checkstyle 23 hbase-common: The patch generated 18 new + 0 unchanged - 0 fixed = 18 total (was 0)
+1 whitespace 0 The patch has no whitespace issues.
+1 shadedjars 282 patch has no errors when building our shaded downstream artifacts.
+1 hadoopcheck 736 Patch does not cause any errors with Hadoop 2.8.5 2.9.2 or 3.1.2.
+1 findbugs 47 the patch passed
+1 javadoc 21 the patch passed
_ Other Tests _
+1 unit 181 hbase-common in the patch passed.
+1 asflicense 12 The patch does not generate ASF License warnings.
2675
Subsystem Report/Notes
Docker Client=17.05.0-ce Server=17.05.0-ce base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-363/1/artifact/out/Dockerfile
GITHUB PR #363
Optional Tests dupname asflicense javac javadoc unit findbugs shadedjars hadoopcheck hbaseanti checkstyle compile
uname Linux f78e3a500950 4.4.0-139-generic #165-Ubuntu SMP Wed Oct 24 10:58:50 UTC 2018 x86_64 GNU/Linux
Build tool maven
Personality /testptch/patchprocess/precommit/personality/provided.sh
git revision master / 605f8a1
maven version: Apache Maven 3.5.4 (1edded0938998edf8bf061f1ceb3cfdeccf443fe; 2018-06-17T18:33:14Z)
Default Java 1.8.0_181
findbugs v3.1.11
checkstyle https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-363/1/artifact/out/diff-checkstyle-hbase-common.txt
Test Results https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-363/1/testReport/
Max. process+thread count 346 (vs. ulimit of 10000)
modules C: hbase-common U: hbase-common
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-363/1/console
Powered by Apache Yetus 0.9.0 http://yetus.apache.org

This message was automatically generated.

Copy link
Contributor

@petersomogyi petersomogyi left a comment

Choose a reason for hiding this comment

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

Could you fix the Checkstyle issues related to indentation? HBase project uses 2 spaces instead of 4.
You can check our Checkstyle rules here and import it to your favorite IDE. :)

@petersomogyi
Copy link
Contributor

Please create an HBASE Jira for this change at https://issues.apache.org/jira/secure/Dashboard.jspa and use it in the commit name.

@EricHetti EricHetti force-pushed the add-diffblue-tests branch from 810b02e to 07eee10 Compare July 9, 2019 13:15
@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
0 reexec 239 Docker mode activated.
_ Prechecks _
+1 hbaseanti 0 Patch does not have any anti-patterns.
+1 @author 0 The patch does not contain any @author tags.
+1 test4tests 0 The patch appears to include 1 new or modified test files.
_ master Compile Tests _
+1 mvninstall 299 master passed
+1 compile 23 master passed
+1 checkstyle 25 master passed
+1 shadedjars 276 branch has no errors when building our shaded downstream artifacts.
+1 findbugs 41 master passed
+1 javadoc 20 master passed
_ Patch Compile Tests _
+1 mvninstall 242 the patch passed
+1 compile 22 the patch passed
+1 javac 22 the patch passed
+1 checkstyle 24 the patch passed
+1 whitespace 0 The patch has no whitespace issues.
+1 shadedjars 267 patch has no errors when building our shaded downstream artifacts.
+1 hadoopcheck 742 Patch does not cause any errors with Hadoop 2.8.5 2.9.2 or 3.1.2.
+1 findbugs 49 the patch passed
+1 javadoc 17 the patch passed
_ Other Tests _
+1 unit 180 hbase-common in the patch passed.
+1 asflicense 11 The patch does not generate ASF License warnings.
2799
Subsystem Report/Notes
Docker Client=17.05.0-ce Server=17.05.0-ce base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-363/2/artifact/out/Dockerfile
GITHUB PR #363
Optional Tests dupname asflicense javac javadoc unit findbugs shadedjars hadoopcheck hbaseanti checkstyle compile
uname Linux ce32a708d3ba 4.4.0-138-generic #164-Ubuntu SMP Tue Oct 2 17:16:02 UTC 2018 x86_64 GNU/Linux
Build tool maven
Personality /testptch/patchprocess/precommit/personality/provided.sh
git revision master / 9ac9505
maven version: Apache Maven 3.5.4 (1edded0938998edf8bf061f1ceb3cfdeccf443fe; 2018-06-17T18:33:14Z)
Default Java 1.8.0_181
findbugs v3.1.11
Test Results https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-363/2/testReport/
Max. process+thread count 290 (vs. ulimit of 10000)
modules C: hbase-common U: hbase-common
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-363/2/console
Powered by Apache Yetus 0.9.0 http://yetus.apache.org

This message was automatically generated.

These tests were written using Diffblue Cover.
@EricHetti EricHetti force-pushed the add-diffblue-tests branch from 07eee10 to 910bfb5 Compare July 9, 2019 15:44
@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
0 reexec 54 Docker mode activated.
_ Prechecks _
+1 hbaseanti 0 Patch does not have any anti-patterns.
+1 @author 0 The patch does not contain any @author tags.
+1 test4tests 0 The patch appears to include 1 new or modified test files.
_ master Compile Tests _
+1 mvninstall 261 master passed
+1 compile 20 master passed
+1 checkstyle 23 master passed
+1 shadedjars 270 branch has no errors when building our shaded downstream artifacts.
+1 findbugs 38 master passed
+1 javadoc 20 master passed
_ Patch Compile Tests _
+1 mvninstall 239 the patch passed
+1 compile 21 the patch passed
+1 javac 21 the patch passed
+1 checkstyle 22 the patch passed
+1 whitespace 0 The patch has no whitespace issues.
+1 shadedjars 267 patch has no errors when building our shaded downstream artifacts.
+1 hadoopcheck 738 Patch does not cause any errors with Hadoop 2.8.5 2.9.2 or 3.1.2.
+1 findbugs 47 the patch passed
+1 javadoc 19 the patch passed
_ Other Tests _
+1 unit 172 hbase-common in the patch passed.
+1 asflicense 10 The patch does not generate ASF License warnings.
2541
Subsystem Report/Notes
Docker Client=17.05.0-ce Server=17.05.0-ce base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-363/3/artifact/out/Dockerfile
GITHUB PR #363
Optional Tests dupname asflicense javac javadoc unit findbugs shadedjars hadoopcheck hbaseanti checkstyle compile
uname Linux ef07f7fc5201 4.4.0-138-generic #164-Ubuntu SMP Tue Oct 2 17:16:02 UTC 2018 x86_64 GNU/Linux
Build tool maven
Personality /testptch/patchprocess/precommit/personality/provided.sh
git revision master / 9ac9505
maven version: Apache Maven 3.5.4 (1edded0938998edf8bf061f1ceb3cfdeccf443fe; 2018-06-17T18:33:14Z)
Default Java 1.8.0_181
findbugs v3.1.11
Test Results https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-363/3/testReport/
Max. process+thread count 327 (vs. ulimit of 10000)
modules C: hbase-common U: hbase-common
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-363/3/console
Powered by Apache Yetus 0.9.0 http://yetus.apache.org

This message was automatically generated.

@petersomogyi petersomogyi merged commit 53a8c26 into apache:master Jul 10, 2019
asfgit pushed a commit that referenced this pull request Jul 10, 2019
asfgit pushed a commit that referenced this pull request Jul 10, 2019
asfgit pushed a commit that referenced this pull request Jul 10, 2019
asfgit pushed a commit that referenced this pull request Jul 10, 2019
asfgit pushed a commit that referenced this pull request Jul 10, 2019
asfgit pushed a commit that referenced this pull request Jul 10, 2019
symat pushed a commit to symat/hbase that referenced this pull request Feb 17, 2021
…pache#363)

These tests were written using Diffblue Cover.
(cherry picked from commit f5cff4b)

Change-Id: Ida942c2efe1c69e3eec2f70a6dc0e3fb86c63753
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.

3 participants