HDFS-7676. Fix TestFileTruncate to avoid bug of HDFS-7611. Contributed by Konstantin Shvachko.
This commit is contained in:
parent
5f70b7ecf0
commit
24f0d56afb
|
@ -500,6 +500,8 @@ Release 2.7.0 - UNRELEASED
|
||||||
HDFS-7659. truncate should check negative value of the new length.
|
HDFS-7659. truncate should check negative value of the new length.
|
||||||
(Yi Liu via shv)
|
(Yi Liu via shv)
|
||||||
|
|
||||||
|
HDFS-7676. Fix TestFileTruncate to avoid bug of HDFS-7611. (shv)
|
||||||
|
|
||||||
Release 2.6.1 - UNRELEASED
|
Release 2.6.1 - UNRELEASED
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
|
|
@ -496,6 +496,11 @@ public class TestFileTruncate {
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testTruncateEditLogLoad() throws IOException {
|
public void testTruncateEditLogLoad() throws IOException {
|
||||||
|
// purge previously accumulated edits
|
||||||
|
fs.setSafeMode(SafeModeAction.SAFEMODE_ENTER);
|
||||||
|
fs.saveNamespace();
|
||||||
|
fs.setSafeMode(SafeModeAction.SAFEMODE_LEAVE);
|
||||||
|
|
||||||
int startingFileSize = 2 * BLOCK_SIZE + BLOCK_SIZE / 2;
|
int startingFileSize = 2 * BLOCK_SIZE + BLOCK_SIZE / 2;
|
||||||
int toTruncate = 1;
|
int toTruncate = 1;
|
||||||
final String s = "/testTruncateEditLogLoad";
|
final String s = "/testTruncateEditLogLoad";
|
||||||
|
|
Loading…
Reference in New Issue