steveloughran commented on code in PR #6968:
URL: https://github.com/apache/hadoop/pull/6968#discussion_r1773597712


##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice-documentstore/src/test/java/org/apache/hadoop/yarn/server/timelineservice/documentstore/TestDocumentStoreTimelineWriterImpl.java:
##########
@@ -54,10 +58,17 @@ public void setUp() throws YarnException {
         "https://localhost:443";);
     conf.set(DocumentStoreUtils.TIMELINE_SERVICE_COSMOSDB_MASTER_KEY,
         "1234567");
-    PowerMockito.mockStatic(DocumentStoreFactory.class);
-    PowerMockito.when(DocumentStoreFactory.createDocumentStoreWriter(
-        ArgumentMatchers.any(Configuration.class)))
-        .thenReturn(documentStoreWriter);
+    mockedFactory = Mockito.mockStatic(DocumentStoreFactory.class);
+    mockedFactory.when(() -> DocumentStoreFactory.createDocumentStoreWriter(
+                    ArgumentMatchers.any(Configuration.class)))
+            .thenReturn(documentStoreWriter);
+  }
+
+  @After
+  public void tearDown() {
+    if(mockedFactory != null) {

Review Comment:
   nit: add a space



##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice-documentstore/src/test/java/org/apache/hadoop/yarn/server/timelineservice/documentstore/writer/cosmosdb/TestCosmosDBDocumentStoreWriter.java:
##########
@@ -28,14 +28,16 @@
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mockito.ArgumentMatchers;
 import org.mockito.Mockito;
-import org.powermock.api.mockito.PowerMockito;
+

Review Comment:
   no need to add a space here



##########
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/INodeFile.java:
##########
@@ -253,9 +253,8 @@ static long toLong(long preferredBlockSize, long 
layoutRedundancy,
 
   private BlockInfo[] blocks;
 
-  INodeFile(long id, byte[] name, PermissionStatus permissions, long mtime,
-            long atime, BlockInfo[] blklist, short replication,
-            long preferredBlockSize) {
+  public INodeFile(long id, byte[] name, PermissionStatus permissions, long 
mtime, long atime,

Review Comment:
   why this change?



##########
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestCacheDirectives.java:
##########
@@ -1575,7 +1575,7 @@ public void testNoLookupsWhenNotUsed() throws Exception {
     CacheManager cm = cluster.getNamesystem().getCacheManager();
     LocatedBlocks locations = Mockito.mock(LocatedBlocks.class);
     cm.setCachedLocations(locations);
-    Mockito.verifyZeroInteractions(locations);

Review Comment:
   still hoping to see this to assist backports



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