diff --git a/.github/workflows/spring_integration_test_1.yml b/.github/workflows/spring_integration_test_1.yml index 3771f1d610..5ee72678e8 100644 --- a/.github/workflows/spring_integration_test_1.yml +++ b/.github/workflows/spring_integration_test_1.yml @@ -176,21 +176,21 @@ jobs: - name: (graceful) test for springboot=${{ matrix.springBootVersion }} springCloudVersion=${{ matrix.springCloudVersion }} if: needs.set-execution-conditions.outputs.enableGraceful == 'true' uses: ./.github/actions/scenarios/spring/graceful - - name: (spring common) test for springboot=${{ matrix.springBootVersion }} springCloudVersion=${{ matrix.springCloudVersion }} - if: needs.set-execution-conditions.outputs.enableSpringCommon == 'true' - uses: ./.github/actions/scenarios/spring/spring-common - - name: (nacos dynamic config) test for springboot=${{ matrix.springBootVersion }} springCloudVersion=${{ matrix.springCloudVersion }} - if: ${{ matrix.nacosVersion != '' && needs.set-execution-conditions.outputs.enableDynamicConfig == 'true' }} - uses: ./.github/actions/scenarios/spring/dynamic-config-nacos - - name: (zk dynamic config) test for springboot=${{ matrix.springBootVersion }} springCloudVersion=${{ matrix.springCloudVersion }} - if: needs.set-execution-conditions.outputs.enableDynamicConfig == 'true' - uses: ./.github/actions/scenarios/spring/dynamic-config-zk - - name: monitor test for springboot=${{ matrix.springBootVersion }} springCloudVersion=${{ matrix.springCloudVersion }} - if: needs.set-execution-conditions.outputs.enableSpringMonitor == 'true' - uses: ./.github/actions/scenarios/spring/monitor - - name: visibility test for springboot=${{ matrix.springBootVersion }} springCloudVersion=${{ matrix.springCloudVersion }} - if: needs.set-execution-conditions.outputs.enableSpringVisibility == 'true' - uses: ./.github/actions/scenarios/spring/visibility - - name: removal test for springboot=${{ matrix.springBootVersion }} springCloudVersion=${{ matrix.springCloudVersion }} - if: needs.set-execution-conditions.outputs.enableSpringRemoval == 'true' - uses: ./.github/actions/scenarios/spring/removal +# - name: (spring common) test for springboot=${{ matrix.springBootVersion }} springCloudVersion=${{ matrix.springCloudVersion }} +# if: needs.set-execution-conditions.outputs.enableSpringCommon == 'true' +# uses: ./.github/actions/scenarios/spring/spring-common +# - name: (nacos dynamic config) test for springboot=${{ matrix.springBootVersion }} springCloudVersion=${{ matrix.springCloudVersion }} +# if: ${{ matrix.nacosVersion != '' && needs.set-execution-conditions.outputs.enableDynamicConfig == 'true' }} +# uses: ./.github/actions/scenarios/spring/dynamic-config-nacos +# - name: (zk dynamic config) test for springboot=${{ matrix.springBootVersion }} springCloudVersion=${{ matrix.springCloudVersion }} +# if: needs.set-execution-conditions.outputs.enableDynamicConfig == 'true' +# uses: ./.github/actions/scenarios/spring/dynamic-config-zk +# - name: monitor test for springboot=${{ matrix.springBootVersion }} springCloudVersion=${{ matrix.springCloudVersion }} +# if: needs.set-execution-conditions.outputs.enableSpringMonitor == 'true' +# uses: ./.github/actions/scenarios/spring/monitor +# - name: visibility test for springboot=${{ matrix.springBootVersion }} springCloudVersion=${{ matrix.springCloudVersion }} +# if: needs.set-execution-conditions.outputs.enableSpringVisibility == 'true' +# uses: ./.github/actions/scenarios/spring/visibility +# - name: removal test for springboot=${{ matrix.springBootVersion }} springCloudVersion=${{ matrix.springCloudVersion }} +# if: needs.set-execution-conditions.outputs.enableSpringRemoval == 'true' +# uses: ./.github/actions/scenarios/spring/removal diff --git a/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/io/sermant/registry/entity/GraceShutdownBehavior.java b/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/io/sermant/registry/entity/GraceShutdownBehavior.java index cda9b4e907..dd39ba5c9d 100644 --- a/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/io/sermant/registry/entity/GraceShutdownBehavior.java +++ b/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/io/sermant/registry/entity/GraceShutdownBehavior.java @@ -54,11 +54,13 @@ public class GraceShutdownBehavior implements Runnable { @Override public void run() { + System.out.println(Thread.currentThread().getName() + LocalDateTime.now() + "GraceShutdownBehavior run"); if (graceConfig.isEnableSpring() && graceConfig.isEnableGraceShutdown()) { GraceContext.INSTANCE.getGraceShutDownManager().setShutDown(true); graceService = PluginServiceManager.getPluginService(GraceService.class); graceShutDown(); } + System.out.println(Thread.currentThread().getName() + LocalDateTime.now() + "GraceShutdownBehavior finish"); } private void graceShutDown() { diff --git a/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/io/sermant/registry/utils/CommonUtils.java b/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/io/sermant/registry/utils/CommonUtils.java index 80112294ff..7dc0a49cf5 100644 --- a/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/io/sermant/registry/utils/CommonUtils.java +++ b/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/io/sermant/registry/utils/CommonUtils.java @@ -40,6 +40,7 @@ public class CommonUtils { try { Thread.sleep(time); } catch (InterruptedException ex) { + System.out.println("Sleep has been interrupted!"); LOGGER.fine("Sleep has been interrupted!"); } }; diff --git a/sermant-plugins/sermant-service-registry/spring-cloud-registry-service/src/main/java/io/sermant/registry/service/impl/GraceServiceImpl.java b/sermant-plugins/sermant-service-registry/spring-cloud-registry-service/src/main/java/io/sermant/registry/service/impl/GraceServiceImpl.java index 5712526584..997ef6c47e 100644 --- a/sermant-plugins/sermant-service-registry/spring-cloud-registry-service/src/main/java/io/sermant/registry/service/impl/GraceServiceImpl.java +++ b/sermant-plugins/sermant-service-registry/spring-cloud-registry-service/src/main/java/io/sermant/registry/service/impl/GraceServiceImpl.java @@ -74,6 +74,7 @@ public class GraceServiceImpl implements GraceService { */ @Override public void shutdown() { + System.out.println(Thread.currentThread().getName() + LocalDateTime.now() + "GraceServiceImpl run"); if (SHUTDOWN.compareAndSet(false, true)) { Object registration = GraceContext.INSTANCE.getGraceShutDownManager().getRegistration(); ReflectUtils.invokeMethodWithNoneParameter(registration, REGISTRATION_DEREGISTER_METHOD_NAME); @@ -91,6 +92,7 @@ public void shutdown() { Thread.currentThread().getName() + LocalDateTime.now() + "latch count is " + latch.getCount()); AddressCache.INSTANCE.getAddressSet().forEach(address -> notifyToGraceHttpServer(address, header)); } + System.out.println(Thread.currentThread().getName() + LocalDateTime.now() + "GraceServiceImpl run"); } @Override @@ -124,6 +126,7 @@ private void execute(String address, Map> header) { GRACE_HTTP_SERVER_PROTOCOL + address + GraceConstants.GRACE_NOTIFY_URL_PATH, REQUEST_BODY, header); if (result.getCode() == GraceConstants.GRACE_HTTP_SUCCESS_CODE) { + System.out.println("Succeed to notify before shutdown, address: " + address); break; } System.out.println("Failed to notify before shutdown, address: " + address);