You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by kl...@apache.org on 2017/05/08 17:09:02 UTC

[1/4] geode git commit: Revert "GEODE-2879: LonerDistributionManager shutdown called from close" [Forced Update!]

Repository: geode
Updated Branches:
  refs/heads/feature/GEODE-2858 90200aa98 -> 25d02710a (forced update)


Revert "GEODE-2879: LonerDistributionManager shutdown called from close"

This reverts commit 149e06d53a33fa7363da15bf3f9cb248d94fabf5.


Project: http://git-wip-us.apache.org/repos/asf/geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/geode/commit/288676df
Tree: http://git-wip-us.apache.org/repos/asf/geode/tree/288676df
Diff: http://git-wip-us.apache.org/repos/asf/geode/diff/288676df

Branch: refs/heads/feature/GEODE-2858
Commit: 288676dfed0d6d4e0b20e81b2392854fa1204cb6
Parents: 9e089c5
Author: nabarun <nn...@pivotal.io>
Authored: Fri May 5 16:13:33 2017 -0700
Committer: nabarun <nn...@pivotal.io>
Committed: Fri May 5 16:13:33 2017 -0700

----------------------------------------------------------------------
 .../geode/distributed/internal/LonerDistributionManager.java     | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode/blob/288676df/geode-core/src/main/java/org/apache/geode/distributed/internal/LonerDistributionManager.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/distributed/internal/LonerDistributionManager.java b/geode-core/src/main/java/org/apache/geode/distributed/internal/LonerDistributionManager.java
index d700175..fdb6a13 100644
--- a/geode-core/src/main/java/org/apache/geode/distributed/internal/LonerDistributionManager.java
+++ b/geode-core/src/main/java/org/apache/geode/distributed/internal/LonerDistributionManager.java
@@ -284,9 +284,7 @@ public class LonerDistributionManager implements DM {
     return null;
   }
 
-  public void close() {
-    shutdown();
-  }
+  public void close() {}
 
   public void restartCommunications() {
 


[3/4] geode git commit: GEODE-2884: fix NPE when calling getLatestAsClassLoader before getLatest

Posted by kl...@apache.org.
GEODE-2884: fix NPE when calling getLatestAsClassLoader before getLatest

Without this fix, CacheXmlParserJUnitTest.testGetDelegate() fails when
run in isolation but passes when run with all tests.


Project: http://git-wip-us.apache.org/repos/asf/geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/geode/commit/d3520eaf
Tree: http://git-wip-us.apache.org/repos/asf/geode/tree/d3520eaf
Diff: http://git-wip-us.apache.org/repos/asf/geode/diff/d3520eaf

Branch: refs/heads/feature/GEODE-2858
Commit: d3520eaf34cd3e5d01f85c758d8cd3ed3ef5939a
Parents: 2d33a67
Author: Kirk Lund <kl...@apache.org>
Authored: Fri May 5 15:05:07 2017 -0700
Committer: Kirk Lund <kl...@apache.org>
Committed: Mon May 8 10:08:54 2017 -0700

----------------------------------------------------------------------
 .../apache/geode/internal/ClassPathLoader.java  | 49 +++++++++-----------
 1 file changed, 22 insertions(+), 27 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode/blob/d3520eaf/geode-core/src/main/java/org/apache/geode/internal/ClassPathLoader.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/ClassPathLoader.java b/geode-core/src/main/java/org/apache/geode/internal/ClassPathLoader.java
index 39e9d62..b272f8a 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/ClassPathLoader.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/ClassPathLoader.java
@@ -16,7 +16,6 @@ package org.apache.geode.internal;
 
 import static java.util.stream.Collectors.joining;
 
-import org.apache.commons.io.FileUtils;
 import org.apache.geode.distributed.internal.DistributionConfig;
 import org.apache.geode.internal.logging.LogService;
 import org.apache.geode.internal.util.CollectionUtils;
@@ -26,13 +25,13 @@ import java.io.File;
 import java.io.IOException;
 import java.io.InputStream;
 import java.lang.reflect.Proxy;
-import java.net.MalformedURLException;
 import java.net.URL;
 import java.net.URLClassLoader;
-import java.util.*;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.atomic.AtomicReference;
-import java.util.stream.Collectors;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Enumeration;
+import java.util.LinkedHashSet;
+import java.util.List;
 
 /**
  * The delegating <tt>ClassLoader</tt> used by GemFire to load classes and other resources. This
@@ -57,30 +56,27 @@ import java.util.stream.Collectors;
  * <li>4. <tt>ClassLoader.getSystemClassLoader()</tt> If the attempt to acquire any of the above
  * class loaders results in either a {@link java.lang.SecurityException SecurityException} or a
  * null, then that class loader is quietly skipped. Duplicate class loaders will be skipped.
- * 
+ * <p>
+ * This class it not an extension of ClassLoader due to #43080. See also
+ * http://docs.oracle.com/javase/specs/jvms/se7/html/jvms-5.html
+ *
  * @since GemFire 6.5.1.4
  */
-public final class ClassPathLoader {
-  /*
-   * This class it not an extension of ClassLoader due to reasons outlined in
-   * https://svn.gemstone.com/trac/gemfire/ticket/43080
-   * 
-   * See also http://docs.oracle.com/javase/specs/jvms/se7/html/jvms-5.html
-   */
+public class ClassPathLoader {
   private static final Logger logger = LogService.getLogger();
 
-  public static final String EXCLUDE_TCCL_PROPERTY =
+  static final String EXCLUDE_TCCL_PROPERTY =
       DistributionConfig.GEMFIRE_PREFIX + "excludeThreadContextClassLoader";
-  public static final boolean EXCLUDE_TCCL_DEFAULT_VALUE = false;
 
   private static volatile ClassPathLoader latest;
 
   private volatile URLClassLoader classLoaderForDeployedJars;
+
   private final JarDeployer jarDeployer;
 
   private boolean excludeTCCL;
 
-  public void rebuildClassLoaderForDeployedJars() {
+  void rebuildClassLoaderForDeployedJars() {
     ClassLoader parent = ClassPathLoader.class.getClassLoader();
 
     this.classLoaderForDeployedJars = new URLClassLoader(jarDeployer.getDeployedJarURLs(), parent);
@@ -98,7 +94,7 @@ public final class ClassPathLoader {
     rebuildClassLoaderForDeployedJars();
   }
 
-  public static ClassPathLoader setLatestToDefault() {
+  static ClassPathLoader setLatestToDefault() {
     latest = new ClassPathLoader(Boolean.getBoolean(EXCLUDE_TCCL_PROPERTY));
     return latest;
   }
@@ -112,7 +108,9 @@ public final class ClassPathLoader {
     return this.jarDeployer;
   }
 
-  // This is exposed for testing.
+  /**
+   * createWithDefaults is exposed for testing.
+   */
   static ClassPathLoader createWithDefaults(final boolean excludeTCCL) {
     return new ClassPathLoader(excludeTCCL);
   }
@@ -174,7 +172,7 @@ public final class ClassPathLoader {
   /**
    * See {@link Proxy#getProxyClass(ClassLoader, Class...)}
    */
-  public Class<?> getProxyClass(final Class<?>[] classObjs) {
+  Class<?> getProxyClass(final Class<?>... classObjs) {
     IllegalArgumentException ex = null;
 
     for (ClassLoader classLoader : this.getClassLoaders()) {
@@ -227,11 +225,9 @@ public final class ClassPathLoader {
 
   /**
    * Returns an input stream for reading the specified resource.
-   *
    * <p>
    * The search order is described in the documentation for {@link #getResource(String)}.
-   * </p>
-   * 
+   *
    * @param name The resource name
    * @return An input stream for reading the resource, or <tt>null</tt> if the resource could not be
    *         found
@@ -265,7 +261,6 @@ public final class ClassPathLoader {
     return getResourceAsStream(name);
   }
 
-
   /**
    * Finds all the resources with the given name. This method will first search the class loader of
    * the context class for the resource before searching all other {@link ClassLoader}s.
@@ -278,7 +273,7 @@ public final class ClassPathLoader {
    * @throws IOException If I/O errors occur
    * @see ClassLoader#getResources(String)
    */
-  public Enumeration<URL> getResources(final Class<?> contextClass, final String name)
+  private Enumeration<URL> getResources(final Class<?> contextClass, final String name)
       throws IOException {
     final LinkedHashSet<URL> urls = new LinkedHashSet<URL>();
 
@@ -369,8 +364,8 @@ public final class ClassPathLoader {
    * @return {@link ClassLoader} for current {@link ClassPathLoader}.
    * @since GemFire 8.1
    */
-  public static final ClassLoader getLatestAsClassLoader() {
-    return latest.asClassLoader();
+  public static ClassLoader getLatestAsClassLoader() {
+    return getLatest().asClassLoader();
   }
 
 }


[2/4] geode git commit: GEODE-2858: Add test for parsing of simple XML file w pool

Posted by kl...@apache.org.
GEODE-2858: Add test for parsing of simple XML file w pool

to detect/prevent regression to parsing exceptions that
was fixed in Geode 1.0

This closes #397


Project: http://git-wip-us.apache.org/repos/asf/geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/geode/commit/2d33a671
Tree: http://git-wip-us.apache.org/repos/asf/geode/tree/2d33a671
Diff: http://git-wip-us.apache.org/repos/asf/geode/diff/2d33a671

Branch: refs/heads/feature/GEODE-2858
Commit: 2d33a671f6e7da8c8a7e149a551948920240dcc5
Parents: 288676d
Author: Oleg Shvartsman <OS...@ford.com>
Authored: Mon Feb 13 15:52:01 2017 -0500
Committer: Kirk Lund <kl...@apache.org>
Committed: Mon May 8 10:08:53 2017 -0700

----------------------------------------------------------------------
 .../cache/query/LocalQueryServiceJUnitTest.java |  4 ++
 .../cache/xmlcache/CacheXmlParserJUnitTest.java | 51 ++++++++++++++++----
 ...JUnitTest.testSimpleClientCacheXml.cache.xml | 28 +++++++++++
 3 files changed, 73 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode/blob/2d33a671/geode-core/src/test/java/org/apache/geode/cache/query/LocalQueryServiceJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/cache/query/LocalQueryServiceJUnitTest.java b/geode-core/src/test/java/org/apache/geode/cache/query/LocalQueryServiceJUnitTest.java
index edd3f05..d3df451 100644
--- a/geode-core/src/test/java/org/apache/geode/cache/query/LocalQueryServiceJUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/cache/query/LocalQueryServiceJUnitTest.java
@@ -14,6 +14,8 @@
  */
 package org.apache.geode.cache.query;
 
+import org.apache.geode.internal.net.SocketCreatorFactory;
+import org.apache.geode.distributed.internal.DistributionConfigImpl;
 import org.apache.geode.cache.CacheTransactionManager;
 import org.apache.geode.cache.Region;
 import org.apache.geode.cache.client.ClientCache;
@@ -25,6 +27,7 @@ import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
 import java.io.IOException;
+import java.util.Properties;
 
 import static org.junit.Assert.assertEquals;
 
@@ -53,6 +56,7 @@ public class LocalQueryServiceJUnitTest {
   public void testLocalQueryServiceWithTransaction() throws Exception {
     ClientCache c = null;
     try {
+      SocketCreatorFactory.setDistributionConfig(new DistributionConfigImpl(new Properties()));
       c = new ClientCacheFactory().create();
       addExpectedException(c, IOException.class.getName());
       Region r = createRegion(c);

http://git-wip-us.apache.org/repos/asf/geode/blob/2d33a671/geode-core/src/test/java/org/apache/geode/internal/cache/xmlcache/CacheXmlParserJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/xmlcache/CacheXmlParserJUnitTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/xmlcache/CacheXmlParserJUnitTest.java
index 729dbfb..b0f5c8d 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/xmlcache/CacheXmlParserJUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/xmlcache/CacheXmlParserJUnitTest.java
@@ -14,20 +14,29 @@
  */
 package org.apache.geode.internal.cache.xmlcache;
 
-import static org.junit.Assert.*;
+import static org.apache.geode.distributed.ConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertSame;
+import static org.junit.Assert.assertTrue;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+
+import org.apache.geode.distributed.internal.DM;
+import org.apache.geode.distributed.internal.InternalDistributedSystem;
+import org.apache.geode.test.junit.categories.UnitTest;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import org.xml.sax.Attributes;
+import org.xml.sax.SAXException;
 
 import java.lang.reflect.Field;
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 import java.util.HashMap;
 import java.util.Locale;
-
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-import org.xml.sax.Attributes;
-import org.xml.sax.SAXException;
-
-import org.apache.geode.test.junit.categories.UnitTest;
+import java.util.Properties;
 
 /**
  * Test cases for {@link CacheXmlParser}.
@@ -79,6 +88,30 @@ public class CacheXmlParserJUnitTest {
   }
 
   /**
+   * Test that {@link CacheXmlParser} can parse the test cache.xml file.
+   * 
+   * @since Geode 1.2
+   */
+  @Test
+  public void testCacheXmlParserWithSimplePool() {
+    assertNotNull("Did not find simple config.xml file", getClass()
+        .getResourceAsStream("CacheXmlParserJUnitTest.testSimpleClientCacheXml.cache.xml"));
+
+    DM dm = mock(DM.class);
+
+    Properties nonDefault = new Properties();
+    nonDefault.setProperty(MCAST_PORT, "0"); // loner
+
+    InternalDistributedSystem system =
+        InternalDistributedSystem.newInstanceForTesting(dm, nonDefault);
+    when(dm.getSystem()).thenReturn(system);
+    InternalDistributedSystem.connect(nonDefault);
+
+    CacheXmlParser.parse(getClass()
+        .getResourceAsStream("CacheXmlParserJUnitTest.testSimpleClientCacheXml.cache.xml"));
+  }
+
+  /**
    * Test that {@link CacheXmlParser} falls back to DTD parsing when locale language is not English.
    * 
    * @since Geode 1.0
@@ -164,7 +197,5 @@ public class CacheXmlParserJUnitTest {
     public void endElement(String uri, String localName, String qName) throws SAXException {
       throw new UnsupportedOperationException();
     }
-
   }
-
 }

http://git-wip-us.apache.org/repos/asf/geode/blob/2d33a671/geode-core/src/test/resources/org/apache/geode/internal/cache/xmlcache/CacheXmlParserJUnitTest.testSimpleClientCacheXml.cache.xml
----------------------------------------------------------------------
diff --git a/geode-core/src/test/resources/org/apache/geode/internal/cache/xmlcache/CacheXmlParserJUnitTest.testSimpleClientCacheXml.cache.xml b/geode-core/src/test/resources/org/apache/geode/internal/cache/xmlcache/CacheXmlParserJUnitTest.testSimpleClientCacheXml.cache.xml
new file mode 100644
index 0000000..0a76a77
--- /dev/null
+++ b/geode-core/src/test/resources/org/apache/geode/internal/cache/xmlcache/CacheXmlParserJUnitTest.testSimpleClientCacheXml.cache.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<client-cache
+    xmlns="http://geode.apache.org/schema/cache"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://geode.apache.org/schema/cache http://geode.apache.org/schema/cache/cache-1.0.xsd"
+    version="1.0">
+     
+	<pool name="sessions" subscription-enabled="true">   
+		<server host="1.2.3.4" port="11211" /> 
+	</pool>
+</client-cache>
+


[4/4] geode git commit: GEODE-2887: exclude build-* output directories from rat

Posted by kl...@apache.org.
GEODE-2887: exclude build-* output directories from rat


Project: http://git-wip-us.apache.org/repos/asf/geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/geode/commit/25d02710
Tree: http://git-wip-us.apache.org/repos/asf/geode/tree/25d02710
Diff: http://git-wip-us.apache.org/repos/asf/geode/diff/25d02710

Branch: refs/heads/feature/GEODE-2858
Commit: 25d02710ad9a03b516c59d4efad8834a1873786d
Parents: d3520ea
Author: Kirk Lund <kl...@apache.org>
Authored: Fri May 5 15:33:27 2017 -0700
Committer: Kirk Lund <kl...@apache.org>
Committed: Mon May 8 10:08:55 2017 -0700

----------------------------------------------------------------------
 .../cache/query/LocalQueryServiceJUnitTest.java | 102 ++++++++-----------
 gradle/rat.gradle                               |   1 +
 2 files changed, 45 insertions(+), 58 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode/blob/25d02710/geode-core/src/test/java/org/apache/geode/cache/query/LocalQueryServiceJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/cache/query/LocalQueryServiceJUnitTest.java b/geode-core/src/test/java/org/apache/geode/cache/query/LocalQueryServiceJUnitTest.java
index d3df451..a474547 100644
--- a/geode-core/src/test/java/org/apache/geode/cache/query/LocalQueryServiceJUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/cache/query/LocalQueryServiceJUnitTest.java
@@ -14,88 +14,74 @@
  */
 package org.apache.geode.cache.query;
 
-import org.apache.geode.internal.net.SocketCreatorFactory;
-import org.apache.geode.distributed.internal.DistributionConfigImpl;
+import static org.apache.geode.test.dunit.IgnoredException.addIgnoredException;
+import static org.junit.Assert.assertEquals;
+
 import org.apache.geode.cache.CacheTransactionManager;
 import org.apache.geode.cache.Region;
 import org.apache.geode.cache.client.ClientCache;
 import org.apache.geode.cache.client.ClientCacheFactory;
 import org.apache.geode.cache.client.ClientRegionFactory;
 import org.apache.geode.cache.client.ClientRegionShortcut;
-import org.apache.geode.test.junit.categories.UnitTest;
+import org.apache.geode.test.dunit.IgnoredException;
+import org.apache.geode.test.junit.categories.IntegrationTest;
+import org.junit.After;
+import org.junit.Before;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
 import java.io.IOException;
-import java.util.Properties;
-
-import static org.junit.Assert.assertEquals;
 
-@Category(UnitTest.class)
+@Category(IntegrationTest.class)
 public class LocalQueryServiceJUnitTest {
 
-  @Test
-  public void testLocalQueryService() throws Exception {
-    ClientCache c = null;
-    try {
-      c = new ClientCacheFactory().create();
-      addExpectedException(c, IOException.class.getName());
-      Region r = createRegion(c);
-      int numEntries = 10;
-      loadRegion(r, numEntries);
-      SelectResults sR = executeLocalQuery(c, "SELECT * from /localRegion");
-      assertEquals(numEntries, sR.size());
-    } finally {
-      if (c != null) {
-        c.close();
-      }
+  private IgnoredException ignoredException;
+  private ClientCache clientCache;
+  private int numEntries;
+
+  @Before
+  public void before() throws Exception {
+    this.ignoredException = addIgnoredException(IOException.class.getName());
+
+    this.clientCache = new ClientCacheFactory().create();
+    ClientRegionFactory factory =
+        this.clientCache.createClientRegionFactory(ClientRegionShortcut.LOCAL);
+    Region region = factory.create("localRegion");
+    this.numEntries = 10;
+    for (int i = 0; i < this.numEntries; i++) {
+      region.put(i, i);
     }
   }
 
-  @Test
-  public void testLocalQueryServiceWithTransaction() throws Exception {
-    ClientCache c = null;
-    try {
-      SocketCreatorFactory.setDistributionConfig(new DistributionConfigImpl(new Properties()));
-      c = new ClientCacheFactory().create();
-      addExpectedException(c, IOException.class.getName());
-      Region r = createRegion(c);
-      int numEntries = 10;
-      loadRegion(r, numEntries);
-      CacheTransactionManager cacheTransactionManager = c.getCacheTransactionManager();
-      cacheTransactionManager.begin();
-      SelectResults sR = executeLocalQuery(c, "SELECT * from /localRegion");
-      assertEquals(numEntries, sR.size());
-      cacheTransactionManager.commit();
-    } finally {
-      if (c != null) {
-        c.close();
-      }
+  @After
+  public void after() throws Exception {
+    if (this.clientCache != null) {
+      this.clientCache.close();
     }
+    this.ignoredException.remove();
   }
 
-  private Region createRegion(ClientCache c) {
-    ClientRegionFactory factory = c.createClientRegionFactory(ClientRegionShortcut.LOCAL);
-    return factory.create("localRegion");
-  }
+  @Test
+  public void testLocalQueryService() throws Exception {
+    SelectResults sR = executeLocalQuery(this.clientCache, "SELECT * from /localRegion");
 
-  private void loadRegion(Region r, int numEntries) {
-    for (int i = 0; i < numEntries; i++) {
-      r.put(i, i);
-    }
+    assertEquals(this.numEntries, sR.size());
   }
 
-  private SelectResults executeLocalQuery(ClientCache c, String qS) throws QueryException {
-    QueryService qs = c.getLocalQueryService();
-    Query q = qs.newQuery("SELECT * from /localRegion");
-    return (SelectResults) q.execute();
-  }
+  @Test
+  public void testLocalQueryServiceWithTransaction() throws Exception {
+    CacheTransactionManager cacheTransactionManager = clientCache.getCacheTransactionManager();
+    cacheTransactionManager.begin();
+    SelectResults selectResults = executeLocalQuery(this.clientCache, "SELECT * from /localRegion");
+
+    assertEquals(this.numEntries, selectResults.size());
 
-  private void addExpectedException(ClientCache c, String exception) {
-    c.getLogger().info("<ExpectedException action=add>" + exception + "</ExpectedException>");
+    cacheTransactionManager.commit();
   }
 
-  private void removeExpectedException(ClientCache c, String exception) {
-    c.getLogger().info("<ExpectedException action=remove>" + exception + "</ExpectedException>");
+  private SelectResults executeLocalQuery(ClientCache c, String query) throws QueryException {
+    QueryService qs = c.getLocalQueryService();
+    Query q = qs.newQuery(query);
+    return (SelectResults) q.execute();
   }
 }

http://git-wip-us.apache.org/repos/asf/geode/blob/25d02710/gradle/rat.gradle
----------------------------------------------------------------------
diff --git a/gradle/rat.gradle b/gradle/rat.gradle
index 440a7b7..f8018b6 100644
--- a/gradle/rat.gradle
+++ b/gradle/rat.gradle
@@ -37,6 +37,7 @@ rat {
     'native/**',
     'wrapper/**',
     '**/build/**',
+    '**/build-*/**',
     '.buildinfo',
 
     // SBT