From 9a37034fa0fabfbf5c795fed450523e1616147e2 Mon Sep 17 00:00:00 2001 From: suke Date: Wed, 21 Aug 2019 16:44:57 +0800 Subject: [PATCH 1/7] hystrixtimer add removeOnCancelPolicy for ScheduledThreadPoolExecutor --- .../src/main/java/com/netflix/hystrix/util/HystrixTimer.java | 1 + 1 file changed, 1 insertion(+) diff --git a/hystrix-core/src/main/java/com/netflix/hystrix/util/HystrixTimer.java b/hystrix-core/src/main/java/com/netflix/hystrix/util/HystrixTimer.java index 3c10e6276..9cc7b5454 100644 --- a/hystrix-core/src/main/java/com/netflix/hystrix/util/HystrixTimer.java +++ b/hystrix-core/src/main/java/com/netflix/hystrix/util/HystrixTimer.java @@ -170,6 +170,7 @@ public Thread newThread(Runnable r) { } executor = new ScheduledThreadPoolExecutor(coreSize, threadFactory); + this.executor.setRemoveOnCancelPolicy(true); initialized = true; } From b893d6b0a11cabff27178282ce221f17fe6e8ca6 Mon Sep 17 00:00:00 2001 From: suke Date: Sat, 4 Jul 2020 20:49:59 +0800 Subject: [PATCH 2/7] update travis.yml --- .travis.yml | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index 542e04c60..6d5c54c5c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,3 @@ -addons: - apt: - packages: - - lynx - language: java sudo: false @@ -10,7 +5,4 @@ jdk: - oraclejdk8 script: - - ./gradlew --info check - -after_failure: - - if [ -f /home/travis/build/Netflix/Hystrix/hystrix-core/build/reports/tests/test/index.html ]; then lynx -dump /home/travis/build/Netflix/Hystrix/hystrix-core/build/reports/tests/test/index.html; fi + - ./gradlew --info check \ No newline at end of file From b1e5fa45157a2fa1f95cb73c8af3b206568fe486 Mon Sep 17 00:00:00 2001 From: suke Date: Sat, 4 Jul 2020 20:52:07 +0800 Subject: [PATCH 3/7] fix travis jdk to 11 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 6d5c54c5c..c9fa85c69 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,7 @@ language: java sudo: false jdk: - - oraclejdk8 + - oraclejdk11 script: - ./gradlew --info check \ No newline at end of file From be87533b98de5536f4a9674d130cf54c9ae05561 Mon Sep 17 00:00:00 2001 From: suke Date: Sat, 4 Jul 2020 21:02:29 +0800 Subject: [PATCH 4/7] fix travis --- .travis.yml | 26 +++++++++++++++++++++++--- buildViaTravis.sh | 23 +++++++++++++++++++++++ installViaTravis.sh | 16 ++++++++++++++++ 3 files changed, 62 insertions(+), 3 deletions(-) create mode 100644 buildViaTravis.sh create mode 100644 installViaTravis.sh diff --git a/.travis.yml b/.travis.yml index c9fa85c69..967693ec3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,28 @@ +addons: + apt: + packages: + - lynx + language: java sudo: false jdk: - - oraclejdk11 + - oraclejdk8 + +install: "./installViaTravis.sh" + +script: "./buildViaTravis.sh" + +cache: + directories: + - "$HOME/.gradle" -script: - - ./gradlew --info check \ No newline at end of file +after_failure: + - if [ -f /home/travis/build/Netflix/Hystrix/hystrix-core/build/reports/tests/test/index.html ]; then lynx -dump /home/travis/build/Netflix/Hystrix/hystrix-core/build/reports/tests/test/index.html; fi +env: + global: + - secure: PKFOXNElIioKzR25ekT5PN9FITsQnORw8GjaYdVZecdO1nIZ89vt9UmI1UnD4Jm1qsLm2o+Bv77KCU6L0bQiFernyl9400OGEVHRiXl4UuNIkWOruVgRM5BBQixbvLzqP9ul9qxNDXhB8oP/wXGMVeBEKxutb1/0AXnLlLspF9U= + - secure: XvRKpxC/Qh4k2LIAdFgaIEP0UW9OCoIDXt4o8494drLD/VVOZX9Ig8trFqHtfZrwBiI3zpe0XKJEPNHHAap+MyQ4SpXv13VFDGPhQCdgfcnJ4mj1Nf34J1nFRj/nZsgC99gn28qExY9tB+9IJ4MmidUvGgzN4Q7y21XbvRmmk34= + - secure: FEeb9KksyAPPzEqRZCWpSr2rPh1kJV/ltNYpyIhM1W+jCf3IVESluGGbZD2ufzv6toGNUzXF82i/bWkNOP4FFnGcYltZ/2OiVQHdZliP4k2xW4Kvl1bMAXkAHstoNoOQqgupnt3SRc/WYe1zfc3FsHW0ADwRpBDFkFdhro1rSRo= + - secure: dkJ2w6CIxwo5qIh3sw59PvXvs+ht/hsuaP3IM47rMDo0FcqC86ZhjoWesizmktK7aU5K8A786xP4VZIbGWcrC++Igq3feLwhreCGVNAgLSoE5o7uRTmD3Rd9Z2TEZgKnxPyHoSv2G6H73Kgm64r+6JTpgamB84vgymhnDVbmIes= + - secure: PFeXGAjK07eBNbOTFq9AjNsQGlIN+H01TAcX1NraFdoEEIM+qvdf6hVK81d0dmceQvR7r0ZBGXOAI+x8/6otBqFB/8nb10Yhl2Qzw+ZlO/Au1kIrhLYrev1Z4xa9ZzgdIbGeLB2QHjbEnaXPekIE/qwTkEL4qssP7YGFG7uVhhE= \ No newline at end of file diff --git a/buildViaTravis.sh b/buildViaTravis.sh new file mode 100644 index 000000000..b85e84e2d --- /dev/null +++ b/buildViaTravis.sh @@ -0,0 +1,23 @@ +#!/bin/bash +# This script will build the project. + +if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then + echo -e "Build Pull Request #$TRAVIS_PULL_REQUEST => Branch [$TRAVIS_BRANCH]" + ./gradlew build -x test +elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" == "" ]; then + echo -e 'Build Branch with Snapshot => Branch ['$TRAVIS_BRANCH']' + ./gradlew -Prelease.travisci=true -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" -PsonatypeUsername="${sonatypeUsername}" -PsonatypePassword="${sonatypePassword}" -Prelease.scope=patch build snapshot -x test +elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" != "" ]; then + echo -e 'Build Branch for Release => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG']' + case "$TRAVIS_TAG" in + *-rc\.*) + ./gradlew -Prelease.travisci=true -Prelease.useLastTag=true -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" -PsonatypeUsername="${sonatypeUsername}" -PsonatypePassword="${sonatypePassword}" candidate -x test + ;; + *) + ./gradlew -Prelease.travisci=true -Prelease.useLastTag=true -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" -PsonatypeUsername="${sonatypeUsername}" -PsonatypePassword="${sonatypePassword}" final -x test + ;; + esac +else + echo -e 'WARN: Should not be here => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG'] Pull Request ['$TRAVIS_PULL_REQUEST']' + ./gradlew build -x test +fi \ No newline at end of file diff --git a/installViaTravis.sh b/installViaTravis.sh new file mode 100644 index 000000000..f07bc77af --- /dev/null +++ b/installViaTravis.sh @@ -0,0 +1,16 @@ +#!/bin/bash +# This script will build the project. + +if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then + echo -e "Assemble Pull Request #$TRAVIS_PULL_REQUEST => Branch [$TRAVIS_BRANCH]" + ./gradlew assemble -x test +elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" == "" ]; then + echo -e 'Assemble Branch with Snapshot => Branch ['$TRAVIS_BRANCH']' + ./gradlew -Prelease.travisci=true assemble -x test +elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" != "" ]; then + echo -e 'Assemble Branch for Release => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG']' + ./gradlew -Prelease.travisci=true -Prelease.useLastTag=true assemble -x test +else + echo -e 'WARN: Should not be here => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG'] Pull Request ['$TRAVIS_PULL_REQUEST']' + ./gradlew assemble -x test +fi \ No newline at end of file From b9f75c1f8c229e96c7735a959d8a9b44eeae6330 Mon Sep 17 00:00:00 2001 From: suke Date: Sat, 4 Jul 2020 21:08:33 +0800 Subject: [PATCH 5/7] update to openjdk8 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 967693ec3..b8514fd6d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,7 +7,7 @@ language: java sudo: false jdk: - - oraclejdk8 + - openjdk8 install: "./installViaTravis.sh" From 416785c55dbc82ddd2ca0134d3b9f98c46e5f57d Mon Sep 17 00:00:00 2001 From: suke Date: Sat, 4 Jul 2020 21:13:06 +0800 Subject: [PATCH 6/7] fix travis.yml --- .travis.yml | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/.travis.yml b/.travis.yml index b8514fd6d..b8f68f148 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,20 +9,8 @@ sudo: false jdk: - openjdk8 -install: "./installViaTravis.sh" - -script: "./buildViaTravis.sh" - -cache: - directories: - - "$HOME/.gradle" +script: + - ./gradlew --info check after_failure: - - if [ -f /home/travis/build/Netflix/Hystrix/hystrix-core/build/reports/tests/test/index.html ]; then lynx -dump /home/travis/build/Netflix/Hystrix/hystrix-core/build/reports/tests/test/index.html; fi -env: - global: - - secure: PKFOXNElIioKzR25ekT5PN9FITsQnORw8GjaYdVZecdO1nIZ89vt9UmI1UnD4Jm1qsLm2o+Bv77KCU6L0bQiFernyl9400OGEVHRiXl4UuNIkWOruVgRM5BBQixbvLzqP9ul9qxNDXhB8oP/wXGMVeBEKxutb1/0AXnLlLspF9U= - - secure: XvRKpxC/Qh4k2LIAdFgaIEP0UW9OCoIDXt4o8494drLD/VVOZX9Ig8trFqHtfZrwBiI3zpe0XKJEPNHHAap+MyQ4SpXv13VFDGPhQCdgfcnJ4mj1Nf34J1nFRj/nZsgC99gn28qExY9tB+9IJ4MmidUvGgzN4Q7y21XbvRmmk34= - - secure: FEeb9KksyAPPzEqRZCWpSr2rPh1kJV/ltNYpyIhM1W+jCf3IVESluGGbZD2ufzv6toGNUzXF82i/bWkNOP4FFnGcYltZ/2OiVQHdZliP4k2xW4Kvl1bMAXkAHstoNoOQqgupnt3SRc/WYe1zfc3FsHW0ADwRpBDFkFdhro1rSRo= - - secure: dkJ2w6CIxwo5qIh3sw59PvXvs+ht/hsuaP3IM47rMDo0FcqC86ZhjoWesizmktK7aU5K8A786xP4VZIbGWcrC++Igq3feLwhreCGVNAgLSoE5o7uRTmD3Rd9Z2TEZgKnxPyHoSv2G6H73Kgm64r+6JTpgamB84vgymhnDVbmIes= - - secure: PFeXGAjK07eBNbOTFq9AjNsQGlIN+H01TAcX1NraFdoEEIM+qvdf6hVK81d0dmceQvR7r0ZBGXOAI+x8/6otBqFB/8nb10Yhl2Qzw+ZlO/Au1kIrhLYrev1Z4xa9ZzgdIbGeLB2QHjbEnaXPekIE/qwTkEL4qssP7YGFG7uVhhE= \ No newline at end of file + - if [ -f /home/travis/build/Netflix/Hystrix/hystrix-core/build/reports/tests/test/index.html ]; then lynx -dump /home/travis/build/Netflix/Hystrix/hystrix-core/build/reports/tests/test/index.html; fi \ No newline at end of file From 77dcb85ef1fb45ea9d32afd56f47f5542d0dbe23 Mon Sep 17 00:00:00 2001 From: suke Date: Sat, 4 Jul 2020 21:55:19 +0800 Subject: [PATCH 7/7] remove some useless sh --- buildViaTravis.sh | 23 ----------------------- installViaTravis.sh | 16 ---------------- 2 files changed, 39 deletions(-) delete mode 100644 buildViaTravis.sh delete mode 100644 installViaTravis.sh diff --git a/buildViaTravis.sh b/buildViaTravis.sh deleted file mode 100644 index b85e84e2d..000000000 --- a/buildViaTravis.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash -# This script will build the project. - -if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then - echo -e "Build Pull Request #$TRAVIS_PULL_REQUEST => Branch [$TRAVIS_BRANCH]" - ./gradlew build -x test -elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" == "" ]; then - echo -e 'Build Branch with Snapshot => Branch ['$TRAVIS_BRANCH']' - ./gradlew -Prelease.travisci=true -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" -PsonatypeUsername="${sonatypeUsername}" -PsonatypePassword="${sonatypePassword}" -Prelease.scope=patch build snapshot -x test -elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" != "" ]; then - echo -e 'Build Branch for Release => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG']' - case "$TRAVIS_TAG" in - *-rc\.*) - ./gradlew -Prelease.travisci=true -Prelease.useLastTag=true -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" -PsonatypeUsername="${sonatypeUsername}" -PsonatypePassword="${sonatypePassword}" candidate -x test - ;; - *) - ./gradlew -Prelease.travisci=true -Prelease.useLastTag=true -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" -PsonatypeUsername="${sonatypeUsername}" -PsonatypePassword="${sonatypePassword}" final -x test - ;; - esac -else - echo -e 'WARN: Should not be here => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG'] Pull Request ['$TRAVIS_PULL_REQUEST']' - ./gradlew build -x test -fi \ No newline at end of file diff --git a/installViaTravis.sh b/installViaTravis.sh deleted file mode 100644 index f07bc77af..000000000 --- a/installViaTravis.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash -# This script will build the project. - -if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then - echo -e "Assemble Pull Request #$TRAVIS_PULL_REQUEST => Branch [$TRAVIS_BRANCH]" - ./gradlew assemble -x test -elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" == "" ]; then - echo -e 'Assemble Branch with Snapshot => Branch ['$TRAVIS_BRANCH']' - ./gradlew -Prelease.travisci=true assemble -x test -elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" != "" ]; then - echo -e 'Assemble Branch for Release => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG']' - ./gradlew -Prelease.travisci=true -Prelease.useLastTag=true assemble -x test -else - echo -e 'WARN: Should not be here => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG'] Pull Request ['$TRAVIS_PULL_REQUEST']' - ./gradlew assemble -x test -fi \ No newline at end of file