eolivelli commented on a change in pull request #2257: 2178: IOException Should
Be Thrown When Journal Is Corrupted
URL: https://github.com/apache/bookkeeper/pull/2257#discussion_r377855884
##########
File path:
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/JournalChannel.java
##########
@@ -160,7 +176,13 @@ private JournalChannel(File journalDirectory, long logId,
+ " suddenly appeared, is another bookie process
running?");
}
randomAccessFile = new RandomAccessFile(fn, "rw");
- fc = randomAccessFile.getChannel();
+
+ if (dummyFC == null) {
+ fc = randomAccessFile.getChannel();
Review comment:
You can add a static method like:
FileChannel openFileChannel (RandomAccessFile)
Then you can override it with PowerMock
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services