You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "adoroszlai (via GitHub)" <gi...@apache.org> on 2025/04/28 16:59:18 UTC
[PR] HDDS-12921. UnusedPrivateField violations in tests [ozone]
adoroszlai opened a new pull request, #8353:
URL: https://github.com/apache/ozone/pull/8353
## What changes were proposed in this pull request?
Fix `UnusedPrivateField` violations in tests.
https://issues.apache.org/jira/browse/HDDS-12921
## How was this patch tested?
https://github.com/adoroszlai/ozone/actions/runs/14712065574
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-12921. UnusedPrivateField violations in tests [ozone]
Posted by "ivanzlenko (via GitHub)" <gi...@apache.org>.
ivanzlenko commented on PR #8353:
URL: https://github.com/apache/ozone/pull/8353#issuecomment-2837380719
Thanks for the patch @adoroszlai !
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-12921. UnusedPrivateField violations in tests [ozone]
Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai commented on code in PR #8353:
URL: https://github.com/apache/ozone/pull/8353#discussion_r2065671194
##########
hadoop-hdds/container-service/src/test/java/org/apache/hadoop/ozone/container/common/volume/TestStorageVolumeChecker.java:
##########
@@ -106,13 +103,19 @@ private void setup() {
* Run each test case for each possible value of {@link VolumeCheckResult}.
* Including "null" for 'throw exception'.
*/
+ private static List<VolumeCheckResult> volumeCheckResults() {
+ List<VolumeCheckResult> list = new ArrayList<>(Arrays.asList(values()));
Review Comment:
Which method do you mean and what is the suggested new name?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-12921. UnusedPrivateField violations in tests [ozone]
Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai commented on PR #8353:
URL: https://github.com/apache/ozone/pull/8353#issuecomment-2836109490
@ivanzlenko please take a look
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-12921. UnusedPrivateField violations in tests [ozone]
Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai commented on PR #8353:
URL: https://github.com/apache/ozone/pull/8353#issuecomment-2838561375
Thanks @dombizita, @ivanzlenko for the review.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-12921. UnusedPrivateField violations in tests [ozone]
Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai commented on code in PR #8353:
URL: https://github.com/apache/ozone/pull/8353#discussion_r2065715778
##########
hadoop-hdds/container-service/src/test/java/org/apache/hadoop/ozone/container/common/volume/TestStorageVolumeChecker.java:
##########
@@ -106,13 +103,19 @@ private void setup() {
* Run each test case for each possible value of {@link VolumeCheckResult}.
* Including "null" for 'throw exception'.
*/
+ private static List<VolumeCheckResult> volumeCheckResults() {
+ List<VolumeCheckResult> list = new ArrayList<>(Arrays.asList(values()));
Review Comment:
Good point, I didn't intend to add that import.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-12921. UnusedPrivateField violations in tests [ozone]
Posted by "dombizita (via GitHub)" <gi...@apache.org>.
dombizita commented on PR #8353:
URL: https://github.com/apache/ozone/pull/8353#issuecomment-2838554300
Thanks for working on this @adoroszlai! Thanks for the review @ivanzlenko!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-12921. UnusedPrivateField violations in tests [ozone]
Posted by "ivanzlenko (via GitHub)" <gi...@apache.org>.
ivanzlenko commented on code in PR #8353:
URL: https://github.com/apache/ozone/pull/8353#discussion_r2065673386
##########
hadoop-hdds/container-service/src/test/java/org/apache/hadoop/ozone/container/common/volume/TestStorageVolumeChecker.java:
##########
@@ -106,13 +103,19 @@ private void setup() {
* Run each test case for each possible value of {@link VolumeCheckResult}.
* Including "null" for 'throw exception'.
*/
+ private static List<VolumeCheckResult> volumeCheckResults() {
+ List<VolumeCheckResult> list = new ArrayList<>(Arrays.asList(values()));
Review Comment:
org.apache.hadoop.hdfs.server.datanode.checker.VolumeCheckResult.values - ah, it's enum. In that case I would've avoided static import here. It is unclear what values we are using here.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-12921. UnusedPrivateField violations in tests [ozone]
Posted by "ivanzlenko (via GitHub)" <gi...@apache.org>.
ivanzlenko commented on code in PR #8353:
URL: https://github.com/apache/ozone/pull/8353#discussion_r2065386951
##########
hadoop-hdds/container-service/src/test/java/org/apache/hadoop/ozone/container/common/volume/TestStorageVolumeChecker.java:
##########
@@ -106,13 +103,19 @@ private void setup() {
* Run each test case for each possible value of {@link VolumeCheckResult}.
* Including "null" for 'throw exception'.
*/
+ private static List<VolumeCheckResult> volumeCheckResults() {
+ List<VolumeCheckResult> list = new ArrayList<>(Arrays.asList(values()));
Review Comment:
Wouldn't mind to rename values method in this review. Or at least let's create a ticket to rename it.
##########
hadoop-hdds/container-service/src/test/java/org/apache/hadoop/ozone/container/common/volume/TestStorageVolumeChecker.java:
##########
@@ -106,13 +103,19 @@ private void setup() {
* Run each test case for each possible value of {@link VolumeCheckResult}.
* Including "null" for 'throw exception'.
*/
+ private static List<VolumeCheckResult> volumeCheckResults() {
+ List<VolumeCheckResult> list = new ArrayList<>(Arrays.asList(values()));
Review Comment:
We do not need to wrap it into ArrayList here.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-12921. UnusedPrivateField violations in tests [ozone]
Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai commented on code in PR #8353:
URL: https://github.com/apache/ozone/pull/8353#discussion_r2065670082
##########
hadoop-hdds/container-service/src/test/java/org/apache/hadoop/ozone/container/common/volume/TestStorageVolumeChecker.java:
##########
@@ -106,13 +103,19 @@ private void setup() {
* Run each test case for each possible value of {@link VolumeCheckResult}.
* Including "null" for 'throw exception'.
*/
+ private static List<VolumeCheckResult> volumeCheckResults() {
+ List<VolumeCheckResult> list = new ArrayList<>(Arrays.asList(values()));
Review Comment:
We do, for adding `null` entry.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-12921. UnusedPrivateField violations in tests [ozone]
Posted by "dombizita (via GitHub)" <gi...@apache.org>.
dombizita merged PR #8353:
URL: https://github.com/apache/ozone/pull/8353
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org