tomscut commented on a change in pull request #4009:
URL: https://github.com/apache/hadoop/pull/4009#discussion_r835748863



##########
File path: 
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/sps/TestExternalStoragePolicySatisfier.java
##########
@@ -441,6 +442,8 @@ private void doTestWhenStoragePolicySetToCOLD() throws 
Exception {
 
     hdfsCluster.triggerHeartbeats();
     dfs.satisfyStoragePolicy(new Path(FILE));
+    // Assert metrics.
+    assertEquals(1, hdfsCluster.getNamesystem().getPendingSPSPaths());
     // Wait till namenode notified about the block location details
     DFSTestUtil.waitExpectedStorageType(FILE, StorageType.ARCHIVE, 3, 35000,
         dfs);

Review comment:
       Thanks for your review. The method `doTestWhenStoragePolicySetToCOLD` is 
only called in one place. I think there should be no race condition? What do 
you think of this?




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to