Adjust the UT of dynamic configmap config (#9033)

This commit is contained in:
dashanji 2022-05-11 21:46:08 +08:00 committed by GitHub
parent a2e2a7b27f
commit 7b09b36cd2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 7 additions and 7 deletions

View File

@ -31,7 +31,7 @@ Supported configurations are as follows:
| Config Key | Value Description | Value Format Example |
|:----:|:----:|:----:|
|agent-analyzer.default.slowDBAccessThreshold| Thresholds of slow Database statement. Overrides `receiver-trace/default/slowDBAccessThreshold` of `application.yml`. | default:200,mongodb:50|
|agent-analyzer.default.slowDBAccessThreshold| Thresholds of slow Database statement. Overrides `agent-analyzer/default/slowDBAccessThreshold` of `application.yml`. | default:200,mongodb:50|
|agent-analyzer.default.uninstrumentedGateways| The uninstrumented gateways. Overrides `gateways.yml`. | Same as [`gateways.yml`](uninstrumented-gateways.md#configuration-format). |
|alarm.default.alarm-settings| The alarm settings. Overrides `alarm-settings.yml`. | Same as [`alarm-settings.yml`](backend-alarm.md). |
|core.default.apdexThreshold| The apdex threshold settings. Overrides `service-apdex-threshold.yml`. | Same as [`service-apdex-threshold.yml`](apdex-threshold.md). |

View File

@ -93,10 +93,10 @@ public class ConfigmapConfigWatcherRegisterTest {
Map<String, String> configMapData = this.readMockConfigMapData();
PowerMockito.doReturn(configMapData).when(informer).configMapData();
Optional<ConfigTable> optionalConfigTable = register.readConfig(new HashSet<String>() {{
add("receiver-trace.default.slowDBAccessThreshold");
add("agent-analyzer.default.slowDBAccessThreshold");
add("alarm.default.alarm-settings");
add("core.default.apdexThreshold");
add("receiver-trace.default.uninstrumentedGateways");
add("agent-analyzer.default.uninstrumentedGateways");
}});
Assert.assertTrue(optionalConfigTable.isPresent());

View File

@ -24,7 +24,7 @@ metadata:
app: collector
release: skywalking
data:
receiver-trace.default.slowDBAccessThreshold: default:200,mongodb:50
agent-analyzer.default.slowDBAccessThreshold: default:200,mongodb:50
alarm.default.alarm-settings: |-
rules:
# Rule unique name, must be ended with `_rule`.
@ -101,7 +101,7 @@ data:
# tomcat: 1000
# the threshold of service "springboot1" is 50ms
# springboot1: 50
receiver-trace.default.uninstrumentedGateways: |-
agent-analyzer.default.uninstrumentedGateways: |-
#gateways:
# - name: proxy0
# instances:

View File

@ -36,7 +36,7 @@ public class NacosConfigWatcherRegisterTest {
@Test
public void shouldReadConfigs() throws NacosException {
final String group = "skywalking";
final String testKey1 = "receiver-trace.default.slowDBAccessThreshold";
final String testKey1 = "agent-analyzer.default.slowDBAccessThreshold";
final String testVal1 = "test";
final String testKey2 = "testKey";
final String testVal2 = "testVal";

View File

@ -35,7 +35,7 @@ public class ZookeeperConfigWatcherRegisterTestCase {
@Test
public void TestCase() throws Exception {
final String namespace = "/default";
final String key = "receiver-trace.default.slowDBAccessThreshold";
final String key = "agent-analyzer.default.slowDBAccessThreshold";
final String value = "default:100,mongodb:50";
final ZookeeperServerSettings mockSettings = mock(ZookeeperServerSettings.class);