You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestBPOfferService.java
+3-2Lines changed: 3 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -143,8 +143,9 @@ public void setupMocks() throws Exception {
143
143
mockNN2 = setupNNMock(1);
144
144
145
145
// Set up a mock DN with the bare-bones configuration
146
-
// objects, etc.
147
-
mockDn = Mockito.mock(DataNode.class);
146
+
// objects, etc. Set as stubOnly to save memory and avoid Mockito holding
147
+
// references to each invocation. This can cause OOM in some runs.
0 commit comments