HBASE-2740 NPE in ReadWriteConsistencyControl (build fix)

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@955800 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Ryan Rawson 2010-06-18 00:36:40 +00:00
parent 0beea3751b
commit 98a6a203c0
1 changed files with 6 additions and 10 deletions

View File

@ -256,7 +256,7 @@ public class TestStoreScanner extends TestCase {
KeyValueTestUtil.create("R2", "cf", "z", now, KeyValue.Type.Put, "dont-care") KeyValueTestUtil.create("R2", "cf", "z", now, KeyValue.Type.Put, "dont-care")
}; };
List<KeyValueScanner> scanners = scanFixture(kvs1, kvs2); List<KeyValueScanner> scanners = scanFixture(kvs1, kvs2);
Scan scanSpec = new Scan(Bytes.toBytes("R1")).setMaxVersions(2); Scan scanSpec = new Scan(Bytes.toBytes("R1")).setMaxVersions(2);
StoreScanner scan = StoreScanner scan =
new StoreScanner(scanSpec, CF, Long.MAX_VALUE, KeyValue.COMPARATOR, new StoreScanner(scanSpec, CF, Long.MAX_VALUE, KeyValue.COMPARATOR,
@ -378,9 +378,7 @@ public class TestStoreScanner extends TestCase {
}; };
public void testSkipColumn() throws IOException { public void testSkipColumn() throws IOException {
KeyValueScanner [] scanners = new KeyValueScanner[] { List<KeyValueScanner> scanners = scanFixture(kvs);
new KeyValueScanFixture(KeyValue.COMPARATOR, kvs)
};
StoreScanner scan = StoreScanner scan =
new StoreScanner(new Scan(), CF, Long.MAX_VALUE, KeyValue.COMPARATOR, new StoreScanner(new Scan(), CF, Long.MAX_VALUE, KeyValue.COMPARATOR,
getCols("a", "d"), scanners); getCols("a", "d"), scanners);
@ -441,9 +439,7 @@ public class TestStoreScanner extends TestCase {
} }
public void testScannerReseekDoesntNPE() throws Exception { public void testScannerReseekDoesntNPE() throws Exception {
KeyValueScanner [] scanners = new KeyValueScanner[] { List<KeyValueScanner> scanners = scanFixture(kvs);
new KeyValueScanFixture(KeyValue.COMPARATOR, kvs)
};
StoreScanner scan = StoreScanner scan =
new StoreScanner(new Scan(), CF, Long.MAX_VALUE, KeyValue.COMPARATOR, new StoreScanner(new Scan(), CF, Long.MAX_VALUE, KeyValue.COMPARATOR,
getCols("a", "d"), scanners); getCols("a", "d"), scanners);
@ -457,8 +453,8 @@ public class TestStoreScanner extends TestCase {
scan.updateReaders(); scan.updateReaders();
} }
/** /**
* TODO this fails, since we don't handle deletions, etc, in peek * TODO this fails, since we don't handle deletions, etc, in peek
*/ */
@ -472,6 +468,6 @@ public class TestStoreScanner extends TestCase {
StoreScanner scan = StoreScanner scan =
new StoreScanner(scanSpec, CF, Long.MAX_VALUE, KeyValue.COMPARATOR, new StoreScanner(scanSpec, CF, Long.MAX_VALUE, KeyValue.COMPARATOR,
getCols("a"), scanners); getCols("a"), scanners);
assertNull(scan.peek()); assertNull(scan.peek());
} }
} }