Repository: incubator-geode
Updated Branches:
  refs/heads/develop c4e63ac0d -> 813fa909c


GEODE-1925 : Copy the resources directory inside build directory

        * Tests use the resources folder for its execution, hence it needs to 
be in the build directory.
        * This was initially handled by gradle, but caused issues when test 
catagory tags were changed.
        * This action is now handled by the test code.


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

Branch: refs/heads/develop
Commit: 813fa909c19247f0999fa719d0e5d0e8f04593ca
Parents: c4e63ac
Author: nabarun <n...@pivotal.io>
Authored: Wed Sep 21 14:44:04 2016 -0700
Committer: nabarun <n...@pivotal.io>
Committed: Wed Sep 21 14:44:04 2016 -0700

----------------------------------------------------------------------
 extensions/geode-modules-tomcat7/build.gradle               | 9 ---------
 .../geode/modules/session/catalina/DeltaSession7.java       | 5 +++--
 extensions/geode-modules-tomcat8/build.gradle               | 8 --------
 extensions/geode-modules/build.gradle                       | 9 ---------
 .../org/apache/geode/modules/session/EmbeddedTomcat.java    | 2 +-
 .../org/apache/geode/modules/session/TestSessionsBase.java  | 3 +++
 6 files changed, 7 insertions(+), 29 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/813fa909/extensions/geode-modules-tomcat7/build.gradle
----------------------------------------------------------------------
diff --git a/extensions/geode-modules-tomcat7/build.gradle 
b/extensions/geode-modules-tomcat7/build.gradle
index 3c75e56..185bafd 100644
--- a/extensions/geode-modules-tomcat7/build.gradle
+++ b/extensions/geode-modules-tomcat7/build.gradle
@@ -15,15 +15,6 @@
  * limitations under the License.
  */
 
-test  {
-  doFirst {
-    copy {
-      from 'build/resources/test/tomcat'
-      into 'build/test/tomcat/'
-    }
-  }
-}
-
 dependencies {
   compile(project(':extensions/geode-modules')) {
     // Remove everything related to Tomcat 6.x

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/813fa909/extensions/geode-modules-tomcat7/src/main/java/org/apache/geode/modules/session/catalina/DeltaSession7.java
----------------------------------------------------------------------
diff --git 
a/extensions/geode-modules-tomcat7/src/main/java/org/apache/geode/modules/session/catalina/DeltaSession7.java
 
b/extensions/geode-modules-tomcat7/src/main/java/org/apache/geode/modules/session/catalina/DeltaSession7.java
index c9be3fe..0df05ff 100644
--- 
a/extensions/geode-modules-tomcat7/src/main/java/org/apache/geode/modules/session/catalina/DeltaSession7.java
+++ 
b/extensions/geode-modules-tomcat7/src/main/java/org/apache/geode/modules/session/catalina/DeltaSession7.java
@@ -527,14 +527,15 @@ public class DeltaSession7 extends StandardSession 
implements DataSerializable,
 
     // Initialize the transients if necessary
     if (this.listeners == null) {
-      this.listeners = new ArrayList();
+      this.listeners = new ArrayList<>();
     }
 
     if (this.notes == null) {
-      this.notes = new Hashtable();
+      this.notes = new Hashtable<>();
     }
   }
 
+  @SuppressWarnings({"unchecked", "rawtypes"})
   protected ConcurrentMap readInAttributes(final DataInput in) throws 
IOException, ClassNotFoundException {
     return DataSerializer.readObject(in);
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/813fa909/extensions/geode-modules-tomcat8/build.gradle
----------------------------------------------------------------------
diff --git a/extensions/geode-modules-tomcat8/build.gradle 
b/extensions/geode-modules-tomcat8/build.gradle
index dfa86cf..df36ab3 100644
--- a/extensions/geode-modules-tomcat8/build.gradle
+++ b/extensions/geode-modules-tomcat8/build.gradle
@@ -15,14 +15,6 @@
  * limitations under the License.
  */
 
-test  {
-  doFirst {
-    copy {
-      from 'build/resources/test/tomcat'
-      into 'build/test/tomcat/'
-    }
-  }
-}
 
 dependencies {
   compile(project(':extensions/geode-modules')) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/813fa909/extensions/geode-modules/build.gradle
----------------------------------------------------------------------
diff --git a/extensions/geode-modules/build.gradle 
b/extensions/geode-modules/build.gradle
index 81a926c..0ac8c9a 100644
--- a/extensions/geode-modules/build.gradle
+++ b/extensions/geode-modules/build.gradle
@@ -15,15 +15,6 @@
  * limitations under the License.
  */
 
-test  {
-  doFirst {
-    copy {
-      from 'build/resources/test/tomcat'
-      into 'build/test/tomcat/'
-    }
-  }
-}
-
 dependencies {
   compile project(':geode-core')
   

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/813fa909/extensions/geode-modules/src/test/java/org/apache/geode/modules/session/EmbeddedTomcat.java
----------------------------------------------------------------------
diff --git 
a/extensions/geode-modules/src/test/java/org/apache/geode/modules/session/EmbeddedTomcat.java
 
b/extensions/geode-modules/src/test/java/org/apache/geode/modules/session/EmbeddedTomcat.java
index 1d97149..9ba4d8f 100644
--- 
a/extensions/geode-modules/src/test/java/org/apache/geode/modules/session/EmbeddedTomcat.java
+++ 
b/extensions/geode-modules/src/test/java/org/apache/geode/modules/session/EmbeddedTomcat.java
@@ -78,7 +78,7 @@ public class EmbeddedTomcat {
     // create server
     container = new Embedded();
     container.setCatalinaHome(catalinaHome);
-    // Not really necessasry, but let's still do it...
+
     container.setRealm(new MemoryRealm());
 
     // create webapp loader

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/813fa909/extensions/geode-modules/src/test/java/org/apache/geode/modules/session/TestSessionsBase.java
----------------------------------------------------------------------
diff --git 
a/extensions/geode-modules/src/test/java/org/apache/geode/modules/session/TestSessionsBase.java
 
b/extensions/geode-modules/src/test/java/org/apache/geode/modules/session/TestSessionsBase.java
index a680d9e..d0c4b19 100644
--- 
a/extensions/geode-modules/src/test/java/org/apache/geode/modules/session/TestSessionsBase.java
+++ 
b/extensions/geode-modules/src/test/java/org/apache/geode/modules/session/TestSessionsBase.java
@@ -20,6 +20,7 @@ import static 
org.apache.geode.distributed.ConfigurationProperties.*;
 import static org.junit.Assert.*;
 
 import java.beans.PropertyChangeEvent;
+import java.io.File;
 import java.io.IOException;
 import java.io.PrintWriter;
 import javax.servlet.http.HttpServletRequest;
@@ -31,6 +32,7 @@ import com.meterware.httpunit.WebConversation;
 import com.meterware.httpunit.WebRequest;
 import com.meterware.httpunit.WebResponse;
 import org.apache.catalina.core.StandardWrapper;
+import org.apache.commons.io.FileUtils;
 import org.junit.AfterClass;
 import org.junit.Before;
 import org.junit.Test;
@@ -54,6 +56,7 @@ public abstract class TestSessionsBase {
 
   // Set up the servers we need
   public static void setupServer(DeltaSessionManager manager) throws Exception 
{
+    FileUtils.copyDirectory(new File("../resources/test/tomcat"), new 
File("./tomcat"));
     port = AvailablePortHelper.getRandomAvailableTCPPort();
     server = new EmbeddedTomcat("/test", port, "JVM-1");
 

Reply via email to