maytasm commented on a change in pull request #9863:
URL: https://github.com/apache/druid/pull/9863#discussion_r424798215
##########
File path: benchmarks/pom.xml
##########
@@ -220,6 +220,13 @@
<skip>true</skip>
</configuration>
</plugin>
+ <plugin>
+ <groupId>org.jacoco</groupId>
+ <artifactId>jacoco-maven-plugin</artifactId>
+ <configuration>
+ <skip>true</skip> <!-- ignore non-production code -->
Review comment:
Should the integration-tests be skipped too?
##########
File path: .travis.yml
##########
@@ -136,20 +135,51 @@ jobs:
- &test_processing_module
name: "(openjdk8) processing module test"
- env: &processing_env
+ env:
- MAVEN_PROJECTS='processing'
- before_script: &setup_java_test
+ before_script:
+ - export DRUID_USE_DEFAULT_VALUE_FOR_NULL=true
+ script:
- unset _JAVA_OPTIONS
- script: &run_java_test
# Set MAVEN_OPTS for Surefire launcher. Skip remoteresources to avoid
intermittent connection timeouts when
# resolving the SIGAR dependency.
- >
MAVEN_OPTS='-Xmx800m' ${MVN} test -pl ${MAVEN_PROJECTS}
- ${MAVEN_SKIP} -Dremoteresources.skip=true
+ ${MAVEN_SKIP} -Dremoteresources.skip=true
-Ddruid.generic.useDefaultValueForNull=${DRUID_USE_DEFAULT_VALUE_FOR_NULL}
- sh -c "dmesg | egrep -i '(oom|out of memory|kill process|killed).*'
-C 1 || exit 0"
- free -m
- after_success: &upload_java_unit_test_coverage
- ${MVN} -pl ${MAVEN_PROJECTS} jacoco:report
+ # Add merge target branch to determine diff (see
https://github.com/travis-ci/travis-ci/issues/6069)
+ - echo "TRAVIS_BRANCH=${TRAVIS_BRANCH}" # for debugging
+ - git remote set-branches --add origin ${TRAVIS_BRANCH} && git fetch
+ # Determine the modified files that match the maven projects being
tested
+ - all_files="$(git diff --name-only origin/${TRAVIS_BRANCH}...HEAD |
grep "\.java$" || [[ $? == 1 ]])"
+ - for f in ${all_files}; do echo $f; done # for debugging
+ - >
Review comment:
Can you add comments on what the difference and what each branch is doing
##########
File path: .travis.yml
##########
@@ -136,20 +135,51 @@ jobs:
- &test_processing_module
name: "(openjdk8) processing module test"
- env: &processing_env
+ env:
- MAVEN_PROJECTS='processing'
- before_script: &setup_java_test
+ before_script:
+ - export DRUID_USE_DEFAULT_VALUE_FOR_NULL=true
+ script:
- unset _JAVA_OPTIONS
- script: &run_java_test
# Set MAVEN_OPTS for Surefire launcher. Skip remoteresources to avoid
intermittent connection timeouts when
# resolving the SIGAR dependency.
- >
MAVEN_OPTS='-Xmx800m' ${MVN} test -pl ${MAVEN_PROJECTS}
- ${MAVEN_SKIP} -Dremoteresources.skip=true
+ ${MAVEN_SKIP} -Dremoteresources.skip=true
-Ddruid.generic.useDefaultValueForNull=${DRUID_USE_DEFAULT_VALUE_FOR_NULL}
- sh -c "dmesg | egrep -i '(oom|out of memory|kill process|killed).*'
-C 1 || exit 0"
- free -m
- after_success: &upload_java_unit_test_coverage
- ${MVN} -pl ${MAVEN_PROJECTS} jacoco:report
+ # Add merge target branch to determine diff (see
https://github.com/travis-ci/travis-ci/issues/6069)
+ - echo "TRAVIS_BRANCH=${TRAVIS_BRANCH}" # for debugging
+ - git remote set-branches --add origin ${TRAVIS_BRANCH} && git fetch
+ # Determine the modified files that match the maven projects being
tested
+ - all_files="$(git diff --name-only origin/${TRAVIS_BRANCH}...HEAD |
grep "\.java$" || [[ $? == 1 ]])"
+ - for f in ${all_files}; do echo $f; done # for debugging
+ - >
+ if [[ "${MAVEN_PROJECTS}" = \!* ]]; then
+ regex="${MAVEN_PROJECTS:1}";
+ regex="^${regex//,\!/\\|^}";
+ project_files="$(echo "${all_files}" | grep -v "${regex}" || [[ $?
== 1 ]])";
+ else
+ regex="^${MAVEN_PROJECTS//,/\\|^}";
+ project_files="$(echo "${all_files}" | grep "${regex}" || [[ $? == 1
]])";
+ fi
+ - for f in ${project_files}; do echo $f; done # for debugging
Review comment:
Maybe also print a message to see this is the list of all project files
after filtering, etc.
##########
File path: .travis.yml
##########
@@ -136,20 +135,51 @@ jobs:
- &test_processing_module
name: "(openjdk8) processing module test"
- env: &processing_env
+ env:
- MAVEN_PROJECTS='processing'
- before_script: &setup_java_test
+ before_script:
+ - export DRUID_USE_DEFAULT_VALUE_FOR_NULL=true
+ script:
- unset _JAVA_OPTIONS
- script: &run_java_test
# Set MAVEN_OPTS for Surefire launcher. Skip remoteresources to avoid
intermittent connection timeouts when
# resolving the SIGAR dependency.
- >
MAVEN_OPTS='-Xmx800m' ${MVN} test -pl ${MAVEN_PROJECTS}
- ${MAVEN_SKIP} -Dremoteresources.skip=true
+ ${MAVEN_SKIP} -Dremoteresources.skip=true
-Ddruid.generic.useDefaultValueForNull=${DRUID_USE_DEFAULT_VALUE_FOR_NULL}
- sh -c "dmesg | egrep -i '(oom|out of memory|kill process|killed).*'
-C 1 || exit 0"
- free -m
- after_success: &upload_java_unit_test_coverage
- ${MVN} -pl ${MAVEN_PROJECTS} jacoco:report
+ # Add merge target branch to determine diff (see
https://github.com/travis-ci/travis-ci/issues/6069)
+ - echo "TRAVIS_BRANCH=${TRAVIS_BRANCH}" # for debugging
+ - git remote set-branches --add origin ${TRAVIS_BRANCH} && git fetch
+ # Determine the modified files that match the maven projects being
tested
+ - all_files="$(git diff --name-only origin/${TRAVIS_BRANCH}...HEAD |
grep "\.java$" || [[ $? == 1 ]])"
+ - for f in ${all_files}; do echo $f; done # for debugging
Review comment:
Maybe also print a message to see this is the list of all files, etc.
##########
File path: .travis.yml
##########
@@ -136,20 +135,51 @@ jobs:
- &test_processing_module
name: "(openjdk8) processing module test"
- env: &processing_env
+ env:
- MAVEN_PROJECTS='processing'
- before_script: &setup_java_test
+ before_script:
+ - export DRUID_USE_DEFAULT_VALUE_FOR_NULL=true
+ script:
- unset _JAVA_OPTIONS
- script: &run_java_test
# Set MAVEN_OPTS for Surefire launcher. Skip remoteresources to avoid
intermittent connection timeouts when
# resolving the SIGAR dependency.
- >
MAVEN_OPTS='-Xmx800m' ${MVN} test -pl ${MAVEN_PROJECTS}
- ${MAVEN_SKIP} -Dremoteresources.skip=true
+ ${MAVEN_SKIP} -Dremoteresources.skip=true
-Ddruid.generic.useDefaultValueForNull=${DRUID_USE_DEFAULT_VALUE_FOR_NULL}
- sh -c "dmesg | egrep -i '(oom|out of memory|kill process|killed).*'
-C 1 || exit 0"
- free -m
- after_success: &upload_java_unit_test_coverage
- ${MVN} -pl ${MAVEN_PROJECTS} jacoco:report
+ # Add merge target branch to determine diff (see
https://github.com/travis-ci/travis-ci/issues/6069)
+ - echo "TRAVIS_BRANCH=${TRAVIS_BRANCH}" # for debugging
+ - git remote set-branches --add origin ${TRAVIS_BRANCH} && git fetch
+ # Determine the modified files that match the maven projects being
tested
+ - all_files="$(git diff --name-only origin/${TRAVIS_BRANCH}...HEAD |
grep "\.java$" || [[ $? == 1 ]])"
+ - for f in ${all_files}; do echo $f; done # for debugging
+ - >
+ if [[ "${MAVEN_PROJECTS}" = \!* ]]; then
+ regex="${MAVEN_PROJECTS:1}";
+ regex="^${regex//,\!/\\|^}";
+ project_files="$(echo "${all_files}" | grep -v "${regex}" || [[ $?
== 1 ]])";
+ else
+ regex="^${MAVEN_PROJECTS//,/\\|^}";
+ project_files="$(echo "${all_files}" | grep "${regex}" || [[ $? == 1
]])";
+ fi
+ - for f in ${project_files}; do echo $f; done # for debugging
+ # Check diff code coverage for the maven projects being tested (retry
install in case of network error)
+ - >
+ if [ -n "${project_files}" ]; then
+ travis_retry npm install @connectis/[email protected]
+ && git diff origin/${TRAVIS_BRANCH}...HEAD -- ${project_files}
+ | node_modules/.bin/diff-test-coverage
+ --coverage "**/target/site/jacoco/jacoco.xml"
+ --type jacoco
+ --line-coverage 65
Review comment:
Maybe making these variables at the top with the other export
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]