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/09/22 18:13:51 UTC

[geode] branch develop updated (124be5d -> 92a5f5a)

This is an automated email from the ASF dual-hosted git repository.

klund pushed a change to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git.


    from 124be5d  GEODE-3672: Partitioned Indexes now properly clean up if they fail to create
     new 043c298  GEODE-3476: rename, add RestAPITest category and RequiresGeodeHome rule
     new d4773af  GEODE-3477: rename and add RequiresGeodeHome rule
     new 77a009b  GEODE-3478: add RestAPITest category and RequiresGeodeHome rule
     new 3fdfa55  GEODE-3479: add RestAPITest category and RequiresGeodeHome rule
     new 42853b1  GEODE-3480: add RestAPITest category and RequiresGeodeHome rule
     new ac9c2ab  GEODE-3481: rename and add RequiresGeodeHome rule
     new 92a5f5a  GEODE-3482: rename, add SecurityTest category, RequiresGeodeHome rule

The 7 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 ...Test.java => RestInterfaceIntegrationTest.java} |  54 ++++--
 .../internal/web/RestSecurityIntegrationTest.java  |  18 +-
 .../web/RestSecurityPostProcessorTest.java         |  28 +--
 .../rest/internal/web/RestSecurityWithSSLTest.java |  23 ++-
 ...itTest.java => RestServersIntegrationTest.java} |  10 +-
 ...ava => SwaggerVerificationIntegrationTest.java} |  11 +-
 ...va => RestQueryAndFunctionIntegrationTest.java} | 212 +++++++++++----------
 7 files changed, 204 insertions(+), 152 deletions(-)
 rename geode-assembly/src/test/java/org/apache/geode/rest/internal/web/{RestInterfaceJUnitTest.java => RestInterfaceIntegrationTest.java} (95%)
 rename geode-assembly/src/test/java/org/apache/geode/rest/internal/web/{RestServersJUnitTest.java => RestServersIntegrationTest.java} (93%)
 rename geode-assembly/src/test/java/org/apache/geode/rest/internal/web/{SwaggerVerificationTest.java => SwaggerVerificationIntegrationTest.java} (88%)
 rename geode-assembly/src/test/java/org/apache/geode/rest/internal/web/controllers/{RestAPIsQueryAndFEJUnitTest.java => RestQueryAndFunctionIntegrationTest.java} (94%)

-- 
To stop receiving notification emails like this one, please contact
['"commits@geode.apache.org" <co...@geode.apache.org>'].

[geode] 07/07: GEODE-3482: rename, add SecurityTest category, RequiresGeodeHome rule

Posted by kl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

klund pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git

commit 92a5f5a062286ec26565a925aee71b81b3858392
Author: Kirk Lund <kl...@apache.org>
AuthorDate: Mon Aug 21 13:51:34 2017 -0700

    GEODE-3482: rename, add SecurityTest category, RequiresGeodeHome rule
---
 ...ationTest.java => SwaggerVerificationIntegrationTest.java} | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/geode-assembly/src/test/java/org/apache/geode/rest/internal/web/SwaggerVerificationTest.java b/geode-assembly/src/test/java/org/apache/geode/rest/internal/web/SwaggerVerificationIntegrationTest.java
similarity index 88%
rename from geode-assembly/src/test/java/org/apache/geode/rest/internal/web/SwaggerVerificationTest.java
rename to geode-assembly/src/test/java/org/apache/geode/rest/internal/web/SwaggerVerificationIntegrationTest.java
index 559d15d..2c25dbe 100644
--- a/geode-assembly/src/test/java/org/apache/geode/rest/internal/web/SwaggerVerificationTest.java
+++ b/geode-assembly/src/test/java/org/apache/geode/rest/internal/web/SwaggerVerificationIntegrationTest.java
@@ -20,22 +20,29 @@ import static org.junit.Assert.assertThat;
 
 import org.apache.geode.internal.i18n.LocalizedStrings;
 import org.apache.geode.security.SimpleTestSecurityManager;
+import org.apache.geode.test.dunit.rules.RequiresGeodeHome;
 import org.apache.geode.test.dunit.rules.ServerStarterRule;
 import org.apache.geode.test.junit.categories.IntegrationTest;
 import org.apache.geode.test.junit.categories.RestAPITest;
+import org.apache.geode.test.junit.categories.SecurityTest;
+
 import org.apache.http.HttpResponse;
 import org.json.JSONObject;
 import org.junit.ClassRule;
+import org.junit.Rule;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
-@Category({IntegrationTest.class, RestAPITest.class})
-public class SwaggerVerificationTest {
+@Category({IntegrationTest.class, SecurityTest.class, RestAPITest.class})
+public class SwaggerVerificationIntegrationTest {
 
   @ClassRule
   public static ServerStarterRule serverStarter = new ServerStarterRule()
       .withSecurityManager(SimpleTestSecurityManager.class).withRestService().withAutoStart();
 
+  @Rule
+  public RequiresGeodeHome requiresGeodeHome = new RequiresGeodeHome();
+
   @Test
   public void isSwaggerRunning() throws Exception {
     GeodeRestClient restClient = new GeodeRestClient("localhost", serverStarter.getHttpPort());

-- 
To stop receiving notification emails like this one, please contact
"commits@geode.apache.org" <co...@geode.apache.org>.

[geode] 02/07: GEODE-3477: rename and add RequiresGeodeHome rule

Posted by kl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

klund pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git

commit d4773afd83c602196392477fcdc5708d5a87be40
Author: Kirk Lund <kl...@apache.org>
AuthorDate: Mon Aug 21 13:26:41 2017 -0700

    GEODE-3477: rename and add RequiresGeodeHome rule
---
 ...Test.java => RestInterfaceIntegrationTest.java} | 54 +++++++++++++---------
 1 file changed, 33 insertions(+), 21 deletions(-)

diff --git a/geode-assembly/src/test/java/org/apache/geode/rest/internal/web/RestInterfaceJUnitTest.java b/geode-assembly/src/test/java/org/apache/geode/rest/internal/web/RestInterfaceIntegrationTest.java
similarity index 95%
rename from geode-assembly/src/test/java/org/apache/geode/rest/internal/web/RestInterfaceJUnitTest.java
rename to geode-assembly/src/test/java/org/apache/geode/rest/internal/web/RestInterfaceIntegrationTest.java
index 7cdc104..5bae86a 100644
--- a/geode-assembly/src/test/java/org/apache/geode/rest/internal/web/RestInterfaceJUnitTest.java
+++ b/geode-assembly/src/test/java/org/apache/geode/rest/internal/web/RestInterfaceIntegrationTest.java
@@ -14,8 +14,17 @@
  */
 package org.apache.geode.rest.internal.web;
 
-import static org.apache.geode.distributed.ConfigurationProperties.*;
-import static org.junit.Assert.*;
+import static org.apache.geode.distributed.ConfigurationProperties.HTTP_SERVICE_BIND_ADDRESS;
+import static org.apache.geode.distributed.ConfigurationProperties.HTTP_SERVICE_PORT;
+import static org.apache.geode.distributed.ConfigurationProperties.LOG_LEVEL;
+import static org.apache.geode.distributed.ConfigurationProperties.MCAST_PORT;
+import static org.apache.geode.distributed.ConfigurationProperties.START_DEV_REST_API;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNotSame;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
 
 import java.io.BufferedReader;
 import java.io.IOException;
@@ -34,6 +43,23 @@ import javax.annotation.Resource;
 import com.fasterxml.jackson.core.JsonParser.Feature;
 import com.fasterxml.jackson.databind.DeserializationFeature;
 import com.fasterxml.jackson.databind.ObjectMapper;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.client.ClientHttpResponse;
+import org.springframework.http.converter.HttpMessageConverter;
+import org.springframework.http.converter.json.Jackson2ObjectMapperFactoryBean;
+import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
+import org.springframework.util.Assert;
+import org.springframework.util.ObjectUtils;
+import org.springframework.util.StringUtils;
+import org.springframework.web.client.ResponseErrorHandler;
+import org.springframework.web.client.RestTemplate;
+
 import org.apache.geode.cache.Cache;
 import org.apache.geode.cache.CacheFactory;
 import org.apache.geode.cache.DataPolicy;
@@ -49,23 +75,9 @@ import org.apache.geode.pdx.PdxReader;
 import org.apache.geode.pdx.PdxSerializable;
 import org.apache.geode.pdx.PdxWriter;
 import org.apache.geode.pdx.ReflectionBasedAutoSerializer;
+import org.apache.geode.test.dunit.rules.RequiresGeodeHome;
 import org.apache.geode.test.junit.categories.IntegrationTest;
 import org.apache.geode.test.junit.categories.RestAPITest;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.http.HttpStatus;
-import org.springframework.http.client.ClientHttpResponse;
-import org.springframework.http.converter.HttpMessageConverter;
-import org.springframework.http.converter.json.Jackson2ObjectMapperFactoryBean;
-import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
-import org.springframework.util.Assert;
-import org.springframework.util.ObjectUtils;
-import org.springframework.util.StringUtils;
-import org.springframework.web.client.ResponseErrorHandler;
-import org.springframework.web.client.RestTemplate;
 
 /**
  * The GemFireRestInterfaceTest class is a test suite of test cases testing the contract and
@@ -83,11 +95,11 @@ import org.springframework.web.client.RestTemplate;
  * @see org.apache.geode.pdx.ReflectionBasedAutoSerializer
  * @since Geode 1.0.0
  */
-// @RunWith(SpringJUnit4ClassRunner.class)
-// @ContextConfiguration
-@SuppressWarnings("unused")
 @Category({IntegrationTest.class, RestAPITest.class})
-public class RestInterfaceJUnitTest {
+public class RestInterfaceIntegrationTest {
+
+  @Rule
+  public RequiresGeodeHome requiresGeodeHome = new RequiresGeodeHome();
 
   protected static int DEFAULT_HTTP_SERVICE_PORT = 8189;
 

-- 
To stop receiving notification emails like this one, please contact
"commits@geode.apache.org" <co...@geode.apache.org>.

[geode] 03/07: GEODE-3478: add RestAPITest category and RequiresGeodeHome rule

Posted by kl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

klund pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git

commit 77a009b89ec24decbdbe4f045b9d11be54c31adc
Author: Kirk Lund <kl...@apache.org>
AuthorDate: Mon Aug 21 13:33:28 2017 -0700

    GEODE-3478: add RestAPITest category and RequiresGeodeHome rule
---
 .../rest/internal/web/RestSecurityIntegrationTest.java | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

diff --git a/geode-assembly/src/test/java/org/apache/geode/rest/internal/web/RestSecurityIntegrationTest.java b/geode-assembly/src/test/java/org/apache/geode/rest/internal/web/RestSecurityIntegrationTest.java
index 0f1be57..3c99a26 100644
--- a/geode-assembly/src/test/java/org/apache/geode/rest/internal/web/RestSecurityIntegrationTest.java
+++ b/geode-assembly/src/test/java/org/apache/geode/rest/internal/web/RestSecurityIntegrationTest.java
@@ -20,22 +20,25 @@ import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
 
-import org.apache.geode.cache.RegionShortcut;
-import org.apache.geode.security.TestSecurityManager;
-import org.apache.geode.test.dunit.rules.ServerStarterRule;
-import org.apache.geode.test.junit.categories.IntegrationTest;
-import org.apache.geode.test.junit.categories.SecurityTest;
 import org.apache.http.HttpResponse;
 import org.json.JSONArray;
 import org.json.JSONObject;
 import org.junit.BeforeClass;
 import org.junit.ClassRule;
+import org.junit.Rule;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 import org.springframework.http.MediaType;
 
+import org.apache.geode.cache.RegionShortcut;
+import org.apache.geode.security.TestSecurityManager;
+import org.apache.geode.test.dunit.rules.RequiresGeodeHome;
+import org.apache.geode.test.dunit.rules.ServerStarterRule;
+import org.apache.geode.test.junit.categories.IntegrationTest;
+import org.apache.geode.test.junit.categories.RestAPITest;
+import org.apache.geode.test.junit.categories.SecurityTest;
 
-@Category({IntegrationTest.class, SecurityTest.class})
+@Category({IntegrationTest.class, SecurityTest.class, RestAPITest.class})
 public class RestSecurityIntegrationTest {
 
   protected static final String REGION_NAME = "AuthRegion";
@@ -50,6 +53,9 @@ public class RestSecurityIntegrationTest {
   private final GeodeRestClient restClient =
       new GeodeRestClient("localhost", serverStarter.getHttpPort());
 
+  @Rule
+  public RequiresGeodeHome requiresGeodeHome = new RequiresGeodeHome();
+
   @BeforeClass
   public static void before() throws Exception {
     serverStarter.getCache().createRegionFactory(RegionShortcut.REPLICATE).create(REGION_NAME);

-- 
To stop receiving notification emails like this one, please contact
"commits@geode.apache.org" <co...@geode.apache.org>.

[geode] 04/07: GEODE-3479: add RestAPITest category and RequiresGeodeHome rule

Posted by kl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

klund pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git

commit 3fdfa55ac0158989700ff8a964bf5b86b0f20629
Author: Kirk Lund <kl...@apache.org>
AuthorDate: Mon Aug 21 13:38:35 2017 -0700

    GEODE-3479: add RestAPITest category and RequiresGeodeHome rule
---
 .../web/RestSecurityPostProcessorTest.java         | 28 +++++++++++++---------
 1 file changed, 17 insertions(+), 11 deletions(-)

diff --git a/geode-assembly/src/test/java/org/apache/geode/rest/internal/web/RestSecurityPostProcessorTest.java b/geode-assembly/src/test/java/org/apache/geode/rest/internal/web/RestSecurityPostProcessorTest.java
index 652c3a1..27eaa90 100644
--- a/geode-assembly/src/test/java/org/apache/geode/rest/internal/web/RestSecurityPostProcessorTest.java
+++ b/geode-assembly/src/test/java/org/apache/geode/rest/internal/web/RestSecurityPostProcessorTest.java
@@ -23,27 +23,30 @@ import static org.assertj.core.api.Assertions.assertThat;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 
-import org.apache.geode.cache.Region;
-import org.apache.geode.cache.RegionShortcut;
-import org.apache.geode.rest.internal.web.controllers.Customer;
-import org.apache.geode.rest.internal.web.controllers.RedactingPostProcessor;
-import org.apache.geode.security.TestSecurityManager;
-import org.apache.geode.test.dunit.rules.ServerStarterRule;
-import org.apache.geode.test.junit.categories.IntegrationTest;
-import org.apache.geode.test.junit.categories.SecurityTest;
+import java.net.URLEncoder;
+
 import org.apache.http.HttpResponse;
 import org.json.JSONArray;
 import org.json.JSONObject;
 import org.junit.BeforeClass;
 import org.junit.ClassRule;
+import org.junit.Rule;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 import org.springframework.http.MediaType;
 
-import java.net.URLEncoder;
-
+import org.apache.geode.cache.Region;
+import org.apache.geode.cache.RegionShortcut;
+import org.apache.geode.rest.internal.web.controllers.Customer;
+import org.apache.geode.rest.internal.web.controllers.RedactingPostProcessor;
+import org.apache.geode.security.TestSecurityManager;
+import org.apache.geode.test.dunit.rules.RequiresGeodeHome;
+import org.apache.geode.test.dunit.rules.ServerStarterRule;
+import org.apache.geode.test.junit.categories.IntegrationTest;
+import org.apache.geode.test.junit.categories.RestAPITest;
+import org.apache.geode.test.junit.categories.SecurityTest;
 
-@Category({IntegrationTest.class, SecurityTest.class})
+@Category({IntegrationTest.class, SecurityTest.class, RestAPITest.class})
 public class RestSecurityPostProcessorTest {
 
   @ClassRule
@@ -57,6 +60,9 @@ public class RestSecurityPostProcessorTest {
   private final GeodeRestClient restClient =
       new GeodeRestClient("localhost", serverStarter.getHttpPort());
 
+  @Rule
+  public RequiresGeodeHome requiresGeodeHome = new RequiresGeodeHome();
+
   @BeforeClass
   public static void before() throws Exception {
     Region region =

-- 
To stop receiving notification emails like this one, please contact
"commits@geode.apache.org" <co...@geode.apache.org>.

[geode] 01/07: GEODE-3476: rename, add RestAPITest category and RequiresGeodeHome rule

Posted by kl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

klund pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git

commit 043c298919e0480ebfb3faeca405a933cb1ce5f8
Author: Kirk Lund <kl...@apache.org>
AuthorDate: Mon Aug 21 13:18:41 2017 -0700

    GEODE-3476: rename, add RestAPITest category and RequiresGeodeHome rule
    
    Also moved the "inner-classes" inside the outer class and made
    static.
---
 ...va => RestQueryAndFunctionIntegrationTest.java} | 212 +++++++++++----------
 1 file changed, 111 insertions(+), 101 deletions(-)

diff --git a/geode-assembly/src/test/java/org/apache/geode/rest/internal/web/controllers/RestAPIsQueryAndFEJUnitTest.java b/geode-assembly/src/test/java/org/apache/geode/rest/internal/web/controllers/RestQueryAndFunctionIntegrationTest.java
similarity index 94%
rename from geode-assembly/src/test/java/org/apache/geode/rest/internal/web/controllers/RestAPIsQueryAndFEJUnitTest.java
rename to geode-assembly/src/test/java/org/apache/geode/rest/internal/web/controllers/RestQueryAndFunctionIntegrationTest.java
index 1b2ab47..d75b54d 100644
--- a/geode-assembly/src/test/java/org/apache/geode/rest/internal/web/controllers/RestAPIsQueryAndFEJUnitTest.java
+++ b/geode-assembly/src/test/java/org/apache/geode/rest/internal/web/controllers/RestQueryAndFunctionIntegrationTest.java
@@ -22,6 +22,33 @@ import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+
+import org.json.JSONArray;
+import org.json.JSONException;
+import org.json.JSONObject;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import org.springframework.http.HttpEntity;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.HttpMethod;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.MediaType;
+import org.springframework.http.ResponseEntity;
+import org.springframework.util.StringUtils;
+import org.springframework.web.client.HttpClientErrorException;
+import org.springframework.web.client.HttpServerErrorException;
+
 import org.apache.geode.cache.AttributesFactory;
 import org.apache.geode.cache.Cache;
 import org.apache.geode.cache.CacheFactory;
@@ -45,35 +72,15 @@ import org.apache.geode.internal.GemFireVersion;
 import org.apache.geode.internal.net.SocketCreator;
 import org.apache.geode.management.internal.AgentUtil;
 import org.apache.geode.management.internal.ManagementConstants;
+import org.apache.geode.test.dunit.rules.RequiresGeodeHome;
 import org.apache.geode.test.junit.categories.IntegrationTest;
-import org.json.JSONArray;
-import org.json.JSONException;
-import org.json.JSONObject;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-import org.springframework.http.HttpEntity;
-import org.springframework.http.HttpHeaders;
-import org.springframework.http.HttpMethod;
-import org.springframework.http.HttpStatus;
-import org.springframework.http.MediaType;
-import org.springframework.http.ResponseEntity;
-import org.springframework.util.StringUtils;
-import org.springframework.web.client.HttpClientErrorException;
-import org.springframework.web.client.HttpServerErrorException;
+import org.apache.geode.test.junit.categories.RestAPITest;
 
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
+@Category({IntegrationTest.class, RestAPITest.class})
+public class RestQueryAndFunctionIntegrationTest {
 
-@Category(IntegrationTest.class)
-public class RestAPIsQueryAndFEJUnitTest {
+  @Rule
+  public RequiresGeodeHome requiresGeodeHome = new RequiresGeodeHome();
 
   private Cache c;
 
@@ -842,107 +849,110 @@ public class RestAPIsQueryAndFEJUnitTest {
       }
     }
   }
-}
 
+  static class SimpleCacheLoader implements CacheLoader<String, Object>, Declarable {
 
-// TODO: move following classes to be inner classes
+    @Override
+    public Object load(LoaderHelper helper) {
+      // throws TimeoutException
+      throw new TimeoutException("Could not load, Request Timedout...!!");
+    }
 
-class SimpleCacheLoader implements CacheLoader<String, Object>, Declarable {
+    @Override
+    public void close() {
+      // nothing
+    }
 
-  @Override
-  public Object load(LoaderHelper helper) {
-    // throws TimeoutException
-    throw new TimeoutException("Could not load, Request Timedout...!!");
+    @Override
+    public void init(Properties props) {
+      // nothing
+    }
   }
 
-  @Override
-  public void close() {}
+  static class SampleCacheWriter implements CacheWriter<String, Object> {
 
-  @Override
-  public void init(Properties props) {
-
-  }
-}
+    @Override
+    public void close() {
+      // nothing
+    }
 
+    @Override
+    public void beforeUpdate(EntryEvent event) throws CacheWriterException {
+      // nothing
+    }
 
-class SampleCacheWriter implements CacheWriter<String, Object> {
+    @Override
+    public void beforeCreate(EntryEvent event) throws CacheWriterException {
+      throw new CacheWriterException("Put request failed as gemfire has thrown error...!!");
+    }
 
-  @Override
-  public void close() {}
+    @Override
+    public void beforeDestroy(EntryEvent event) throws CacheWriterException {
+      throw new RegionDestroyedException("Region has been destroyed already...!!", "dummyRegion");
+    }
 
-  @Override
-  public void beforeUpdate(EntryEvent event) throws CacheWriterException {}
+    @Override
+    public void beforeRegionDestroy(RegionEvent event) throws CacheWriterException {
+      // nothing
+    }
 
-  @Override
-  public void beforeCreate(EntryEvent event) throws CacheWriterException {
-    throw new CacheWriterException("Put request failed as gemfire has thrown error...!!");
+    @Override
+    public void beforeRegionClear(RegionEvent event) throws CacheWriterException {
+      // nothing
+    }
   }
 
-  @Override
-  public void beforeDestroy(EntryEvent event) throws CacheWriterException {
-    throw new RegionDestroyedException("Region has been destroyed already...!!", "dummyRegion");
+  enum QueryType {
+    LIST_ALL_NAMED_QUERY, EXECUTE_NAMED_QUERY, EXECUTE_ADHOC_QUERY
   }
 
-  @Override
-  public void beforeRegionDestroy(RegionEvent event) throws CacheWriterException {}
-
-  @Override
-  public void beforeRegionClear(RegionEvent event) throws CacheWriterException {}
-}
-
-
-enum QueryType {
-  LIST_ALL_NAMED_QUERY, EXECUTE_NAMED_QUERY, EXECUTE_ADHOC_QUERY
-}
-
-
-class QueryResultData {
+  static class QueryResultData {
 
-  private int queryIndex;
-  private QueryType type;
-  private int resultSize;
-  private List<String> result;
+    private int queryIndex;
+    private QueryType type;
+    private int resultSize;
+    private List<String> result;
 
-  public QueryResultData() {}
+    public QueryResultData() {}
 
-  @SuppressWarnings("unused")
-  public QueryResultData(int index, QueryType type, int size, List<String> result) {
-    this.queryIndex = index;
-    this.type = type;
-    this.resultSize = size;
-    this.result = result;
-  }
+    @SuppressWarnings("unused")
+    public QueryResultData(int index, QueryType type, int size, List<String> result) {
+      this.queryIndex = index;
+      this.type = type;
+      this.resultSize = size;
+      this.result = result;
+    }
 
-  public QueryType getType() {
-    return type;
-  }
+    public QueryType getType() {
+      return type;
+    }
 
-  public void setType(QueryType type) {
-    this.type = type;
-  }
+    public void setType(QueryType type) {
+      this.type = type;
+    }
 
-  public int getQueryIndex() {
-    return queryIndex;
-  }
+    public int getQueryIndex() {
+      return queryIndex;
+    }
 
-  public void setQueryIndex(int queryIndex) {
-    this.queryIndex = queryIndex;
-  }
+    public void setQueryIndex(int queryIndex) {
+      this.queryIndex = queryIndex;
+    }
 
-  public int getResultSize() {
-    return resultSize;
-  }
+    public int getResultSize() {
+      return resultSize;
+    }
 
-  public void setResultSize(int resultSize) {
-    this.resultSize = resultSize;
-  }
+    public void setResultSize(int resultSize) {
+      this.resultSize = resultSize;
+    }
 
-  public List<String> getResult() {
-    return result;
-  }
+    public List<String> getResult() {
+      return result;
+    }
 
-  public void setResult(List<String> result) {
-    this.result = result;
+    public void setResult(List<String> result) {
+      this.result = result;
+    }
   }
-
 }

-- 
To stop receiving notification emails like this one, please contact
"commits@geode.apache.org" <co...@geode.apache.org>.

[geode] 06/07: GEODE-3481: rename and add RequiresGeodeHome rule

Posted by kl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

klund pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git

commit ac9c2ab035e2840ac71df1ae097961e7c72595c6
Author: Kirk Lund <kl...@apache.org>
AuthorDate: Mon Aug 21 13:47:39 2017 -0700

    GEODE-3481: rename and add RequiresGeodeHome rule
---
 ...stServersJUnitTest.java => RestServersIntegrationTest.java} | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/geode-assembly/src/test/java/org/apache/geode/rest/internal/web/RestServersJUnitTest.java b/geode-assembly/src/test/java/org/apache/geode/rest/internal/web/RestServersIntegrationTest.java
similarity index 93%
rename from geode-assembly/src/test/java/org/apache/geode/rest/internal/web/RestServersJUnitTest.java
rename to geode-assembly/src/test/java/org/apache/geode/rest/internal/web/RestServersIntegrationTest.java
index 0c2765a..8cf74f7 100644
--- a/geode-assembly/src/test/java/org/apache/geode/rest/internal/web/RestServersJUnitTest.java
+++ b/geode-assembly/src/test/java/org/apache/geode/rest/internal/web/RestServersIntegrationTest.java
@@ -12,7 +12,6 @@
  * or implied. See the License for the specific language governing permissions and limitations under
  * the License.
  */
-
 package org.apache.geode.rest.internal.web;
 
 import static org.apache.geode.distributed.internal.DistributionConfig.DEFAULT_HTTP_SERVICE_PORT;
@@ -24,22 +23,27 @@ import org.apache.http.HttpStatus;
 import org.json.JSONArray;
 import org.junit.BeforeClass;
 import org.junit.ClassRule;
+import org.junit.Rule;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
 import org.apache.geode.internal.AvailablePort;
+import org.apache.geode.test.dunit.rules.RequiresGeodeHome;
 import org.apache.geode.test.dunit.rules.ServerStarterRule;
 import org.apache.geode.test.junit.categories.IntegrationTest;
 import org.apache.geode.test.junit.categories.RestAPITest;
 
 @Category({IntegrationTest.class, RestAPITest.class})
-public class RestServersJUnitTest {
+public class RestServersIntegrationTest {
+
+  private static GeodeRestClient restClient;
 
   @ClassRule
   public static ServerStarterRule serverStarter = new ServerStarterRule().withRestService(true);
 
 
-  private static GeodeRestClient restClient;
+  @Rule
+  public RequiresGeodeHome requiresGeodeHome = new RequiresGeodeHome();
 
   @BeforeClass
   public static void before() throws Exception {

-- 
To stop receiving notification emails like this one, please contact
"commits@geode.apache.org" <co...@geode.apache.org>.

[geode] 05/07: GEODE-3480: add RestAPITest category and RequiresGeodeHome rule

Posted by kl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

klund pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git

commit 42853b169381c708f1dae1b4cd2a4bad5fe47f77
Author: Kirk Lund <kl...@apache.org>
AuthorDate: Mon Aug 21 13:43:44 2017 -0700

    GEODE-3480: add RestAPITest category and RequiresGeodeHome rule
---
 .../rest/internal/web/RestSecurityWithSSLTest.java | 23 ++++++++++++++--------
 1 file changed, 15 insertions(+), 8 deletions(-)

diff --git a/geode-assembly/src/test/java/org/apache/geode/rest/internal/web/RestSecurityWithSSLTest.java b/geode-assembly/src/test/java/org/apache/geode/rest/internal/web/RestSecurityWithSSLTest.java
index ac50716..1cb52a8 100644
--- a/geode-assembly/src/test/java/org/apache/geode/rest/internal/web/RestSecurityWithSSLTest.java
+++ b/geode-assembly/src/test/java/org/apache/geode/rest/internal/web/RestSecurityWithSSLTest.java
@@ -25,24 +25,31 @@ import static org.apache.geode.distributed.ConfigurationProperties.SSL_TRUSTSTOR
 import static org.apache.geode.distributed.ConfigurationProperties.SSL_TRUSTSTORE_PASSWORD;
 import static org.junit.Assert.assertEquals;
 
-import org.apache.geode.internal.security.SecurableCommunicationChannel;
-import org.apache.geode.security.SimpleTestSecurityManager;
-import org.apache.geode.test.dunit.rules.ServerStarterRule;
-import org.apache.geode.test.junit.categories.IntegrationTest;
-import org.apache.geode.test.junit.categories.SecurityTest;
+import java.net.URL;
+
 import org.apache.http.HttpResponse;
 import org.junit.Rule;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
-import java.net.URL;
+import org.apache.geode.internal.security.SecurableCommunicationChannel;
+import org.apache.geode.security.SimpleTestSecurityManager;
+import org.apache.geode.test.dunit.rules.RequiresGeodeHome;
+import org.apache.geode.test.dunit.rules.ServerStarterRule;
+import org.apache.geode.test.junit.categories.IntegrationTest;
+import org.apache.geode.test.junit.categories.RestAPITest;
+import org.apache.geode.test.junit.categories.SecurityTest;
 
-@Category({IntegrationTest.class, SecurityTest.class})
+@Category({IntegrationTest.class, SecurityTest.class, RestAPITest.class})
 public class RestSecurityWithSSLTest {
-  private static URL KEYSTORE_URL =
+
+  private static final URL KEYSTORE_URL =
       RestSecurityWithSSLTest.class.getClassLoader().getResource("ssl/trusted.keystore");
 
   @Rule
+  public RequiresGeodeHome requiresGeodeHome = new RequiresGeodeHome();
+
+  @Rule
   public ServerStarterRule serverStarter = new ServerStarterRule().withRestService()
       .withProperty(SECURITY_MANAGER, SimpleTestSecurityManager.class.getName())
       .withProperty(SSL_ENABLED_COMPONENTS, SecurableCommunicationChannel.WEB.getConstant())

-- 
To stop receiving notification emails like this one, please contact
"commits@geode.apache.org" <co...@geode.apache.org>.