diff --git a/sofa-boot-project/sofa-boot-core/healthcheck-sofa-boot/src/test/java/com/alipay/sofa/healthcheck/test/HealthIndicatorCheckProcessorTest.java b/sofa-boot-project/sofa-boot-core/healthcheck-sofa-boot/src/test/java/com/alipay/sofa/healthcheck/test/HealthIndicatorCheckProcessorTest.java index 7df1381f5..f036889d5 100644 --- a/sofa-boot-project/sofa-boot-core/healthcheck-sofa-boot/src/test/java/com/alipay/sofa/healthcheck/test/HealthIndicatorCheckProcessorTest.java +++ b/sofa-boot-project/sofa-boot-core/healthcheck-sofa-boot/src/test/java/com/alipay/sofa/healthcheck/test/HealthIndicatorCheckProcessorTest.java @@ -16,7 +16,11 @@ */ package com.alipay.sofa.healthcheck.test; -import com.alipay.sofa.healthcheck.*; +import com.alipay.sofa.healthcheck.AfterReadinessCheckCallbackProcessor; +import com.alipay.sofa.healthcheck.HealthCheckProperties; +import com.alipay.sofa.healthcheck.HealthCheckerProcessor; +import com.alipay.sofa.healthcheck.HealthIndicatorProcessor; +import com.alipay.sofa.healthcheck.ReadinessCheckListener; import com.alipay.sofa.healthcheck.core.HealthCheckExecutor; import com.alipay.sofa.healthcheck.test.bean.DiskHealthIndicator; import com.alipay.sofa.healthcheck.test.bean.TimeoutHealthIndicator; @@ -128,7 +132,8 @@ public void testCheckIndicatorFailed() { Health timeoutHealth = hashMap.get("timeout"); Assert.assertNotNull(timeoutHealth); Assert.assertEquals(Status.UNKNOWN, timeoutHealth.getStatus()); - Assert.assertEquals("java.util.concurrent.TimeoutException: null", timeoutHealth.getDetails().get("error")); + Assert.assertEquals("java.util.concurrent.TimeoutException: null", timeoutHealth + .getDetails().get("error")); } private void initApplicationContext(boolean health) { @@ -136,7 +141,8 @@ private void initApplicationContext(boolean health) { properties.put("disk-health-indicator.health", health); properties.put("timeout-health-indicator.health", true); if (!health) { - properties.put("com.alipay.sofa.healthcheck.indicator.timeout.timeoutHealthIndicator", "1"); + properties.put("com.alipay.sofa.healthcheck.indicator.timeout.timeoutHealthIndicator", + "1"); } properties.put("com.alipay.sofa.healthcheck.skip.indicator", "true"); properties.put("spring.application.name", "HealthIndicatorCheckProcessorTest"); diff --git a/sofa-boot-project/sofa-boot-core/healthcheck-sofa-boot/src/test/java/com/alipay/sofa/healthcheck/test/bean/TimeoutHealthIndicator.java b/sofa-boot-project/sofa-boot-core/healthcheck-sofa-boot/src/test/java/com/alipay/sofa/healthcheck/test/bean/TimeoutHealthIndicator.java index ce576892a..fcbcbbe4b 100644 --- a/sofa-boot-project/sofa-boot-core/healthcheck-sofa-boot/src/test/java/com/alipay/sofa/healthcheck/test/bean/TimeoutHealthIndicator.java +++ b/sofa-boot-project/sofa-boot-core/healthcheck-sofa-boot/src/test/java/com/alipay/sofa/healthcheck/test/bean/TimeoutHealthIndicator.java @@ -1,6 +1,18 @@ /* - * Ant Group - * Copyright (c) 2004-2022 All Rights Reserved. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.alipay.sofa.healthcheck.test.bean;