[
https://issues.apache.org/jira/browse/BIGTOP-1608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14284154#comment-14284154
]
Konstantin Boudnik commented on BIGTOP-1608:
--------------------------------------------
David, I actually agree with your last proposal - at least the way I decided to
read it ;) But seriously, I am not advocating to not run smokes from source
code (as Jay may have alluded above); I am not either pushing for the wrappers
- was simple exploration of the idea and thanks for reminding that the earlier
attempt wasn't a success.
As for BIGTOP-1524 - I think this wasn't a well thought-through fix. I'd
venture a guess that it was a quick way to address the bug introduced in iTest
along with the failure injection mechanism, which was fixed later separately.
However, I don't really see why in BIGTOP-1524 we couldn't depend on the iTest
artifact and instead added the direct source code dependency? And not I think
we are trying to provide a bigger fix to already suboptimal solution ie source
code dependency from iTest.
I like David's proposal above - I really do. With one exception: let's keep
the iTest to be the framework. And as such - let's not include it into the
tests suites as in the above example. Because the minute will do it we'll have
to either:
- keep all the tests in the same place, e.g. under bigtop-tests
- or have two copies of iTest source one of each for smokes and mavenized
tests
The source code dependency to a framework is a bad design - sorry if I hurt
anyone's feeling. These things are orthogonal and should be separated.
Getting back to the mapreduce smoke: it declared dependency on junit but not on
itest which is just yet another framework with extensions to junit, etc.
Perhaps the problem we need to solve is how to publish/install iTest artifacts
instead of simply bridging to its source? Say, I can get through mapreduce
smoke compilation after applying this patch:
{code}
diff --git bigtop-tests/smoke-tests/mapreduce/build.gradle
bigtop-tests/smoke-tests/mapreduce/build.gradle
index 83a16a6..c5bc5ab 100644
--- bigtop-tests/smoke-tests/mapreduce/build.gradle
+++ bigtop-tests/smoke-tests/mapreduce/build.gradle
@@ -20,12 +20,13 @@ apply plugin: 'groovy'
repositories {
mavenCentral()
+ mavenLocal()
}
dependencies {
//needed to avoid groovy not on classpath error.
testCompile module('org.codehaus.groovy:groovy:1.8.0')
- compile group: 'junit', name: 'junit', version: '4.11', transitive: 'true'
+ compile group: 'org.apache.bigtop.itest', name: 'itest-common', version:
'0.9.0-SNAPSHOT', transitive: 'false'
testCompile group: 'org.apache.hadoop', name: 'hadoop-common', version:
hadoopVersion, transitive: 'true'
compile group: 'org.apache.hadoop', name: 'hadoop-hdfs', version:
hadoopVersion, transitive: 'true'
compile "org.codehaus.groovy:groovy:1.8.0"
@@ -39,14 +40,6 @@ def tests_to_include() {
}
sourceSets {
- main {
- groovy {
- srcDirs = [
-
"$System.env.BIGTOP_HOME"+"/bigtop-test-framework/src/main/groovy/org/apache/bigtop/itest/",
-
"$System.env.BIGTOP_HOME"+"/bigtop-test-framework/src/test/groovy/org/apache/bigtop/itest/"
- ]
- }
- }
test {
resources {
srcDirs = [
@@ -57,8 +50,6 @@ sourceSets {
groovy {
srcDirs = [
"$System.env.BIGTOP_HOME"+"/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hadoop/mapreduce",
-
"$System.env.BIGTOP_HOME"+"/bigtop-test-framework/src/main/groovy/org/apache/bigtop/itest/",
-
"$System.env.BIGTOP_HOME"+"/bigtop-test-framework/src/test/groovy/org/apache/bigtop/itest/"
]
exclude {
FileTreeElement elem -> (doExclude(elem.getName()))
{code}
BTW, looks like smoke-tests README needs to be fixed as it doesn't clearly
states that smokes should be run from the smoke test directory and not from the
top-level one.
> all smoke-tests should compile and use iTest as source, no jar. Remove ITEST
> env variable.
> -------------------------------------------------------------------------------------------
>
> Key: BIGTOP-1608
> URL: https://issues.apache.org/jira/browse/BIGTOP-1608
> Project: Bigtop
> Issue Type: Improvement
> Components: tests
> Affects Versions: 0.8.0
> Reporter: David Capwell
> Assignee: David Capwell
> Fix For: 0.9.0
>
> Attachments: BIGTOP-1608-first-part.patch, BIGTOP-1608.1.patch
>
>
> If you try to run the smoke tests without setting {{BIGTOP_HOME}} they will
> run and be unable to find tests, so nothing runs. This variable should be
> added to checkEnv to make sure its present while running
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)