Fixes #363
This commit is contained in:
parent
2f630b0be6
commit
97743685ac
@ -24,6 +24,7 @@ import javax.servlet.ServletContext;
|
||||
|
||||
/**
|
||||
* Running config
|
||||
*
|
||||
* @author <a href="mailto:zpf.073@gmail.com">nkorange</a>
|
||||
*/
|
||||
@Component
|
||||
|
@ -42,7 +42,6 @@ import com.alibaba.nacos.config.server.service.DataSourceService;
|
||||
@WebAppConfiguration
|
||||
public class HealthControllerUnitTest {
|
||||
|
||||
|
||||
@InjectMocks
|
||||
HealthController healthController;
|
||||
|
||||
@ -50,6 +49,7 @@ public class HealthControllerUnitTest {
|
||||
DataSourceService dataSourceService;
|
||||
|
||||
private MockMvc mockmvc;
|
||||
|
||||
@Before
|
||||
public void setUp() throws Exception {
|
||||
mockmvc = MockMvcBuilders.standaloneSetup(healthController).build();
|
||||
|
@ -15,18 +15,16 @@
|
||||
*/
|
||||
package com.alibaba.nacos.config.server.service;
|
||||
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
import org.springframework.test.context.web.WebAppConfiguration;
|
||||
|
||||
import com.alibaba.nacos.config.server.service.AggrWhitelist;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
@WebAppConfiguration
|
||||
|
@ -15,19 +15,14 @@
|
||||
*/
|
||||
package com.alibaba.nacos.config.server.service;
|
||||
|
||||
import com.alibaba.nacos.config.server.utils.GroupKey2;
|
||||
import org.junit.Assert;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
import org.springframework.test.context.web.WebAppConfiguration;
|
||||
|
||||
import com.alibaba.nacos.config.server.service.ClientTrackService;
|
||||
import com.alibaba.nacos.config.server.service.ConfigService;
|
||||
import com.alibaba.nacos.config.server.utils.GroupKey2;
|
||||
|
||||
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
@WebAppConfiguration
|
||||
public class ClientTrackServiceTest {
|
||||
|
@ -17,21 +17,17 @@ package com.alibaba.nacos.config.server.service;
|
||||
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
import org.springframework.test.context.web.WebAppConfiguration;
|
||||
|
||||
import com.alibaba.nacos.config.server.service.DiskUtil;
|
||||
|
||||
import javax.servlet.ServletContext;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
@WebAppConfiguration
|
||||
public class DiskServiceUnitTest {
|
||||
|
@ -59,7 +59,6 @@ public class GroupKeyTest {
|
||||
System.out.println(e.toString());
|
||||
}
|
||||
|
||||
|
||||
key = "11111%25+222";
|
||||
String[] pair = GroupKey2.parseKey(key);
|
||||
Assert.assertEquals("11111%", pair[0]);
|
||||
|
@ -24,7 +24,6 @@ import org.springframework.test.context.web.WebAppConfiguration;
|
||||
|
||||
import com.alibaba.nacos.config.server.utils.SimpleReadWriteLock;
|
||||
|
||||
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
@WebAppConfiguration
|
||||
public class SimpleReadWriteLockTest {
|
||||
|
@ -32,7 +32,6 @@ import java.util.concurrent.CountDownLatch;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
@WebAppConfiguration
|
||||
public class EventDispatcherTest {
|
||||
@ -78,7 +77,6 @@ public class EventDispatcherTest {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class MockEvent implements Event {
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user