You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@yetus.apache.org by aw...@apache.org on 2018/07/14 01:19:58 UTC
yetus git commit: YETUS-639. hadoop: parallel tests on < 2.8.0 are
not guarateed to work
Repository: yetus
Updated Branches:
refs/heads/master cbcbc0ff3 -> 6fb09a156
YETUS-639. hadoop: parallel tests on < 2.8.0 are not guarateed to work
Signed-off-by: Akira Ajisaka <aa...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/yetus/repo
Commit: http://git-wip-us.apache.org/repos/asf/yetus/commit/6fb09a15
Tree: http://git-wip-us.apache.org/repos/asf/yetus/tree/6fb09a15
Diff: http://git-wip-us.apache.org/repos/asf/yetus/diff/6fb09a15
Branch: refs/heads/master
Commit: 6fb09a1569fe3a0dfa65265ee17281b663d7ead6
Parents: cbcbc0f
Author: Allen Wittenauer <aw...@apache.org>
Authored: Tue Jul 10 14:14:17 2018 -0700
Committer: Allen Wittenauer <aw...@apache.org>
Committed: Fri Jul 13 18:17:53 2018 -0700
----------------------------------------------------------------------
precommit/personality/hadoop.sh | 39 +++++++++++++++++++++++++++++++++---
1 file changed, 36 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/yetus/blob/6fb09a15/precommit/personality/hadoop.sh
----------------------------------------------------------------------
diff --git a/precommit/personality/hadoop.sh b/precommit/personality/hadoop.sh
index 1e03e61..1edec26 100755
--- a/precommit/personality/hadoop.sh
+++ b/precommit/personality/hadoop.sh
@@ -87,6 +87,37 @@ function hadoop_order
echo "${hadoopm}"
}
+## @description Determine if it is safe to run parallel tests
+## @audience private
+## @stability evolving
+## @param ordering
+function hadoop_test_parallel
+{
+ if [[ -f "${BASEDIR}/pom.xml" ]]; then
+ HADOOP_VERSION=$(grep '<version>' "${BASEDIR}/pom.xml" \
+ | head -1 \
+ | "${SED}" -e 's|^ *<version>||' -e 's|</version>.*$||' \
+ | cut -f1 -d- )
+ export HADOOP_VERSION
+ else
+ return 1
+ fi
+
+ hmajor=${HADOOP_VERSION%%\.*}
+ hmajorminor=${HADOOP_VERSION%\.*}
+ hminor=${hmajorminor##*\.}
+ # ... and just for reference
+ #hmicro=${HADOOP_VERSION##*\.}
+
+ # Apache Hadoop v2.8.0 was the first one to really
+ # get working parallel unit tests
+ if [[ ${hmajor} -lt 3 && ${hminor} -lt 8 ]]; then
+ return 1
+ fi
+
+ return 0
+}
+
## @description Install extra modules for unit tests
## @audience private
## @stability evolving
@@ -326,9 +357,11 @@ function personality_modules
fi
if [[ ${TEST_PARALLEL} = "true" ]] ; then
- extra="-Pparallel-tests"
- if [[ -n ${TEST_THREADS:-} ]]; then
- extra="${extra} -DtestsThreadCount=${TEST_THREADS}"
+ if hadoop_test_parallel; then
+ extra="-Pparallel-tests"
+ if [[ -n ${TEST_THREADS:-} ]]; then
+ extra="${extra} -DtestsThreadCount=${TEST_THREADS}"
+ fi
fi
fi
needflags=true