Skip to content

Commit 0481e83

Browse files
committed
fix test cases
1 parent 7babeae commit 0481e83

File tree

1 file changed

+2
-16
lines changed

1 file changed

+2
-16
lines changed

src/test/java/com/alipay/oceanbase/hbase/HTableTestBase.java

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4761,7 +4761,7 @@ public void testDeleteIllegal() throws IOException {
47614761

47624762
@Test
47634763
public void testCheckAndMutationIllegal() throws IOException {
4764-
// check and mute 只支持一行操作
4764+
// checkAndPut 只支持一行操作
47654765
try {
47664766
Put put = new Put("key_7".getBytes());
47674767
put.add("family1".getBytes(), "column1_1".getBytes(), "value2".getBytes());
@@ -4772,20 +4772,6 @@ public void testCheckAndMutationIllegal() throws IOException {
47724772
Assert.assertTrue(e.getMessage().contains("doesn't match the original one"));
47734773
}
47744774

4775-
// check and mute 只支持一行操作
4776-
try {
4777-
RowMutations mutations = new RowMutations("key_7".getBytes());
4778-
Put put = new Put("key_7".getBytes());
4779-
put.add("family1".getBytes(), "column1_1".getBytes(), "value2".getBytes());
4780-
mutations.add(put);
4781-
boolean ret = hTable.checkAndMutate("key_8".getBytes(), "family1".getBytes(),
4782-
"column1_1".getBytes(), CompareFilter.CompareOp.EQUAL, "value1".getBytes(),
4783-
mutations);
4784-
fail();
4785-
} catch (IOException e) {
4786-
Assert.assertTrue(e.getMessage().contains("mutation row is not equal check row error"));
4787-
}
4788-
47894775
try {
47904776
Put put = new Put("key_8".getBytes());
47914777
put.add("family2".getBytes(), "column1_1".getBytes(), "value2".getBytes());
@@ -5220,7 +5206,7 @@ public void testCellTTL() throws Exception {
52205206
try {
52215207
tryPut(hTable, errorPut);
52225208
} catch (Exception e) {
5223-
assertTrue(e.getCause().getCause().toString().contains("Unknown column 'TTL'"));
5209+
assertTrue(e.getCause().toString().contains("Unknown column 'TTL'"));
52245210
}
52255211
// test put and get
52265212
tryPut(hTable, put1);

0 commit comments

Comments
 (0)