You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2022/05/19 14:25:02 UTC

[GitHub] [ozone] kaijchen opened a new pull request, #3431: HDDS-6751. Migrate parameterized tests in hdds-server-scm to JUnit5

kaijchen opened a new pull request, #3431:
URL: https://github.com/apache/ozone/pull/3431

   ## What changes were proposed in this pull request?
   
   Migrate tests with `@RunWith(Parameterized.class)` in hdds-server-scm to JUnit5
   
   ```
   hadoop-hdds/server-scm/src/test/java/org/apache/hadoop/hdds/scm/TestStorageContainerManagerHttpServer.java
   hadoop-hdds/server-scm/src/test/java/org/apache/hadoop/hdds/scm/container/placement/algorithms/TestSCMContainerPlacementRackAware.java
   hadoop-hdds/server-scm/src/test/java/org/apache/hadoop/hdds/scm/container/placement/algorithms/TestSCMContainerPlacementRackScatter.java
   hadoop-hdds/server-scm/src/test/java/org/apache/hadoop/hdds/scm/pipeline/TestPipelineDatanodesIntersection.java
   hadoop-hdds/server-scm/src/test/java/org/apache/hadoop/hdds/scm/upgrade/TestSCMHAUnfinalizedStateValidationAction.java
   ```
   
   In addition, one more test in hdds-server-scm was changed to `@ParameterizedTest`.
   If there is more, they can be changed in HDDS-6752 after this PR is merged.
   
   ```
   hadoop-hdds/server-scm/src/test/java/org/apache/hadoop/hdds/scm/safemode/TestSCMSafeModeManager.java
   ```
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/HDDS-6751
   
   ## How was this patch tested?
   
   CI: https://github.com/kaijchen/ozone/actions/runs/2343964748
   


-- 
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


[GitHub] [ozone] kaijchen commented on a diff in pull request #3431: HDDS-6751. Migrate parameterized tests in hdds-server-scm to JUnit5

Posted by GitBox <gi...@apache.org>.
kaijchen commented on code in PR #3431:
URL: https://github.com/apache/ozone/pull/3431#discussion_r877689646


##########
hadoop-hdds/server-scm/src/test/java/org/apache/hadoop/hdds/scm/pipeline/TestPipelineDatanodesIntersection.java:
##########
@@ -127,7 +127,7 @@ public void testPipelineDatanodesIntersection(int nodeCount,
         List<Pipeline> overlapPipelines = RatisPipelineUtils
             .checkPipelineContainSameDatanodes(stateManager, pipeline);
 
-        if (overlapPipelines.isEmpty()) {

Review Comment:
   I believe this if condition is inversed, see line 132.



-- 
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


[GitHub] [ozone] kaijchen commented on a diff in pull request #3431: HDDS-6751. Migrate parameterized tests in hdds-server-scm to JUnit5

Posted by GitBox <gi...@apache.org>.
kaijchen commented on code in PR #3431:
URL: https://github.com/apache/ozone/pull/3431#discussion_r877689646


##########
hadoop-hdds/server-scm/src/test/java/org/apache/hadoop/hdds/scm/pipeline/TestPipelineDatanodesIntersection.java:
##########
@@ -127,7 +127,7 @@ public void testPipelineDatanodesIntersection(int nodeCount,
         List<Pipeline> overlapPipelines = RatisPipelineUtils
             .checkPipelineContainSameDatanodes(stateManager, pipeline);
 
-        if (overlapPipelines.isEmpty()) {

Review Comment:
   I believe this if condition needs to be fixed, see line 132.



-- 
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


[GitHub] [ozone] kaijchen commented on a diff in pull request #3431: HDDS-6751. Migrate parameterized tests in hdds-server-scm to JUnit5

Posted by GitBox <gi...@apache.org>.
kaijchen commented on code in PR #3431:
URL: https://github.com/apache/ozone/pull/3431#discussion_r877997057


##########
hadoop-hdds/server-scm/pom.xml:
##########
@@ -150,6 +150,10 @@ https://maven.apache.org/xsd/maven-4.0.0.xsd">
       <artifactId>junit-platform-launcher</artifactId>
       <scope>test</scope>
     </dependency>
+    <dependency>
+      <groupId>org.junit.jupiter</groupId>
+      <artifactId>junit-jupiter-params</artifactId>

Review Comment:
   ```suggestion
         <artifactId>junit-jupiter-params</artifactId>
         <scope>test</scope>
   ```



-- 
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


[GitHub] [ozone] kaijchen commented on a diff in pull request #3431: HDDS-6751. Migrate parameterized tests in hdds-server-scm to JUnit5

Posted by GitBox <gi...@apache.org>.
kaijchen commented on code in PR #3431:
URL: https://github.com/apache/ozone/pull/3431#discussion_r877691996


##########
hadoop-hdds/server-scm/src/test/java/org/apache/hadoop/hdds/scm/pipeline/TestPipelineDatanodesIntersection.java:
##########
@@ -127,7 +127,7 @@ public void testPipelineDatanodesIntersection(int nodeCount,
         List<Pipeline> overlapPipelines = RatisPipelineUtils
             .checkPipelineContainSameDatanodes(stateManager, pipeline);
 
-        if (overlapPipelines.isEmpty()) {

Review Comment:
   However, there is no assertions against any of these data.
   We should fix this test probably in another Jira.



-- 
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


[GitHub] [ozone] adoroszlai merged pull request #3431: HDDS-6751. Migrate parameterized tests in hdds-server-scm to JUnit5

Posted by GitBox <gi...@apache.org>.
adoroszlai merged PR #3431:
URL: https://github.com/apache/ozone/pull/3431


-- 
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


[GitHub] [ozone] kaijchen commented on pull request #3431: HDDS-6751. Migrate parameterized tests in hdds-server-scm to JUnit5

Posted by GitBox <gi...@apache.org>.
kaijchen commented on PR #3431:
URL: https://github.com/apache/ozone/pull/3431#issuecomment-1148589980

   Thanks @adoroszlai 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


[GitHub] [ozone] kaijchen commented on pull request #3431: HDDS-6751. Migrate parameterized tests in hdds-server-scm to JUnit5

Posted by GitBox <gi...@apache.org>.
kaijchen commented on PR #3431:
URL: https://github.com/apache/ozone/pull/3431#issuecomment-1131771412

   Cc @adoroszlai, PTAL


-- 
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