Commit accc8c43 authored by Yiming Liu's avatar Yiming Liu

Enlarge sleep time for long poll unit test

parent 52550468
...@@ -2,13 +2,10 @@ package com.ctrip.apollo.biz.service; ...@@ -2,13 +2,10 @@ package com.ctrip.apollo.biz.service;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull; import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import static org.mockito.Mockito.times; import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify; import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when; import static org.mockito.Mockito.when;
import java.util.Map;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
...@@ -18,9 +15,6 @@ import org.springframework.test.util.ReflectionTestUtils; ...@@ -18,9 +15,6 @@ import org.springframework.test.util.ReflectionTestUtils;
import com.ctrip.apollo.biz.entity.Release; import com.ctrip.apollo.biz.entity.Release;
import com.ctrip.apollo.biz.repository.ReleaseRepository; import com.ctrip.apollo.biz.repository.ReleaseRepository;
import com.ctrip.apollo.core.dto.ApolloConfig;
import com.google.common.collect.Maps;
import com.google.gson.JsonSyntaxException;
/** /**
* @author Jason Song(song_s@ctrip.com) * @author Jason Song(song_s@ctrip.com)
......
...@@ -140,7 +140,7 @@ public class RemoteConfigRepositoryTest extends ComponentTestCase { ...@@ -140,7 +140,7 @@ public class RemoteConfigRepositoryTest extends ComponentTestCase {
when(pollResponse.getStatusCode()).thenReturn(HttpServletResponse.SC_OK); when(pollResponse.getStatusCode()).thenReturn(HttpServletResponse.SC_OK);
when(someResponse.getBody()).thenReturn(newApolloConfig); when(someResponse.getBody()).thenReturn(newApolloConfig);
TimeUnit.MILLISECONDS.sleep(60); TimeUnit.MILLISECONDS.sleep(1000);
remoteConfigRepository.stopLongPollingRefresh(); remoteConfigRepository.stopLongPollingRefresh();
......
...@@ -20,11 +20,6 @@ ...@@ -20,11 +20,6 @@
<artifactId>apollo-biz</artifactId> <artifactId>apollo-biz</artifactId>
</dependency> </dependency>
<!-- end of apollo --> <!-- end of apollo -->
<!-- redis -->
<!-- <dependency> <groupId>org.springframework.data</groupId> <artifactId>spring-data-redis</artifactId>
</dependency> <dependency> <groupId>redis.clients</groupId> <artifactId>jedis</artifactId>
</dependency> -->
<!-- end of redis -->
<!-- eureka --> <!-- eureka -->
<dependency> <dependency>
<groupId>org.springframework.cloud</groupId> <groupId>org.springframework.cloud</groupId>
......
package com.ctrip.apollo.configservice.controller; package com.ctrip.apollo.configservice.controller;
import com.google.common.collect.ImmutableMap; import static org.junit.Assert.assertEquals;
import com.google.common.collect.Lists; import static org.junit.Assert.assertNull;
import com.google.common.collect.Maps; import static org.mockito.Matchers.anyString;
import com.google.gson.Gson; import static org.mockito.Matchers.eq;
import com.google.gson.JsonSyntaxException; import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import com.ctrip.apollo.biz.entity.Release; import java.util.Map;
import com.ctrip.apollo.biz.service.ConfigService;
import com.ctrip.apollo.core.dto.ApolloConfig; import javax.servlet.http.HttpServletResponse;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
...@@ -17,20 +20,13 @@ import org.mockito.Mock; ...@@ -17,20 +20,13 @@ import org.mockito.Mock;
import org.mockito.runners.MockitoJUnitRunner; import org.mockito.runners.MockitoJUnitRunner;
import org.springframework.test.util.ReflectionTestUtils; import org.springframework.test.util.ReflectionTestUtils;
import java.util.Map; import com.ctrip.apollo.biz.entity.Release;
import com.ctrip.apollo.biz.service.ConfigService;
import javax.servlet.http.HttpServletResponse; import com.ctrip.apollo.core.dto.ApolloConfig;
import com.google.common.collect.ImmutableMap;
import static org.junit.Assert.assertEquals; import com.google.common.collect.Lists;
import static org.junit.Assert.assertNull; import com.google.gson.Gson;
import static org.junit.Assert.assertThat; import com.google.gson.JsonSyntaxException;
import static org.junit.Assert.assertTrue;
import static org.mockito.Mockito.anyString;
import static org.mockito.Mockito.eq;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
/** /**
* @author Jason Song(song_s@ctrip.com) * @author Jason Song(song_s@ctrip.com)
......
...@@ -343,56 +343,14 @@ ...@@ -343,56 +343,14 @@
<properties> <properties>
<package.environment>local</package.environment> <package.environment>local</package.environment>
</properties> </properties>
</profile>
<profile>
<id>dev</id>
<properties>
<package.environment>dev</package.environment>
</properties>
<activation> <activation>
<activeByDefault>true</activeByDefault> <activeByDefault>true</activeByDefault>
</activation> </activation>
</profile> </profile>
<profile> <profile>
<id>fat</id> <id>ctrip</id>
<properties>
<package.environment>fat</package.environment>
</properties>
<dependencies>
<dependency>
<groupId>com.ctrip.platform</groupId>
<artifactId>ctrip-dal-client</artifactId>
</dependency>
</dependencies>
</profile>
<profile>
<id>uat</id>
<properties>
<package.environment>uat</package.environment>
</properties>
<dependencies>
<dependency>
<groupId>com.ctrip.platform</groupId>
<artifactId>ctrip-dal-client</artifactId>
</dependency>
</dependencies>
</profile>
<profile>
<id>prod</id>
<properties>
<package.environment>prod</package.environment>
</properties>
<dependencies>
<dependency>
<groupId>com.ctrip.platform</groupId>
<artifactId>ctrip-dal-client</artifactId>
</dependency>
</dependencies>
</profile>
<profile>
<id>tools</id>
<properties> <properties>
<package.environment>tools</package.environment> <package.environment>ctrip</package.environment>
</properties> </properties>
<dependencies> <dependencies>
<dependency> <dependency>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment