Search in sources :

Example 6 with OrderByPartitionedJUnitTest

use of org.apache.geode.cache.query.functional.OrderByPartitionedJUnitTest in project geode by apache.

the class OrderByPartitionedDUnitTest method testOrderedResultsPartitionedRegion_Bug43514_1.

@Test
public void testOrderedResultsPartitionedRegion_Bug43514_1() 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();
    OrderByPartitionedJUnitTest test = createTestInstance();
    test.testOrderedResultsPartitionedRegion_Bug43514_1();
    this.closeCache(vm0, vm1, vm2, vm3);
}
Also used : OrderByPartitionedJUnitTest(org.apache.geode.cache.query.functional.OrderByPartitionedJUnitTest) VM(org.apache.geode.test.dunit.VM) Host(org.apache.geode.test.dunit.Host) Cache(org.apache.geode.cache.Cache) Test(org.junit.Test) OrderByPartitionedJUnitTest(org.apache.geode.cache.query.functional.OrderByPartitionedJUnitTest) DistributedTest(org.apache.geode.test.junit.categories.DistributedTest)

Example 7 with OrderByPartitionedJUnitTest

use of org.apache.geode.cache.query.functional.OrderByPartitionedJUnitTest in project geode by apache.

the class OrderByPartitionedDUnitTest 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();
    OrderByPartitionedJUnitTest test = createTestInstance();
    test.testOrderByWithIndexResultWithProjection();
    this.closeCache(vm0, vm1, vm2, vm3);
}
Also used : OrderByPartitionedJUnitTest(org.apache.geode.cache.query.functional.OrderByPartitionedJUnitTest) VM(org.apache.geode.test.dunit.VM) Host(org.apache.geode.test.dunit.Host) Cache(org.apache.geode.cache.Cache) Test(org.junit.Test) OrderByPartitionedJUnitTest(org.apache.geode.cache.query.functional.OrderByPartitionedJUnitTest) DistributedTest(org.apache.geode.test.junit.categories.DistributedTest)

Example 8 with OrderByPartitionedJUnitTest

use of org.apache.geode.cache.query.functional.OrderByPartitionedJUnitTest in project geode by apache.

the class OrderByPartitionedDUnitTest method testOrderByForUndefined.

@Test
public void testOrderByForUndefined() 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();
    OrderByPartitionedJUnitTest test = createTestInstance();
    test.testOrderByForUndefined();
    this.closeCache(vm0, vm1, vm2, vm3);
}
Also used : OrderByPartitionedJUnitTest(org.apache.geode.cache.query.functional.OrderByPartitionedJUnitTest) VM(org.apache.geode.test.dunit.VM) Host(org.apache.geode.test.dunit.Host) Cache(org.apache.geode.cache.Cache) Test(org.junit.Test) OrderByPartitionedJUnitTest(org.apache.geode.cache.query.functional.OrderByPartitionedJUnitTest) DistributedTest(org.apache.geode.test.junit.categories.DistributedTest)

Example 9 with OrderByPartitionedJUnitTest

use of org.apache.geode.cache.query.functional.OrderByPartitionedJUnitTest in project geode by apache.

the class OrderByPartitionedDUnitTest method testOrderByWithNullValues.

@Test
public void testOrderByWithNullValues() 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();
    OrderByPartitionedJUnitTest test = createTestInstance();
    test.testOrderByWithNullValues();
    this.closeCache(vm0, vm1, vm2, vm3);
}
Also used : OrderByPartitionedJUnitTest(org.apache.geode.cache.query.functional.OrderByPartitionedJUnitTest) VM(org.apache.geode.test.dunit.VM) Host(org.apache.geode.test.dunit.Host) Cache(org.apache.geode.cache.Cache) Test(org.junit.Test) OrderByPartitionedJUnitTest(org.apache.geode.cache.query.functional.OrderByPartitionedJUnitTest) DistributedTest(org.apache.geode.test.junit.categories.DistributedTest)

Example 10 with OrderByPartitionedJUnitTest

use of org.apache.geode.cache.query.functional.OrderByPartitionedJUnitTest in project geode by apache.

the class OrderByPartitionedDUnitTest method createTestInstance.

private OrderByPartitionedJUnitTest createTestInstance() {
    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);
    OrderByPartitionedJUnitTest test = new OrderByPartitionedJUnitTest() {

        @Override
        public Region createRegion(String regionName, Class valueConstraint) {
            // TODO Auto-generated method stub
            Region rgn = createAccessor(regionName, valueConstraint);
            createPR(vm1, regionName, valueConstraint);
            createPR(vm2, regionName, valueConstraint);
            createPR(vm3, regionName, valueConstraint);
            return rgn;
        }

        @Override
        public Index createIndex(String indexName, String indexedExpression, String regionPath) throws IndexInvalidException, IndexNameConflictException, IndexExistsException, RegionNotFoundException, UnsupportedOperationException {
            Index indx = createIndexOnAccessor(indexName, indexedExpression, regionPath);
            return indx;
        }

        @Override
        public Index createIndex(String indexName, IndexType indexType, String indexedExpression, String fromClause) throws IndexInvalidException, IndexNameConflictException, IndexExistsException, RegionNotFoundException, UnsupportedOperationException {
            Index indx = createIndexOnAccessor(indexName, indexType, indexedExpression, fromClause);
            return indx;
        }

        @Override
        public boolean assertIndexUsedOnQueryNode() {
            return false;
        }
    };
    return test;
}
Also used : OrderByPartitionedJUnitTest(org.apache.geode.cache.query.functional.OrderByPartitionedJUnitTest) VM(org.apache.geode.test.dunit.VM) Region(org.apache.geode.cache.Region) Host(org.apache.geode.test.dunit.Host) Index(org.apache.geode.cache.query.Index) IndexType(org.apache.geode.cache.query.IndexType)

Aggregations

OrderByPartitionedJUnitTest (org.apache.geode.cache.query.functional.OrderByPartitionedJUnitTest)13 Host (org.apache.geode.test.dunit.Host)13 VM (org.apache.geode.test.dunit.VM)13 Cache (org.apache.geode.cache.Cache)12 DistributedTest (org.apache.geode.test.junit.categories.DistributedTest)12 Test (org.junit.Test)12 Region (org.apache.geode.cache.Region)1 Index (org.apache.geode.cache.query.Index)1 IndexType (org.apache.geode.cache.query.IndexType)1