You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@samza.apache.org by xi...@apache.org on 2017/08/16 23:25:29 UTC

samza git commit: SAMZA-1355 : Enable standalone integration tests conditionally in build.

Repository: samza
Updated Branches:
  refs/heads/master 202af33bf -> afe3bf861


SAMZA-1355 : Enable standalone integration tests conditionally in build.

It's run only when includeSamzaTest gradle project property is set.

Author: Shanthoosh Venkataraman <sv...@linkedin.com>

Reviewers: Xinyu Liu <xi...@apache.org>

Closes #237 from shanthoosh/disable_samza_test_build_with_a_flag


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

Branch: refs/heads/master
Commit: afe3bf8616edcb5e6d16a457ba54234607c6b25b
Parents: 202af33
Author: Shanthoosh Venkataraman <sv...@linkedin.com>
Authored: Wed Aug 16 16:25:49 2017 -0700
Committer: Xinyu Liu <xi...@xiliu-ld.linkedin.biz>
Committed: Wed Aug 16 16:25:49 2017 -0700

----------------------------------------------------------------------
 README.md                |  2 +-
 bin/check-all.sh         |  2 +-
 docs/contribute/tests.md |  2 +-
 settings.gradle          | 17 +++++++++++++++++
 4 files changed, 20 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/samza/blob/afe3bf86/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index 4526ae8..cab1826 100644
--- a/README.md
+++ b/README.md
@@ -34,7 +34,7 @@ Samza builds with [Scala](http://www.scala-lang.org/) 2.10 or 2.11 and [YARN](ht
 
 ### Testing Samza
 
-To run all tests:
+To run all unit tests:
 
     ./gradlew clean test
 

http://git-wip-us.apache.org/repos/asf/samza/blob/afe3bf86/bin/check-all.sh
----------------------------------------------------------------------
diff --git a/bin/check-all.sh b/bin/check-all.sh
index 2f9f03c..ceb1e99 100755
--- a/bin/check-all.sh
+++ b/bin/check-all.sh
@@ -81,7 +81,7 @@ do
     for yarn_version in "${YARNs[@]}"
     do
       echo "------------- Running check task against JDK${jdk_number}/Scala ${scala_version}/YARN ${yarn_version}"
-      ${gradle_file} -PscalaVersion=${scala_version} -PyarnVersion=${yarn_version} -Dorg.gradle.java.home=${!i} clean check $@
+      ${gradle_file} -PscalaVersion=${scala_version} -PyarnVersion=${yarn_version} -Dorg.gradle.java.home=${!i} -PrunIntegrationTests clean check $@
       echo "------------- Finished running check task against JDK${jdk_number}/Scala ${scala_version}/YARN ${yarn_version}"
     done
   done

http://git-wip-us.apache.org/repos/asf/samza/blob/afe3bf86/docs/contribute/tests.md
----------------------------------------------------------------------
diff --git a/docs/contribute/tests.md b/docs/contribute/tests.md
index 9fe728c..048e3be 100644
--- a/docs/contribute/tests.md
+++ b/docs/contribute/tests.md
@@ -25,7 +25,7 @@ Samza's unit tests are written on top of [JUnit](http://junit.org/), and license
 
 To run all tests, and license checks:
 
-    ./gradlew clean check
+    ./gradlew clean check -PrunIntegrationTests
 
 To run a single test:
 

http://git-wip-us.apache.org/repos/asf/samza/blob/afe3bf86/settings.gradle
----------------------------------------------------------------------
diff --git a/settings.gradle b/settings.gradle
index a4eba94..603cd35 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -46,3 +46,20 @@ rootProject.children.each {
     it.name = it.name + "_" + scalaVersion
   }
 }
+
+/**
+ * Skips execution of all integration tests in project 'samza-test'.
+ * To run integration tests in samza-test: './gradlew clean build -PrunIntegrationTests'
+ */
+gradle.taskGraph.whenReady { taskGraph ->
+  taskGraph.getAllTasks().each { task ->
+    def project = task.getProject()
+    task.onlyIf {
+      /**
+       * Behaves as pass through filter for all tasks when `runIntegrationTests` property is turned on.
+       * Filters 'test' task of 'samza-test' project otherwise.
+       */
+      project.hasProperty("runIntegrationTests") || !(project.getName().contains("samza-test") && task.getName() == "test")
+    }
+  }
+}