Skip to content

Commit d79cc2f

Browse files
committed
Fix test
Change-Id: If87353d4cdc540b271c183f339dd704e42cb8b46
1 parent 07f39ad commit d79cc2f

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/snapshot/TestSnapshotDiffManagerMXBean.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,11 @@ public void setUp(@TempDir Path tempDir) throws IOException, RocksDBException {
9696
when(ozoneManager.getConfiguration()).thenReturn(conf);
9797
when(ozoneManager.getMetrics()).thenReturn(mock(OMMetrics.class));
9898
OMMetadataManager omMetadataManager = mock(OMMetadataManager.class);
99-
when(omMetadataManager.getStore()).thenReturn(mock(org.apache.hadoop.hdds.utils.db.RDBStore.class));
99+
org.apache.hadoop.hdds.utils.db.RDBStore rdbStore =
100+
mock(org.apache.hadoop.hdds.utils.db.RDBStore.class);
101+
when(rdbStore.getSnapshotMetadataDir())
102+
.thenReturn(tempDir.toAbsolutePath().toString());
103+
when(omMetadataManager.getStore()).thenReturn(rdbStore);
100104
when(ozoneManager.getMetadataManager()).thenReturn(omMetadataManager);
101105
when(ozoneManager.getOmSnapshotManager()).thenReturn(mock(OmSnapshotManager.class));
102106

0 commit comments

Comments
 (0)