use of com.pingcap.tikv.meta.MetaUtils.MetaMockHelper in project tispark by pingcap.
the class CatalogTransactionTest method getTablesTest.
@Test
public void getTablesTest() {
MetaMockHelper helper = new MetaMockHelper(pdServer, kvServer);
helper.preparePDForRegionRead();
helper.addTable(130, 42, "test");
helper.addTable(130, 43, "test1");
CatalogTransaction trx = new CatalogTransaction(session.createSnapshot());
List<TiTableInfo> tables = trx.getTables(130);
assertEquals(2, tables.size());
assertEquals("test", tables.get(0).getName());
assertEquals("test1", tables.get(1).getName());
}
Aggregations