Java Code Examples for com.alibaba.csp.sentinel.config.SentinelConfig#removeConfig()

The following examples show how to use com.alibaba.csp.sentinel.config.SentinelConfig#removeConfig() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TransportConfigTest.java    From Sentinel with Apache License 2.0 6 votes vote down vote up
@Test
public void testGetHeartbeatApiPath() {
    // use default heartbeat api path
    assertTrue(StringUtil.isNotEmpty(TransportConfig.getHeartbeatApiPath()));
    assertEquals(TransportConfig.HEARTBEAT_DEFAULT_PATH, TransportConfig.getHeartbeatApiPath());

    // config heartbeat api path
    SentinelConfig.setConfig(TransportConfig.HEARTBEAT_API_PATH, "/demo");
    assertTrue(StringUtil.isNotEmpty(TransportConfig.getHeartbeatApiPath()));
    assertEquals("/demo", TransportConfig.getHeartbeatApiPath());

    SentinelConfig.setConfig(TransportConfig.HEARTBEAT_API_PATH, "demo/registry");
    assertEquals("/demo/registry", TransportConfig.getHeartbeatApiPath());

    SentinelConfig.removeConfig(TransportConfig.HEARTBEAT_API_PATH);
    assertEquals(TransportConfig.HEARTBEAT_DEFAULT_PATH, TransportConfig.getHeartbeatApiPath());
}
 
Example 2
Source File: HeartbeatSenderInitFuncTest.java    From Sentinel-Dashboard-Nacos with Apache License 2.0 4 votes vote down vote up
@Before
public void setUp() throws Exception {
    SentinelConfig.removeConfig(TransportConfig.HEARTBEAT_INTERVAL_MS);
}
 
Example 3
Source File: HeartbeatSenderInitFuncTest.java    From Sentinel-Dashboard-Nacos with Apache License 2.0 4 votes vote down vote up
@After
public void tearDown() throws Exception {
    SentinelConfig.removeConfig(TransportConfig.HEARTBEAT_INTERVAL_MS);
}
 
Example 4
Source File: TransportConfigTest.java    From Sentinel-Dashboard-Nacos with Apache License 2.0 4 votes vote down vote up
@Before
public void setUp() throws Exception {
    SentinelConfig.removeConfig(TransportConfig.HEARTBEAT_INTERVAL_MS);
    SentinelConfig.removeConfig(TransportConfig.HEARTBEAT_CLIENT_IP);
}
 
Example 5
Source File: TransportConfigTest.java    From Sentinel-Dashboard-Nacos with Apache License 2.0 4 votes vote down vote up
@After
public void tearDown() throws Exception {
    SentinelConfig.removeConfig(TransportConfig.HEARTBEAT_INTERVAL_MS);
    SentinelConfig.removeConfig(TransportConfig.HEARTBEAT_CLIENT_IP);
}
 
Example 6
Source File: HeartbeatSenderInitFuncTest.java    From Sentinel with Apache License 2.0 4 votes vote down vote up
@Before
public void setUp() throws Exception {
    SentinelConfig.removeConfig(TransportConfig.HEARTBEAT_INTERVAL_MS);
}
 
Example 7
Source File: HeartbeatSenderInitFuncTest.java    From Sentinel with Apache License 2.0 4 votes vote down vote up
@After
public void tearDown() throws Exception {
    SentinelConfig.removeConfig(TransportConfig.HEARTBEAT_INTERVAL_MS);
}
 
Example 8
Source File: TransportConfigTest.java    From Sentinel with Apache License 2.0 4 votes vote down vote up
@Before
public void setUp() throws Exception {
    SentinelConfig.removeConfig(TransportConfig.HEARTBEAT_INTERVAL_MS);
    SentinelConfig.removeConfig(TransportConfig.HEARTBEAT_CLIENT_IP);
}
 
Example 9
Source File: TransportConfigTest.java    From Sentinel with Apache License 2.0 4 votes vote down vote up
@After
public void tearDown() throws Exception {
    SentinelConfig.removeConfig(TransportConfig.HEARTBEAT_INTERVAL_MS);
    SentinelConfig.removeConfig(TransportConfig.HEARTBEAT_CLIENT_IP);
}