HBASE-9195 Fix TestFSHDFSUtils against java7 test re-ordering (Himanshu Vashishtha)

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1515685 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jonathan Hsieh 2013-08-20 01:54:29 +00:00
parent 7d94fa70f5
commit bbaafba2b5
1 changed files with 1 additions and 1 deletions

View File

@ -39,7 +39,6 @@ public class TestFSHDFSUtils {
private static final HBaseTestingUtility HTU = new HBaseTestingUtility(); private static final HBaseTestingUtility HTU = new HBaseTestingUtility();
static { static {
Configuration conf = HTU.getConfiguration(); Configuration conf = HTU.getConfiguration();
conf.setInt("hbase.lease.recovery.dfs.timeout", 1000);
conf.setInt("hbase.lease.recovery.first.pause", 10); conf.setInt("hbase.lease.recovery.first.pause", 10);
conf.setInt("hbase.lease.recovery.pause", 10); conf.setInt("hbase.lease.recovery.pause", 10);
}; };
@ -58,6 +57,7 @@ public class TestFSHDFSUtils {
*/ */
@Test (timeout = 30000) @Test (timeout = 30000)
public void testRecoverLease() throws IOException { public void testRecoverLease() throws IOException {
HTU.getConfiguration().setInt("hbase.lease.recovery.dfs.timeout", 1000);
CancelableProgressable reporter = Mockito.mock(CancelableProgressable.class); CancelableProgressable reporter = Mockito.mock(CancelableProgressable.class);
Mockito.when(reporter.progress()).thenReturn(true); Mockito.when(reporter.progress()).thenReturn(true);
DistributedFileSystem dfs = Mockito.mock(DistributedFileSystem.class); DistributedFileSystem dfs = Mockito.mock(DistributedFileSystem.class);