@Override
      public void run2() throws CacheException {
        LogWriterUtils.getLogWriter().info("### Create Cache Server. ###");
        // AttributesFactory factory = new AttributesFactory();
        // factory.setScope(Scope.DISTRIBUTED_ACK);
        // factory.setMirrorType(MirrorType.KEYS_VALUES);

        // int maxMem = 0;
        AttributesFactory attr = new AttributesFactory();
        // attr.setValueConstraint(valueConstraint);
        PartitionAttributesFactory paf = new PartitionAttributesFactory();
        if (isAccessor) {
          paf.setLocalMaxMemory(0);
        }
        PartitionAttributes prAttr =
            paf.setTotalNumBuckets(197).setRedundantCopies(redundantCopies).create();
        attr.setPartitionAttributes(prAttr);

        assertFalse(getSystem().isLoner());
        // assertTrue(getSystem().getDistributionManager().getOtherDistributionManagerIds().size() >
        // 0);
        for (final String region : regions) {
          Region r = createRegion(region, attr.create());
          LogWriterUtils.getLogWriter().info("Server created the region: " + r);
        }
        // pause(2000);
        try {
          startBridgeServer(port, true);
        } catch (Exception ex) {
          Assert.fail("While starting CacheServer", ex);
        }
        // pause(2000);

      }
Create a cache server with partitioned region.

@param server VM where to create the cache server.
@param port cache server port.
@param isAccessor if true the under lying partitioned region will not host data on this vm.
@param redundantCopies number of redundant copies for the primary bucket.
geode-cq/src/distributedTest/java/org/apache/geode/cache/query/cq/dunit/PrCqUsingPoolDUnitTest.java