mirror of
https://github.com/dromara/hertzbeat.git
synced 2026-09-17 09:40:58 +00:00
Co-authored-by: tomsun28 <tomsun28@outlook.com> Co-authored-by: yunfan24 <yunfan24@outlook.com> Co-authored-by: aias00 <rokkki@163.com>
This commit is contained in:
co-authored by
tomsun28
yunfan24
aias00
parent
dc2efdf1c2
commit
d2a332f533
+1
-1
@@ -72,7 +72,7 @@ public abstract class AbstractCollectE2eTest {
|
||||
metricsCollect = new MetricsCollect(mock(Metrics.class), timeout, mock(CollectDataDispatch.class), null, List.of());
|
||||
|
||||
// Initialize services and components
|
||||
appService.run();
|
||||
appService.afterPropertiesSet();
|
||||
metrics = new Metrics();
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -63,7 +63,7 @@ import org.apache.hertzbeat.manager.service.AppService;
|
||||
import org.apache.hertzbeat.manager.service.MonitorService;
|
||||
import org.apache.hertzbeat.manager.service.ObjectStoreService;
|
||||
import org.apache.hertzbeat.warehouse.service.WarehouseService;
|
||||
import org.springframework.boot.CommandLineRunner;
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
import org.springframework.context.event.EventListener;
|
||||
import org.springframework.core.Ordered;
|
||||
import org.springframework.core.annotation.Order;
|
||||
@@ -80,7 +80,7 @@ import org.yaml.snakeyaml.Yaml;
|
||||
@Service
|
||||
@Order(value = Ordered.HIGHEST_PRECEDENCE)
|
||||
@Slf4j
|
||||
public class AppServiceImpl implements AppService, CommandLineRunner {
|
||||
public class AppServiceImpl implements AppService, InitializingBean {
|
||||
|
||||
private static final String PUSH_PROTOCOL_METRICS_NAME = "metrics";
|
||||
|
||||
@@ -500,7 +500,7 @@ public class AppServiceImpl implements AppService, CommandLineRunner {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run(String... args) throws Exception {
|
||||
public void afterPropertiesSet() throws Exception {
|
||||
var objectStoreConfig = objectStoreConfigService.getConfig();
|
||||
refreshStore(objectStoreConfig);
|
||||
}
|
||||
|
||||
+1
-1
@@ -55,7 +55,7 @@ class AppServiceTest {
|
||||
|
||||
@BeforeEach
|
||||
void setUp() throws Exception {
|
||||
appService.run();
|
||||
appService.afterPropertiesSet();
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user