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:53 UTC

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

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>.