@Override
      public void run2() throws CacheException {
        Properties config = new Properties();
        config.put(LOCATORS, "localhost[" + DistributedTestUtils.getDUnitLocatorPort() + "]");
        Cache cache = new CacheFactory(config).create();
        AttributesFactory factory = new AttributesFactory();
        factory.setScope(Scope.LOCAL);
        cache.createRegionFactory(factory.create()).create(name);
        try {
          startBridgeServer(0, false);
        } catch (Exception ex) {
          Assert.fail("While starting CacheServer", ex);
        }
        // Create Index on empty region
        try {
          cache.getQueryService().createIndex("idIndex", "ID", SEPARATOR + name);
        } catch (Exception e) {
          Assert.fail("index creation failed", e);
        }
      }
The port on which the cache server was started in this VM
geode-core/src/distributedTest/java/org/apache/geode/cache/query/internal/index/PutAllWithIndexPerfDUnitTest.java