Search in sources :

Example 11 with Cache

use of org.apache.geode.cache.Cache in project geode by apache.

the class NonDistinctOrderByDUnitImpl method testMultiColOrderByWithIndexResultDefaultProjection.

@Test
public void testMultiColOrderByWithIndexResultDefaultProjection() throws Exception {
    Host host = Host.getHost(0);
    final VM vm0 = host.getVM(0);
    final VM vm1 = host.getVM(1);
    final VM vm2 = host.getVM(2);
    final VM vm3 = host.getVM(3);
    Cache cache = this.getCache();
    NonDistinctOrderByTestImplementation test = createTestInstance();
    test.testMultiColOrderByWithIndexResultDefaultProjection();
    this.closeCache(vm0, vm1, vm2, vm3);
}
Also used : NonDistinctOrderByTestImplementation(org.apache.geode.cache.query.functional.NonDistinctOrderByTestImplementation) VM(org.apache.geode.test.dunit.VM) Host(org.apache.geode.test.dunit.Host) Cache(org.apache.geode.cache.Cache) Test(org.junit.Test) DistributedTest(org.apache.geode.test.junit.categories.DistributedTest)

Example 12 with Cache

use of org.apache.geode.cache.Cache in project geode by apache.

the class NonDistinctOrderByDUnitImpl method testOrderByWithIndexResultDefaultProjection.

@Test
public void testOrderByWithIndexResultDefaultProjection() throws Exception {
    Host host = Host.getHost(0);
    final VM vm0 = host.getVM(0);
    final VM vm1 = host.getVM(1);
    final VM vm2 = host.getVM(2);
    final VM vm3 = host.getVM(3);
    Cache cache = this.getCache();
    NonDistinctOrderByTestImplementation test = createTestInstance();
    test.testOrderByWithIndexResultDefaultProjection();
    this.closeCache(vm0, vm1, vm2, vm3);
}
Also used : NonDistinctOrderByTestImplementation(org.apache.geode.cache.query.functional.NonDistinctOrderByTestImplementation) VM(org.apache.geode.test.dunit.VM) Host(org.apache.geode.test.dunit.Host) Cache(org.apache.geode.cache.Cache) Test(org.junit.Test) DistributedTest(org.apache.geode.test.junit.categories.DistributedTest)

Example 13 with Cache

use of org.apache.geode.cache.Cache in project geode by apache.

the class NonDistinctOrderByDUnitImpl method testMultiColOrderByWithMultiIndexResultDefaultProjection.

@Test
public void testMultiColOrderByWithMultiIndexResultDefaultProjection() throws Exception {
    Host host = Host.getHost(0);
    final VM vm0 = host.getVM(0);
    final VM vm1 = host.getVM(1);
    final VM vm2 = host.getVM(2);
    final VM vm3 = host.getVM(3);
    Cache cache = this.getCache();
    NonDistinctOrderByTestImplementation test = createTestInstance();
    test.testMultiColOrderByWithMultiIndexResultDefaultProjection();
    this.closeCache(vm0, vm1, vm2, vm3);
}
Also used : NonDistinctOrderByTestImplementation(org.apache.geode.cache.query.functional.NonDistinctOrderByTestImplementation) VM(org.apache.geode.test.dunit.VM) Host(org.apache.geode.test.dunit.Host) Cache(org.apache.geode.cache.Cache) Test(org.junit.Test) DistributedTest(org.apache.geode.test.junit.categories.DistributedTest)

Example 14 with Cache

use of org.apache.geode.cache.Cache in project geode by apache.

the class NonDistinctOrderByDUnitImpl method testOrderByWithIndexResultWithProjection.

@Test
public void testOrderByWithIndexResultWithProjection() throws Exception {
    Host host = Host.getHost(0);
    final VM vm0 = host.getVM(0);
    final VM vm1 = host.getVM(1);
    final VM vm2 = host.getVM(2);
    final VM vm3 = host.getVM(3);
    Cache cache = this.getCache();
    NonDistinctOrderByTestImplementation test = createTestInstance();
    test.testOrderByWithIndexResultWithProjection();
    this.closeCache(vm0, vm1, vm2, vm3);
}
Also used : NonDistinctOrderByTestImplementation(org.apache.geode.cache.query.functional.NonDistinctOrderByTestImplementation) VM(org.apache.geode.test.dunit.VM) Host(org.apache.geode.test.dunit.Host) Cache(org.apache.geode.cache.Cache) Test(org.junit.Test) DistributedTest(org.apache.geode.test.junit.categories.DistributedTest)

Example 15 with Cache

use of org.apache.geode.cache.Cache in project geode by apache.

the class NonDistinctOrderByPartitionedDUnitTest method createAccessor.

private Region createAccessor(String regionName, Class valueConstraint) {
    Cache cache = getCache();
    PartitionAttributesFactory paf = new PartitionAttributesFactory();
    paf.setTotalNumBuckets(10);
    paf.setLocalMaxMemory(0);
    return cache.createRegionFactory(RegionShortcut.PARTITION_PROXY).setValueConstraint(valueConstraint).setPartitionAttributes(paf.create()).create(regionName);
}
Also used : PartitionAttributesFactory(org.apache.geode.cache.PartitionAttributesFactory) Cache(org.apache.geode.cache.Cache)

Aggregations

Cache (org.apache.geode.cache.Cache)1044 Region (org.apache.geode.cache.Region)478 Test (org.junit.Test)476 DistributedTest (org.apache.geode.test.junit.categories.DistributedTest)292 SerializableRunnable (org.apache.geode.test.dunit.SerializableRunnable)277 VM (org.apache.geode.test.dunit.VM)264 Host (org.apache.geode.test.dunit.Host)230 AttributesFactory (org.apache.geode.cache.AttributesFactory)229 PartitionedRegion (org.apache.geode.internal.cache.PartitionedRegion)177 PartitionAttributesFactory (org.apache.geode.cache.PartitionAttributesFactory)176 CacheSerializableRunnable (org.apache.geode.cache30.CacheSerializableRunnable)164 LocalRegion (org.apache.geode.internal.cache.LocalRegion)153 FlakyTest (org.apache.geode.test.junit.categories.FlakyTest)123 ClientCache (org.apache.geode.cache.client.ClientCache)117 SerializableCallable (org.apache.geode.test.dunit.SerializableCallable)112 Properties (java.util.Properties)101 CacheException (org.apache.geode.cache.CacheException)101 RegionAttributes (org.apache.geode.cache.RegionAttributes)99 QueryService (org.apache.geode.cache.query.QueryService)95 IntegrationTest (org.apache.geode.test.junit.categories.IntegrationTest)93