Search in sources :

Example 11 with NonDistinctOrderByTestImplementation

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

the class NonDistinctOrderByPartitionedDUnitTest method createTestInstance.

@Override
protected NonDistinctOrderByTestImplementation 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);
    NonDistinctOrderByTestImplementation test = new NonDistinctOrderByTestImplementation() {

        @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);
            /*
         * NonDistinctOrderByPartitionedDUnit.this.createIndex(vm1, indexName, indexedExpression,
         * regionPath); NonDistinctOrderByPartitionedDUnit.this.createIndex(vm2, indexName,
         * indexedExpression, regionPath); NonDistinctOrderByPartitionedDUnit.this.createIndex(vm3,
         * 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);
            /*
         * NonDistinctOrderByPartitionedDUnit.this.createIndex(vm1, indexName, indexType,
         * indexedExpression, fromClause); NonDistinctOrderByPartitionedDUnit.this.createIndex(vm2,
         * indexName, indexType, indexedExpression, fromClause);
         * NonDistinctOrderByPartitionedDUnit.this.createIndex(vm3, indexName,
         * indexType,indexedExpression, fromClause);
         */
            return indx;
        }

        @Override
        public boolean assertIndexUsedOnQueryNode() {
            return false;
        }
    };
    return test;
}
Also used : NonDistinctOrderByTestImplementation(org.apache.geode.cache.query.functional.NonDistinctOrderByTestImplementation) 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

NonDistinctOrderByTestImplementation (org.apache.geode.cache.query.functional.NonDistinctOrderByTestImplementation)11 Host (org.apache.geode.test.dunit.Host)11 VM (org.apache.geode.test.dunit.VM)11 Cache (org.apache.geode.cache.Cache)10 DistributedTest (org.apache.geode.test.junit.categories.DistributedTest)10 Test (org.junit.Test)10 Region (org.apache.geode.cache.Region)1 Index (org.apache.geode.cache.query.Index)1 IndexType (org.apache.geode.cache.query.IndexType)1