geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hiteshkhame...@apache.org
Subject [42/50] [abbrv] geode git commit: GEODE-2433 Backwards compatibility tests are not actually running
Date Tue, 14 Feb 2017 19:32:15 GMT
GEODE-2433  Backwards compatibility tests are not actually running

The geode-old-versions/build.gradle file was not included in the original
commit for backward-compatibility testing.  It's needed to establish
the old-version source sets and generate the classpaths file used by
VersionManager.


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

Branch: refs/heads/master
Commit: 5554dd24a3932900b28956cac357f0e4bbe9d6e0
Parents: 90760d3
Author: Bruce Schuchardt <bschuchardt@pivotal.io>
Authored: Mon Feb 6 11:32:59 2017 -0800
Committer: Bruce Schuchardt <bschuchardt@pivotal.io>
Committed: Mon Feb 6 13:30:51 2017 -0800

----------------------------------------------------------------------
 .../sockets/ClientServerMiscBCDUnitTest.java    |  9 ++-
 geode-old-versions/build.gradle                 | 77 ++++++++++++++++++++
 2 files changed, 85 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode/blob/5554dd24/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/ClientServerMiscBCDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/ClientServerMiscBCDUnitTest.java
b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/ClientServerMiscBCDUnitTest.java
index 54367fd..28fe3f2 100755
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/ClientServerMiscBCDUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/ClientServerMiscBCDUnitTest.java
@@ -24,6 +24,7 @@ import org.junit.runner.RunWith;
 import org.junit.runners.Parameterized;
 
 import java.util.Collection;
+import java.util.List;
 
 @Category({DistributedTest.class, ClientServerTest.class, BackwardCompatibilityTest.class})
 @RunWith(Parameterized.class)
@@ -31,7 +32,13 @@ import java.util.Collection;
 public class ClientServerMiscBCDUnitTest extends ClientServerMiscDUnitTest {
   @Parameterized.Parameters
   public static Collection<String> data() {
-    return VersionManager.getInstance().getVersionsWithoutCurrent();
+    List<String> result =  VersionManager.getInstance().getVersionsWithoutCurrent();
+    if (result.size() < 1) {
+      throw new RuntimeException("No older versions of Geode were found to test against");
+    } else {
+      System.out.println("running against these versions: " + result);
+    }
+    return result;
   }
 
   public ClientServerMiscBCDUnitTest(String version) {

http://git-wip-us.apache.org/repos/asf/geode/blob/5554dd24/geode-old-versions/build.gradle
----------------------------------------------------------------------
diff --git a/geode-old-versions/build.gradle b/geode-old-versions/build.gradle
new file mode 100644
index 0000000..a09b2d7
--- /dev/null
+++ b/geode-old-versions/build.gradle
@@ -0,0 +1,77 @@
+/*
+ * 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.
+ */
+
+
+disableMavenPublishing()
+
+def addTestSource(def source, def geodeVersion, def includeEclipse) {
+//  def sourceSet =
+  sourceSets.create(source, {
+    compileClasspath += configurations.provided
+    runtimeClasspath += configurations.provided
+  })
+
+  dependencies.add "${source}Compile", "org.apache.geode:geode-common:$geodeVersion"
+  dependencies.add "${source}Compile", "org.apache.geode:geode-core:$geodeVersion"
+  dependencies.add "${source}Compile", "org.apache.geode:geode-lucene:$geodeVersion"
+  dependencies.add "${source}Compile", "org.apache.geode:geode-old-client-support:$geodeVersion"
+  dependencies.add "${source}Compile", "org.apache.geode:geode-wan:$geodeVersion"
+  dependencies.add "${source}Compile", "org.apache.geode:geode-cq:$geodeVersion"
+  dependencies.add "${source}Compile", "org.apache.geode:geode-rebalancer:$geodeVersion"
+
+  dependencies.add "${source}Compile", sourceSets.test.output
+
+//  dependencies.add "${source}Compile", configurations.testCompile
+//  dependencies.add "${source}Runtime", configurations.testRuntime
+
+  if(!includeEclipse) {
+    eclipse {
+      classpath {
+        file {
+          //Manually remove the source directory from the generated
+          //classpath I could not get this to work with minusConfigurations
+          whenMerged { classpath ->
+            classpath.entries.removeAll {
+              entry -> entry.kind == 'src' && entry.path == "src/${source}/java"
+            }
+          }
+        }
+      }
+    }
+  }
+}
+
+// Add sourceSets for backwards compatibility, rolling upgrade, and
+// pdx testing.
+addTestSource('test100', '1.0.0-incubating', true)
+//addTestSource('test110', '1.1.0', true)
+
+
+task createGeodeClasspathsFile {
+    File dir = file("$buildDir");
+    if (!dir.exists()) { dir.mkdirs() }
+    File classpathsFile = file("$buildDir/geodeOldVersionClasspaths.txt")
+    if (classpathsFile.exists()) {
+        classpathsFile.delete();
+    }
+    classpathsFile.createNewFile();
+    // add other backward-compatibility projects here
+    project(':geode-old-versions').sourceSets.each {
+        classpathsFile.append(it.name+"="+it.runtimeClasspath.getAsPath()+"\n") }
+}
+
+createGeodeClasspathsFile


Mime
View raw message