Skip to content
Permalink
Browse files
HBASE-23609 Cleaned up tests
Signed-off-by: stack <stack@apache.org>
  • Loading branch information
HorizonNet committed Dec 24, 2019
1 parent 0263964 commit 20bc5bdc64a985e34070c2cbe3b69848a964668b
Showing 5 changed files with 5 additions and 15 deletions.
@@ -20,7 +20,6 @@
import static org.junit.Assert.assertEquals;

import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
@@ -56,7 +55,6 @@
import org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos;

public class TestFsRegionsMetaRecoverer {

private Connection mockedConnection;
private FileSystem mockedFileSystem;
private Table mockedTable;
@@ -175,7 +173,6 @@ public void testReportTablesMissingRegionsOneMissing() throws Exception {
}

private static final class TestInputStreamSeekable extends FSInputStream {

private ByteArrayInputStream in;
private long length;

@@ -186,26 +183,24 @@ private TestInputStreamSeekable(RegionInfo info) throws Exception {
}

@Override
public void seek(long l) throws IOException {
public void seek(long l) {
this.in.skip(l);
}

@Override
public long getPos() throws IOException {
public long getPos() {
return this.length - in.available();
}

@Override
public boolean seekToNewSource(long l) throws IOException {
public boolean seekToNewSource(long l) {
this.in.skip(l);
return true;
}

@Override
public int read() throws IOException {
public int read() {
return in.read();
}
}

}

@@ -260,7 +260,7 @@ private String testFormatMissingRegionsInMetaReport()
final StringBuilder builder = new StringBuilder();
PrintStream originalOS = System.out;
OutputStream testOS = new OutputStream() {
@Override public void write(int b) throws IOException {
@Override public void write(int b) {
builder.append((char)b);
}
};
@@ -349,5 +349,4 @@ private void deleteRegionInfo(Connection connection, RegionInfo region) {
fail(e.getMessage());
}
}

}
@@ -102,4 +102,3 @@ private String retrieveOptionOutput(String option) throws IOException {
return os.toString();
}
}

@@ -43,7 +43,6 @@
* Test class for the MetaTableAccessor wrapper.
*/
public class TestHBCKMetaTableAccessor {

private final static HBaseTestingUtility TEST_UTIL = new HBaseTestingUtility();

@Rule
@@ -33,8 +33,6 @@

import org.apache.hbase.thirdparty.com.google.protobuf.ServiceException;



public class TestSchedulingRecoveries {
private final static HBaseTestingUtility TEST_UTIL = new HBaseTestingUtility();
private HBCK2 hbck2;

0 comments on commit 20bc5bd

Please sign in to comment.