Repository: incubator-edgent Updated Branches: refs/heads/master 57c28824b -> d10b32f2f
[gradle] fix test task - prevent task failures due to projects that lack tests (ssmingly fallout from switching to test filtering support via "includeTestsMatching") - make jdbc connector test functional Project: http://git-wip-us.apache.org/repos/asf/incubator-edgent/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-edgent/commit/fc0093ed Tree: http://git-wip-us.apache.org/repos/asf/incubator-edgent/tree/fc0093ed Diff: http://git-wip-us.apache.org/repos/asf/incubator-edgent/diff/fc0093ed Branch: refs/heads/master Commit: fc0093ed3c667d3c6d2f3a5c08d2b86a810aabc9 Parents: 57c2882 Author: Dale LaBossiere <dlab...@us.ibm.com> Authored: Wed Sep 7 09:51:15 2016 -0400 Committer: Dale LaBossiere <dlab...@us.ibm.com> Committed: Wed Sep 7 09:51:15 2016 -0400 ---------------------------------------------------------------------- api/graph/build.gradle | 5 +++ connectors/common/build.gradle | 5 +++ connectors/jdbc/build.gradle | 1 + .../kafka/KafkaStreamsSkipMeTest.java | 39 ++++++++++++++++++++ utils/streamscope/build.gradle | 5 +++ 5 files changed, 55 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-edgent/blob/fc0093ed/api/graph/build.gradle ---------------------------------------------------------------------- diff --git a/api/graph/build.gradle b/api/graph/build.gradle index b8e275a..373be70 100644 --- a/api/graph/build.gradle +++ b/api/graph/build.gradle @@ -15,3 +15,8 @@ dependencies { compile project(':api:oplet') compile core_ext_dependencies } + +test { + // this project lacks non-abstract test classes and this task fails if attempted + enabled = false +} http://git-wip-us.apache.org/repos/asf/incubator-edgent/blob/fc0093ed/connectors/common/build.gradle ---------------------------------------------------------------------- diff --git a/connectors/common/build.gradle b/connectors/common/build.gradle index c15c7ef..4f2d99b 100644 --- a/connectors/common/build.gradle +++ b/connectors/common/build.gradle @@ -18,3 +18,8 @@ dependencies { } addCompileTestDependencies ':api:topology', ':providers:direct' + +test { + // this project lacks tests and this task fails if attempted + enabled = false +} http://git-wip-us.apache.org/repos/asf/incubator-edgent/blob/fc0093ed/connectors/jdbc/build.gradle ---------------------------------------------------------------------- diff --git a/connectors/jdbc/build.gradle b/connectors/jdbc/build.gradle index f32d8a9..a34e16e 100644 --- a/connectors/jdbc/build.gradle +++ b/connectors/jdbc/build.gradle @@ -15,6 +15,7 @@ dependencies { compile project(':api:topology') compile core_ext_dependencies testCompile project(':providers:direct') + testCompile files("${System.env.DERBY_HOME}/lib/derby.jar") } addCompileTestDependencies ':api:topology', ':providers:direct', ':connectors:common' http://git-wip-us.apache.org/repos/asf/incubator-edgent/blob/fc0093ed/connectors/kafka/src/test/java/org/apache/edgent/test/connectors/kafka/KafkaStreamsSkipMeTest.java ---------------------------------------------------------------------- diff --git a/connectors/kafka/src/test/java/org/apache/edgent/test/connectors/kafka/KafkaStreamsSkipMeTest.java b/connectors/kafka/src/test/java/org/apache/edgent/test/connectors/kafka/KafkaStreamsSkipMeTest.java new file mode 100644 index 0000000..78bdc47 --- /dev/null +++ b/connectors/kafka/src/test/java/org/apache/edgent/test/connectors/kafka/KafkaStreamsSkipMeTest.java @@ -0,0 +1,39 @@ +/* +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. +*/ +package org.apache.edgent.test.connectors.kafka; + +import static org.junit.Assume.assumeTrue; + +import org.junit.Test; + +/* + * Our current gradle driven test config (test filtering with + * includeTestsMatching '*Test') results in failing a project's + * test task if the project lacks any "*Test" classes. + * + * This class avoids that condition. + */ +public class KafkaStreamsSkipMeTest { + + @Test + public void testSkipMe() throws Exception { + assumeTrue(false); + } + +} http://git-wip-us.apache.org/repos/asf/incubator-edgent/blob/fc0093ed/utils/streamscope/build.gradle ---------------------------------------------------------------------- diff --git a/utils/streamscope/build.gradle b/utils/streamscope/build.gradle index 42c5dc9..f6d1138 100644 --- a/utils/streamscope/build.gradle +++ b/utils/streamscope/build.gradle @@ -17,3 +17,8 @@ dependencies { } addCompileTestDependencies ':api:topology' + +test { + // this project lacks tests and this task fails if attempted + enabled = false +}