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
@@ -144,8 +144,9 @@ public void setupMocks() throws Exception {
144
144
mockNN2 = setupNNMock(1);
145
145
146
146
// Set up a mock DN with the bare-bones configuration
147
-
// objects, etc.
148
-
mockDn = Mockito.mock(DataNode.class);
147
+
// objects, etc. Set as stubOnly to save memory and avoid Mockito holding
148
+
// references to each invocation. This can cause OOM in some runs.
0 commit comments