Search in sources :

Example 1 with TiConfiguration

use of com.pingcap.tikv.TiConfiguration in project tispark by pingcap.

the class LockResolverTest method setUp.

@Before
public void setUp() {
    TiConfiguration conf = TiConfiguration.createDefault(getPdAddr());
    conf.setIsolationLevel(isolationLevel);
    try {
        session = TiSession.getInstance(conf);
        this.builder = session.getRegionStoreClientBuilder();
        init = true;
    } catch (Exception e) {
        init = false;
        fail("TiDB cluster may not be present");
    }
}
Also used : TiConfiguration(com.pingcap.tikv.TiConfiguration) RegionException(com.pingcap.tikv.exception.RegionException) GrpcException(com.pingcap.tikv.exception.GrpcException) KeyException(com.pingcap.tikv.exception.KeyException) Before(org.junit.Before)

Aggregations

TiConfiguration (com.pingcap.tikv.TiConfiguration)1 GrpcException (com.pingcap.tikv.exception.GrpcException)1 KeyException (com.pingcap.tikv.exception.KeyException)1 RegionException (com.pingcap.tikv.exception.RegionException)1 Before (org.junit.Before)1