Browse Source

Merge remote-tracking branch 'origin/master' into 2.0.x

pull/6/head
Ryan Baxter 8 years ago
parent
commit
0be3d23369
  1. 4
      spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/feign/encoding/FeignContentEncodingTests.java
  2. 2
      spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/feign/ribbon/RetryableFeignLoadBalancerTests.java
  3. 4
      spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/ribbon/DefaultServerIntrospectorDefaultTests.java
  4. 5
      spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/ribbon/DefaultServerIntrospectorTests.java
  5. 2
      spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/ribbon/RibbonClientsEagerInitializationTests.java
  6. 2
      spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/ribbon/RibbonLoadBalancedRetryPolicyFactoryTests.java
  7. 2
      spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/ribbon/support/ContextAwareRequestTests.java
  8. 2
      spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/ribbon/support/RetryableStatusCodeExceptionTests.java
  9. 4
      spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/rx/ObservableReturnValueHandlerTests.java
  10. 4
      spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/rx/ObservableSseEmitterTests.java
  11. 4
      spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/rx/SingleReturnValueHandlerTests.java
  12. 2
      spring-cloud-netflix-eureka-client/src/test/java/org/springframework/cloud/netflix/ribbon/eureka/ZoneUtilsTests.java
  13. 10
      spring-cloud-netflix-eureka-server/src/test/java/org/springframework/cloud/netflix/eureka/server/EurekaControllerReplicasTests.java
  14. 2
      spring-cloud-netflix-eureka-server/src/test/java/org/springframework/cloud/netflix/eureka/server/EurekaControllerTests.java
  15. 8
      spring-cloud-netflix-eureka-server/src/test/java/org/springframework/cloud/netflix/eureka/server/EurekaCustomPeerNodesTests.java
  16. 4
      spring-cloud-netflix-eureka-server/src/test/java/org/springframework/cloud/netflix/eureka/server/InstanceRegistryTests.java
  17. 2
      spring-cloud-netflix-turbine/src/test/java/org/springframework/cloud/netflix/turbine/CommonsInstanceDiscoveryTests.java
  18. 2
      spring-cloud-netflix-turbine/src/test/java/org/springframework/cloud/netflix/turbine/EurekaInstanceDiscoveryTests.java

4
spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/feign/encoding/FeignContentEncodingTest.java → spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/feign/encoding/FeignContentEncodingTests.java

@ -48,12 +48,12 @@ import com.netflix.loadbalancer.Server; @@ -48,12 +48,12 @@ import com.netflix.loadbalancer.Server;
*
* @author Jakub Narloch
*/
@SpringBootTest(classes = FeignContentEncodingTest.Application.class, webEnvironment = WebEnvironment.RANDOM_PORT, value = {
@SpringBootTest(classes = FeignContentEncodingTests.Application.class, webEnvironment = WebEnvironment.RANDOM_PORT, value = {
"feign.compression.request.enabled=true",
"hystrix.command.default.execution.isolation.strategy=SEMAPHORE",
"ribbon.OkToRetryOnAllOperations=false" })
@RunWith(SpringJUnit4ClassRunner.class)
public class FeignContentEncodingTest {
public class FeignContentEncodingTests {
@Autowired
private InvoiceClient invoiceClient;

2
spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/feign/ribbon/RetryableFeignLoadBalancerTest.java → spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/feign/ribbon/RetryableFeignLoadBalancerTests.java

@ -73,7 +73,7 @@ import static org.mockito.Mockito.when; @@ -73,7 +73,7 @@ import static org.mockito.Mockito.when;
/**
* @author Ryan Baxter
*/
public class RetryableFeignLoadBalancerTest {
public class RetryableFeignLoadBalancerTests {
@Mock
private ILoadBalancer lb;
@Mock

4
spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/ribbon/DefaultServerIntrospectorDefaultTest.java → spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/ribbon/DefaultServerIntrospectorDefaultTests.java

@ -34,8 +34,8 @@ import static org.mockito.Mockito.when; @@ -34,8 +34,8 @@ import static org.mockito.Mockito.when;
* @author Rico Pahlisch
*/
@RunWith(SpringJUnit4ClassRunner.class)
@SpringBootTest(classes = DefaultServerIntrospectorDefaultTest.TestConfiguration.class)
public class DefaultServerIntrospectorDefaultTest {
@SpringBootTest(classes = DefaultServerIntrospectorDefaultTests.TestConfiguration.class)
public class DefaultServerIntrospectorDefaultTests {
@Autowired
private ServerIntrospector serverIntrospector;

5
spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/ribbon/DefaultServerIntrospectorTest.java → spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/ribbon/DefaultServerIntrospectorTests.java

@ -21,7 +21,6 @@ import org.junit.Assert; @@ -21,7 +21,6 @@ import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.context.annotation.Bean;
@ -36,9 +35,9 @@ import static org.mockito.Mockito.when; @@ -36,9 +35,9 @@ import static org.mockito.Mockito.when;
* @author Rico Pahlisch
*/
@RunWith(SpringJUnit4ClassRunner.class)
@SpringBootTest(classes = DefaultServerIntrospectorTest.TestConfiguration.class)
@SpringBootTest(classes = DefaultServerIntrospectorTests.TestConfiguration.class)
@TestPropertySource(properties = { "ribbon.securePorts=12345,556" })
public class DefaultServerIntrospectorTest {
public class DefaultServerIntrospectorTests {
@Autowired
private ServerIntrospector serverIntrospector;

2
spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/ribbon/RibbonClientsEagerInitializationTest.java → spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/ribbon/RibbonClientsEagerInitializationTests.java

@ -40,7 +40,7 @@ import static org.assertj.core.api.Assertions.assertThat; @@ -40,7 +40,7 @@ import static org.assertj.core.api.Assertions.assertThat;
"ribbon.eager-load.clients=testspec1,testspec2"
})
@DirtiesContext
public class RibbonClientsEagerInitializationTest {
public class RibbonClientsEagerInitializationTests {
@Test
public void contextsShouldBeInitialized() {

2
spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/ribbon/RibbonLoadBalancedRetryPolicyFactoryTest.java → spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/ribbon/RibbonLoadBalancedRetryPolicyFactoryTests.java

@ -41,7 +41,7 @@ import static org.mockito.Mockito.verify; @@ -41,7 +41,7 @@ import static org.mockito.Mockito.verify;
/**
* @author Ryan Baxter
*/
public class RibbonLoadBalancedRetryPolicyFactoryTest {
public class RibbonLoadBalancedRetryPolicyFactoryTests {
@Mock
private SpringClientFactory clientFactory;

2
spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/ribbon/support/ContextAwareRequestTest.java → spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/ribbon/support/ContextAwareRequestTests.java

@ -39,7 +39,7 @@ import static org.mockito.Mockito.mock; @@ -39,7 +39,7 @@ import static org.mockito.Mockito.mock;
/**
* @author Ryan Baxter
*/
public class ContextAwareRequestTest {
public class ContextAwareRequestTests {
private RibbonCommandContext context;
private ContextAwareRequest request;

2
spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/ribbon/support/RetryableStatusCodeExceptionTest.java → spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/ribbon/support/RetryableStatusCodeExceptionTests.java

@ -26,7 +26,7 @@ import static org.junit.Assert.assertEquals; @@ -26,7 +26,7 @@ import static org.junit.Assert.assertEquals;
/**
* @author Ryan Baxter
*/
public class RetryableStatusCodeExceptionTest {
public class RetryableStatusCodeExceptionTests {
@Test
public void testMessage() {

4
spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/rx/ObservableReturnValueHandlerTest.java → spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/rx/ObservableReturnValueHandlerTests.java

@ -54,9 +54,9 @@ import rx.functions.Func1; @@ -54,9 +54,9 @@ import rx.functions.Func1;
* @author Jakub Narloch
*/
@RunWith(SpringJUnit4ClassRunner.class)
@SpringBootTest(classes = ObservableReturnValueHandlerTest.Application.class, webEnvironment = WebEnvironment.RANDOM_PORT)
@SpringBootTest(classes = ObservableReturnValueHandlerTests.Application.class, webEnvironment = WebEnvironment.RANDOM_PORT)
@DirtiesContext
public class ObservableReturnValueHandlerTest {
public class ObservableReturnValueHandlerTests {
@Value("${local.server.port}")
private int port = 0;

4
spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/rx/ObservableSseEmitterTest.java → spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/rx/ObservableSseEmitterTests.java

@ -53,9 +53,9 @@ import rx.Observable; @@ -53,9 +53,9 @@ import rx.Observable;
* @author Jakub Narloch
*/
@RunWith(SpringJUnit4ClassRunner.class)
@SpringBootTest(classes = ObservableSseEmitterTest.Application.class, webEnvironment = WebEnvironment.RANDOM_PORT)
@SpringBootTest(classes = ObservableSseEmitterTests.Application.class, webEnvironment = WebEnvironment.RANDOM_PORT)
@DirtiesContext
public class ObservableSseEmitterTest {
public class ObservableSseEmitterTests {
@Value("${local.server.port}")
private int port = 0;

4
spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/rx/SingleReturnValueHandlerTest.java → spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/rx/SingleReturnValueHandlerTests.java

@ -44,9 +44,9 @@ import rx.Single; @@ -44,9 +44,9 @@ import rx.Single;
* @author Jakub Narloch
*/
@RunWith(SpringJUnit4ClassRunner.class)
@SpringBootTest(classes = SingleReturnValueHandlerTest.Application.class, webEnvironment = WebEnvironment.RANDOM_PORT)
@SpringBootTest(classes = SingleReturnValueHandlerTests.Application.class, webEnvironment = WebEnvironment.RANDOM_PORT)
@DirtiesContext
public class SingleReturnValueHandlerTest {
public class SingleReturnValueHandlerTests {
@Value("${local.server.port}")
private int port = 0;

2
spring-cloud-netflix-eureka-client/src/test/java/org/springframework/cloud/netflix/ribbon/eureka/ZoneUtilsTest.java → spring-cloud-netflix-eureka-client/src/test/java/org/springframework/cloud/netflix/ribbon/eureka/ZoneUtilsTests.java

@ -23,7 +23,7 @@ import org.junit.Test; @@ -23,7 +23,7 @@ import org.junit.Test;
* @author Ryan Baxter
*
*/
public class ZoneUtilsTest {
public class ZoneUtilsTests {
@Test
public void extractApproximateZoneTest() {

10
spring-cloud-netflix-eureka-server/src/test/java/org/springframework/cloud/netflix/eureka/server/EurekaControllerReplicasTest.java → spring-cloud-netflix-eureka-server/src/test/java/org/springframework/cloud/netflix/eureka/server/EurekaControllerReplicasTests.java

@ -2,26 +2,20 @@ package org.springframework.cloud.netflix.eureka.server; @@ -2,26 +2,20 @@ package org.springframework.cloud.netflix.eureka.server;
import static org.junit.Assert.*;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
import static org.springframework.cloud.netflix.eureka.server.EurekaControllerTest.setInstance;
import static org.springframework.cloud.netflix.eureka.server.EurekaControllerTests.setInstance;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import com.netflix.appinfo.ApplicationInfoManager;
import com.netflix.appinfo.DataCenterInfo;
import com.netflix.appinfo.InstanceInfo;
import com.netflix.appinfo.MyDataCenterInfo;
import com.netflix.eureka.cluster.PeerEurekaNode;
import com.netflix.eureka.cluster.PeerEurekaNodes;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import com.netflix.eureka.util.StatusInfo;
public class EurekaControllerReplicasTest {
public class EurekaControllerReplicasTests {
String noAuthList1 = "http://test1.com";
String noAuthList2 = noAuthList1 + ",http://test2.com";

2
spring-cloud-netflix-eureka-server/src/test/java/org/springframework/cloud/netflix/eureka/server/EurekaControllerTest.java → spring-cloud-netflix-eureka-server/src/test/java/org/springframework/cloud/netflix/eureka/server/EurekaControllerTests.java

@ -49,7 +49,7 @@ import static org.junit.Assert.assertThat; @@ -49,7 +49,7 @@ import static org.junit.Assert.assertThat;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
public class EurekaControllerTest {
public class EurekaControllerTests {
private ApplicationInfoManager infoManager;
private ApplicationInfoManager original;

8
spring-cloud-netflix-eureka-server/src/test/java/org/springframework/cloud/netflix/eureka/server/EurekaCustomPeerNodesTest.java → spring-cloud-netflix-eureka-server/src/test/java/org/springframework/cloud/netflix/eureka/server/EurekaCustomPeerNodesTests.java

@ -36,10 +36,10 @@ import com.netflix.eureka.registry.PeerAwareInstanceRegistry; @@ -36,10 +36,10 @@ import com.netflix.eureka.registry.PeerAwareInstanceRegistry;
import com.netflix.eureka.resources.ServerCodecs;
@RunWith(SpringRunner.class)
@SpringBootTest(classes = EurekaCustomPeerNodesTest.Application.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, value = {
"spring.application.name=eureka", "server.servlet.contextPath=/context",
@SpringBootTest(classes = EurekaCustomPeerNodesTests.Application.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, value = {
"spring.application.name=eureka", "server.contextPath=/context",
"management.security.enabled=false" })
public class EurekaCustomPeerNodesTest {
public class EurekaCustomPeerNodesTests {
@Autowired
private PeerEurekaNodes peerEurekaNodes;
@ -58,7 +58,7 @@ public class EurekaCustomPeerNodesTest { @@ -58,7 +58,7 @@ public class EurekaCustomPeerNodesTest {
public static void main(String[] args) {
new SpringApplicationBuilder(ApplicationContextTests.Application.class)
.properties("spring.application.name=eureka",
"server.servlet.contextPath=/context")
"server.contextPath=/context")
.run(args);
}

4
spring-cloud-netflix-eureka-server/src/test/java/org/springframework/cloud/netflix/eureka/server/InstanceRegistryTest.java → spring-cloud-netflix-eureka-server/src/test/java/org/springframework/cloud/netflix/eureka/server/InstanceRegistryTests.java

@ -13,7 +13,7 @@ import org.springframework.boot.autoconfigure.EnableAutoConfiguration; @@ -13,7 +13,7 @@ import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.mock.mockito.SpyBean;
import org.springframework.cloud.netflix.eureka.server.InstanceRegistryTest.TestApplication;
import org.springframework.cloud.netflix.eureka.server.InstanceRegistryTests.TestApplication;
import org.springframework.cloud.netflix.eureka.server.event.EurekaInstanceCanceledEvent;
import org.springframework.cloud.netflix.eureka.server.event.EurekaInstanceRegisteredEvent;
import org.springframework.cloud.netflix.eureka.server.event.EurekaInstanceRenewedEvent;
@ -41,7 +41,7 @@ import static org.mockito.Mockito.doReturn; @@ -41,7 +41,7 @@ import static org.mockito.Mockito.doReturn;
webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT,
value = {"spring.application.name=eureka", "logging.level.org.springframework."
+ "cloud.netflix.eureka.server.InstanceRegistry=DEBUG"})
public class InstanceRegistryTest {
public class InstanceRegistryTests {
private static final String APP_NAME = "MY-APP-NAME";
private static final String HOST_NAME = "my-host-name";

2
spring-cloud-netflix-turbine/src/test/java/org/springframework/cloud/netflix/turbine/CommonsInstanceDiscoveryTest.java → spring-cloud-netflix-turbine/src/test/java/org/springframework/cloud/netflix/turbine/CommonsInstanceDiscoveryTests.java

@ -31,7 +31,7 @@ import static org.mockito.Mockito.mock; @@ -31,7 +31,7 @@ import static org.mockito.Mockito.mock;
/**
* @author Spencer Gibb
*/
public class CommonsInstanceDiscoveryTest {
public class CommonsInstanceDiscoveryTests {
private DiscoveryClient discoveryClient;
private TurbineProperties turbineProperties;

2
spring-cloud-netflix-turbine/src/test/java/org/springframework/cloud/netflix/turbine/EurekaInstanceDiscoveryTest.java → spring-cloud-netflix-turbine/src/test/java/org/springframework/cloud/netflix/turbine/EurekaInstanceDiscoveryTests.java

@ -29,7 +29,7 @@ import static org.mockito.Mockito.mock; @@ -29,7 +29,7 @@ import static org.mockito.Mockito.mock;
/**
* @author Spencer Gibb
*/
public class EurekaInstanceDiscoveryTest {
public class EurekaInstanceDiscoveryTests {
private EurekaClient eurekaClient;
private TurbineProperties turbineProperties;
Loading…
Cancel
Save