use of com.alibaba.cloud.sentinel.endpoint.SentinelEndpoint in project spring-cloud-alibaba by alibaba.
the class SentinelAutoConfigurationTests method checkEndpoint.
private void checkEndpoint() {
SentinelEndpoint sentinelEndpoint = new SentinelEndpoint(sentinelProperties);
Map<String, Object> map = sentinelEndpoint.invoke();
assertThat(map.get("logUsePid")).isEqualTo(Boolean.TRUE);
assertThat(map.get("consoleServer").toString()).isEqualTo(Arrays.asList(new Endpoint(Protocol.HTTP, "localhost", 8080), new Endpoint(Protocol.HTTP, "localhost", 8081)).toString());
assertThat(map.get("clientPort")).isEqualTo("9999");
assertThat(map.get("heartbeatIntervalMs")).isEqualTo(20000L);
assertThat(map.get("clientIp")).isEqualTo("1.1.1.1");
assertThat(map.get("metricsFileSize")).isEqualTo(9999L);
assertThat(map.get("totalMetricsFileCount")).isEqualTo(100);
assertThat(map.get("metricsFileCharset")).isEqualTo("UTF-8");
assertThat(map.get("blockPage")).isEqualTo("/error");
}
Aggregations