geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From u..@apache.org
Subject [09/11] incubator-geode git commit: Fixed eclipse compilation and test execution issues
Date Mon, 12 Sep 2016 19:30:50 GMT
Fixed eclipse compilation and test execution issues

With the eclipse compiler, AsyncEventListenerDUnitTest was generating a
compilation error about a deserializeLambda method being to large. This
doesn't seem to be a real issue because the javac doesn't have
the same problem. However, by refactoring the test slightly I was able
to make this error go away.

Changed the eclipse classpath to include the generated-resources
directories. These directories contain files like
GemFireVersion.properties that need to be included on the classpath, but
we were filtering them out.


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

Branch: refs/heads/feature/GEODE-420
Commit: e4a09a6a784ff729c006dba28ec697fd89ac86cd
Parents: 182cacb
Author: Dan Smith <upthewaterspout@apache.org>
Authored: Tue Aug 30 16:36:59 2016 -0700
Committer: Dan Smith <upthewaterspout@apache.org>
Committed: Fri Sep 9 13:27:47 2016 -0700

----------------------------------------------------------------------
 .../asyncqueue/AsyncEventListenerDUnitTest.java | 74 +++++++-------------
 gradle/ide.gradle                               | 11 +--
 2 files changed, 33 insertions(+), 52 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e4a09a6a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/asyncqueue/AsyncEventListenerDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/asyncqueue/AsyncEventListenerDUnitTest.java
b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/asyncqueue/AsyncEventListenerDUnitTest.java
index 4c78bdc..35f6810 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/asyncqueue/AsyncEventListenerDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/asyncqueue/AsyncEventListenerDUnitTest.java
@@ -732,10 +732,7 @@ public class AsyncEventListenerDUnitTest extends AsyncEventQueueTestBase
{
     vm3.invoke(createAsyncEventQueueRunnable());
     vm4.invoke(createAsyncEventQueueRunnable());
 
-    vm1.invoke(() -> AsyncEventQueueTestBase.createPartitionedRegionWithAsyncEventQueue(
getTestMethodName() + "_PR", "ln", isOffHeap() ));
-    vm2.invoke(() -> AsyncEventQueueTestBase.createPartitionedRegionWithAsyncEventQueue(
getTestMethodName() + "_PR", "ln", isOffHeap() ));
-    vm3.invoke(() -> AsyncEventQueueTestBase.createPartitionedRegionWithAsyncEventQueue(
getTestMethodName() + "_PR", "ln", isOffHeap() ));
-    vm4.invoke(() -> AsyncEventQueueTestBase.createPartitionedRegionWithAsyncEventQueue(
getTestMethodName() + "_PR", "ln", isOffHeap() ));
+    createPartitionedRegionWithAsyncEventQueue();
 
     vm1.invoke(() -> AsyncEventQueueTestBase.doPuts( getTestMethodName() + "_PR",
         500 ));
@@ -771,10 +768,7 @@ public class AsyncEventListenerDUnitTest extends AsyncEventQueueTestBase
{
     vm4.invoke(() -> AsyncEventQueueTestBase.createAsyncEventQueue( "ln",
         false, 100, 100, true, false, null, false ));
 
-    vm1.invoke(() -> AsyncEventQueueTestBase.createPartitionedRegionWithAsyncEventQueue(
getTestMethodName() + "_PR", "ln", isOffHeap() ));
-    vm2.invoke(() -> AsyncEventQueueTestBase.createPartitionedRegionWithAsyncEventQueue(
getTestMethodName() + "_PR", "ln", isOffHeap() ));
-    vm3.invoke(() -> AsyncEventQueueTestBase.createPartitionedRegionWithAsyncEventQueue(
getTestMethodName() + "_PR", "ln", isOffHeap() ));
-    vm4.invoke(() -> AsyncEventQueueTestBase.createPartitionedRegionWithAsyncEventQueue(
getTestMethodName() + "_PR", "ln", isOffHeap() ));
+    createPartitionedRegionWithAsyncEventQueue();
 
     vm1
         .invoke(pauseAsyncEventQueueRunnable());
@@ -856,10 +850,7 @@ public class AsyncEventListenerDUnitTest extends AsyncEventQueueTestBase
{
     vm4.invoke(() -> AsyncEventQueueTestBase.createAsyncEventQueue( "ln",
         false, 100, 100, false, true, null, false ));
 
-    vm1.invoke(() -> AsyncEventQueueTestBase.createPartitionedRegionWithAsyncEventQueue(
getTestMethodName() + "_PR", "ln", isOffHeap() ));
-    vm2.invoke(() -> AsyncEventQueueTestBase.createPartitionedRegionWithAsyncEventQueue(
getTestMethodName() + "_PR", "ln", isOffHeap() ));
-    vm3.invoke(() -> AsyncEventQueueTestBase.createPartitionedRegionWithAsyncEventQueue(
getTestMethodName() + "_PR", "ln", isOffHeap() ));
-    vm4.invoke(() -> AsyncEventQueueTestBase.createPartitionedRegionWithAsyncEventQueue(
getTestMethodName() + "_PR", "ln", isOffHeap() ));
+    createPartitionedRegionWithAsyncEventQueue();
 
     vm1.invoke(() -> AsyncEventQueueTestBase.doPuts( getTestMethodName() + "_PR",
         500 ));
@@ -960,18 +951,12 @@ public class AsyncEventListenerDUnitTest extends AsyncEventQueueTestBase
{
     vm4.invoke(() -> AsyncEventQueueTestBase.createAsyncEventQueue( "ln",
         true, 100, 100, false, false, null, false ));
 
-    vm1.invoke(() -> AsyncEventQueueTestBase.createPartitionedRegionWithAsyncEventQueue(
getTestMethodName() + "_PR", "ln", isOffHeap() ));
-    vm2.invoke(() -> AsyncEventQueueTestBase.createPartitionedRegionWithAsyncEventQueue(
getTestMethodName() + "_PR", "ln", isOffHeap() ));
-    vm3.invoke(() -> AsyncEventQueueTestBase.createPartitionedRegionWithAsyncEventQueue(
getTestMethodName() + "_PR", "ln", isOffHeap() ));
-    vm4.invoke(() -> AsyncEventQueueTestBase.createPartitionedRegionWithAsyncEventQueue(
getTestMethodName() + "_PR", "ln", isOffHeap() ));
+    createPartitionedRegionWithAsyncEventQueue();
 
     vm1.invoke(() -> AsyncEventQueueTestBase.doPuts( getTestMethodName() + "_PR",
         256 ));
     
-    vm1.invoke(() -> AsyncEventQueueTestBase.waitForAsyncQueueToGetEmpty( "ln" ));
-    vm2.invoke(() -> AsyncEventQueueTestBase.waitForAsyncQueueToGetEmpty( "ln" ));
-    vm3.invoke(() -> AsyncEventQueueTestBase.waitForAsyncQueueToGetEmpty( "ln" ));
-    vm4.invoke(() -> AsyncEventQueueTestBase.waitForAsyncQueueToGetEmpty( "ln" ));
+    waitForAsyncQueueToGetEmpty();
     
     int vm1size = (Integer)vm1.invoke(() -> AsyncEventQueueTestBase.getAsyncEventListenerMapSize(
"ln"));
     int vm2size = (Integer)vm2.invoke(() -> AsyncEventQueueTestBase.getAsyncEventListenerMapSize(
"ln"));
@@ -981,6 +966,20 @@ public class AsyncEventListenerDUnitTest extends AsyncEventQueueTestBase
{
     assertEquals(vm1size + vm2size + vm3size + vm4size, 256);
   }
 
+private void createPartitionedRegionWithAsyncEventQueue() {
+	vm1.invoke(() -> AsyncEventQueueTestBase.createPartitionedRegionWithAsyncEventQueue(
getTestMethodName() + "_PR", "ln", isOffHeap() ));
+    vm2.invoke(() -> AsyncEventQueueTestBase.createPartitionedRegionWithAsyncEventQueue(
getTestMethodName() + "_PR", "ln", isOffHeap() ));
+    vm3.invoke(() -> AsyncEventQueueTestBase.createPartitionedRegionWithAsyncEventQueue(
getTestMethodName() + "_PR", "ln", isOffHeap() ));
+    vm4.invoke(() -> AsyncEventQueueTestBase.createPartitionedRegionWithAsyncEventQueue(
getTestMethodName() + "_PR", "ln", isOffHeap() ));
+}
+
+private void waitForAsyncQueueToGetEmpty() {
+	vm1.invoke(() -> AsyncEventQueueTestBase.waitForAsyncQueueToGetEmpty( "ln" ));
+    vm2.invoke(() -> AsyncEventQueueTestBase.waitForAsyncQueueToGetEmpty( "ln" ));
+    vm3.invoke(() -> AsyncEventQueueTestBase.waitForAsyncQueueToGetEmpty( "ln" ));
+    vm4.invoke(() -> AsyncEventQueueTestBase.waitForAsyncQueueToGetEmpty( "ln" ));
+}
+
   @Test
   public void testParallelAsyncEventQueueWithSubstitutionFilter() {
     Integer lnPort = (Integer)vm0.invoke(() -> AsyncEventQueueTestBase.createFirstLocatorWithDSId(
1 ));
@@ -1074,10 +1073,7 @@ public class AsyncEventListenerDUnitTest extends AsyncEventQueueTestBase
{
     vm4.invoke(() -> AsyncEventQueueTestBase.createAsyncEventQueue( "ln",
         true, 100, 100, false, false, null, false ));
 
-    vm1.invoke(() -> AsyncEventQueueTestBase.createPartitionedRegionWithAsyncEventQueue(
getTestMethodName() + "_PR", "ln", isOffHeap() ));
-    vm2.invoke(() -> AsyncEventQueueTestBase.createPartitionedRegionWithAsyncEventQueue(
getTestMethodName() + "_PR", "ln", isOffHeap() ));
-    vm3.invoke(() -> AsyncEventQueueTestBase.createPartitionedRegionWithAsyncEventQueue(
getTestMethodName() + "_PR", "ln", isOffHeap() ));
-    vm4.invoke(() -> AsyncEventQueueTestBase.createPartitionedRegionWithAsyncEventQueue(
getTestMethodName() + "_PR", "ln", isOffHeap() ));
+    createPartitionedRegionWithAsyncEventQueue();
 
     vm1
         .invoke(pauseAsyncEventQueueRunnable());
@@ -1121,10 +1117,7 @@ public class AsyncEventListenerDUnitTest extends AsyncEventQueueTestBase
{
 	vm4.invoke(() -> AsyncEventQueueTestBase.createConcurrentAsyncEventQueue( "ln",
 	  true, 100, 100, false, false, null, false, 2, OrderPolicy.KEY ));
 
-	vm1.invoke(() -> AsyncEventQueueTestBase.createPartitionedRegionWithAsyncEventQueue(
getTestMethodName() + "_PR", "ln", isOffHeap() ));
-	vm2.invoke(() -> AsyncEventQueueTestBase.createPartitionedRegionWithAsyncEventQueue(
getTestMethodName() + "_PR", "ln", isOffHeap() ));
-	vm3.invoke(() -> AsyncEventQueueTestBase.createPartitionedRegionWithAsyncEventQueue(
getTestMethodName() + "_PR", "ln", isOffHeap() ));
-	vm4.invoke(() -> AsyncEventQueueTestBase.createPartitionedRegionWithAsyncEventQueue(
getTestMethodName() + "_PR", "ln", isOffHeap() ));
+	createPartitionedRegionWithAsyncEventQueue();
 
 	vm1
 	  .invoke(pauseAsyncEventQueueRunnable());
@@ -1164,10 +1157,7 @@ public class AsyncEventListenerDUnitTest extends AsyncEventQueueTestBase
{
     vm4.invoke(() -> AsyncEventQueueTestBase.createAsyncEventQueue( "ln",
         true, 100, 100, true, false, null, false ));
 
-    vm1.invoke(() -> AsyncEventQueueTestBase.createPartitionedRegionWithAsyncEventQueue(
getTestMethodName() + "_PR", "ln", isOffHeap() ));
-    vm2.invoke(() -> AsyncEventQueueTestBase.createPartitionedRegionWithAsyncEventQueue(
getTestMethodName() + "_PR", "ln", isOffHeap() ));
-    vm3.invoke(() -> AsyncEventQueueTestBase.createPartitionedRegionWithAsyncEventQueue(
getTestMethodName() + "_PR", "ln", isOffHeap() ));
-    vm4.invoke(() -> AsyncEventQueueTestBase.createPartitionedRegionWithAsyncEventQueue(
getTestMethodName() + "_PR", "ln", isOffHeap() ));
+    createPartitionedRegionWithAsyncEventQueue();
 
     vm1
         .invoke(pauseAsyncEventQueueRunnable());
@@ -1215,10 +1205,7 @@ public class AsyncEventListenerDUnitTest extends AsyncEventQueueTestBase
{
     vm3.invoke(() -> AsyncEventQueueTestBase.resumeAsyncEventQueue( "ln" ));
     vm4.invoke(() -> AsyncEventQueueTestBase.resumeAsyncEventQueue( "ln" ));
 
-    vm1.invoke(() -> AsyncEventQueueTestBase.waitForAsyncQueueToGetEmpty( "ln" ));
-    vm2.invoke(() -> AsyncEventQueueTestBase.waitForAsyncQueueToGetEmpty( "ln" ));
-    vm3.invoke(() -> AsyncEventQueueTestBase.waitForAsyncQueueToGetEmpty( "ln" ));
-    vm4.invoke(() -> AsyncEventQueueTestBase.waitForAsyncQueueToGetEmpty( "ln" ));
+    waitForAsyncQueueToGetEmpty();
     
     int vm1size = (Integer)vm1.invoke(() -> AsyncEventQueueTestBase.getAsyncEventListenerMapSize(
"ln"));
     int vm2size = (Integer)vm2.invoke(() -> AsyncEventQueueTestBase.getAsyncEventListenerMapSize(
"ln"));
@@ -1295,10 +1282,7 @@ public class AsyncEventListenerDUnitTest extends AsyncEventQueueTestBase
{
     vm3.invoke(() -> AsyncEventQueueTestBase.resumeAsyncEventQueue( "ln" ));
     vm4.invoke(() -> AsyncEventQueueTestBase.resumeAsyncEventQueue( "ln" ));
 
-    vm1.invoke(() -> AsyncEventQueueTestBase.waitForAsyncQueueToGetEmpty( "ln" ));
-    vm2.invoke(() -> AsyncEventQueueTestBase.waitForAsyncQueueToGetEmpty( "ln" ));
-    vm3.invoke(() -> AsyncEventQueueTestBase.waitForAsyncQueueToGetEmpty( "ln" ));
-    vm4.invoke(() -> AsyncEventQueueTestBase.waitForAsyncQueueToGetEmpty( "ln" ));
+    waitForAsyncQueueToGetEmpty();
     
     int vm1size = (Integer)vm1.invoke(() -> AsyncEventQueueTestBase.getAsyncEventListenerMapSize(
"ln"));
     int vm2size = (Integer)vm2.invoke(() -> AsyncEventQueueTestBase.getAsyncEventListenerMapSize(
"ln"));
@@ -1368,18 +1352,12 @@ public class AsyncEventListenerDUnitTest extends AsyncEventQueueTestBase
{
     vm4.invoke(() -> AsyncEventQueueTestBase.createAsyncEventQueue( "ln",
         true, 100, 100, false, true, null, false ));
 
-    vm1.invoke(() -> AsyncEventQueueTestBase.createPartitionedRegionWithAsyncEventQueue(
getTestMethodName() + "_PR", "ln", isOffHeap() ));
-    vm2.invoke(() -> AsyncEventQueueTestBase.createPartitionedRegionWithAsyncEventQueue(
getTestMethodName() + "_PR", "ln", isOffHeap() ));
-    vm3.invoke(() -> AsyncEventQueueTestBase.createPartitionedRegionWithAsyncEventQueue(
getTestMethodName() + "_PR", "ln", isOffHeap() ));
-    vm4.invoke(() -> AsyncEventQueueTestBase.createPartitionedRegionWithAsyncEventQueue(
getTestMethodName() + "_PR", "ln", isOffHeap() ));
+    createPartitionedRegionWithAsyncEventQueue();
 
     vm1.invoke(() -> AsyncEventQueueTestBase.doPuts( getTestMethodName() + "_PR",
         256 ));
     
-    vm1.invoke(() -> AsyncEventQueueTestBase.waitForAsyncQueueToGetEmpty( "ln" ));
-    vm2.invoke(() -> AsyncEventQueueTestBase.waitForAsyncQueueToGetEmpty( "ln" ));
-    vm3.invoke(() -> AsyncEventQueueTestBase.waitForAsyncQueueToGetEmpty( "ln" ));
-    vm4.invoke(() -> AsyncEventQueueTestBase.waitForAsyncQueueToGetEmpty( "ln" ));
+    waitForAsyncQueueToGetEmpty();
     
     int vm1size = (Integer)vm1.invoke(() -> AsyncEventQueueTestBase.getAsyncEventListenerMapSize(
"ln"));
     int vm2size = (Integer)vm2.invoke(() -> AsyncEventQueueTestBase.getAsyncEventListenerMapSize(
"ln"));

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e4a09a6a/gradle/ide.gradle
----------------------------------------------------------------------
diff --git a/gradle/ide.gradle b/gradle/ide.gradle
index d07ad0b..a42b92b 100644
--- a/gradle/ide.gradle
+++ b/gradle/ide.gradle
@@ -31,10 +31,13 @@ subprojects {
             // Remove the gradle output directories from the eclipse classpath.
             // Unfortunately, using minusConfigurations does not work here, because
             // it removes the entire geode-core project.
-            classpath.entries.removeAll { entry -> entry.path.contains('geode-core/build')}
-            classpath.entries.removeAll { entry -> entry.path.contains('geode-web/build')}
-            classpath.entries.removeAll { entry -> entry.path.contains('geode-assembly/build')}
-            classpath.entries.removeAll { entry -> entry.path.contains('geode-dependencies.jar')}
+            classpath.entries.removeAll { entry -> 
+              (entry.path.contains('geode-core/build') ||
+              entry.path.contains('geode-web/build') ||
+              entry.path.contains('geode-assembly/build') ||
+              entry.path.contains('geode-dependencies.jar')) &&
+              !entry.path.contains('generated-resources')
+            }
 
             //By default, gradle adds the java 1.8 *execution environment*, which has access
restrictions on
             //things like Unsafe. Change it to a direct dependency on the workspace JDK


Mime
View raw message