Skip to content

Commit 9682063

Browse files
committed
update addScanRange test with partition
1 parent 23993f2 commit 9682063

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/test/java/com/alipay/oceanbase/rpc/ObGetPartitionTest.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,18 @@ public void testAddScanWithPartition() throws Exception {
183183
QueryResultSet result = client.query(TABLE_NAME)
184184
.addScanRange(partition.start(), partition.end()).execute();
185185
Assert.assertEquals(1, result.cacheSize());
186+
187+
partition = client.getPartition(TABLE_NAME, row(colVal("c1", 400L), colVal("c2", "c2_val")));
188+
System.out.println(partition.toString());
189+
result = client.query(TABLE_NAME)
190+
.addScanRange(partition.start(), partition.end()).execute();
191+
Assert.assertEquals(2, result.cacheSize());
192+
193+
partition = client.getPartition(TABLE_NAME, row(colVal("c1", 1000L), colVal("c2", "c2_val")));
194+
System.out.println(partition.toString());
195+
result = client.query(TABLE_NAME)
196+
.addScanRange(partition.start(), partition.end()).execute();
197+
Assert.assertEquals(3, result.cacheSize());
186198
} catch (Exception e) {
187199
e.printStackTrace();
188200
Assert.assertTrue(false);

0 commit comments

Comments
 (0)