Commit e2954d01 by Ryan Baxter Committed by GitHub

Merge pull request #2059 from brandon-atkinson/gh-2042

Rename *Test.java -> *Tests.java. Fixes #2042
parents 02e7594d 497b95ec
...@@ -48,12 +48,12 @@ import com.netflix.loadbalancer.Server; ...@@ -48,12 +48,12 @@ import com.netflix.loadbalancer.Server;
* *
* @author Jakub Narloch * @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", "feign.compression.request.enabled=true",
"hystrix.command.default.execution.isolation.strategy=SEMAPHORE", "hystrix.command.default.execution.isolation.strategy=SEMAPHORE",
"ribbon.OkToRetryOnAllOperations=false" }) "ribbon.OkToRetryOnAllOperations=false" })
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
public class FeignContentEncodingTest { public class FeignContentEncodingTests {
@Autowired @Autowired
private InvoiceClient invoiceClient; private InvoiceClient invoiceClient;
......
...@@ -74,7 +74,7 @@ import static org.mockito.Mockito.when; ...@@ -74,7 +74,7 @@ import static org.mockito.Mockito.when;
/** /**
* @author Ryan Baxter * @author Ryan Baxter
*/ */
public class RetryableFeignLoadBalancerTest { public class RetryableFeignLoadBalancerTests {
@Mock @Mock
private ILoadBalancer lb; private ILoadBalancer lb;
@Mock @Mock
......
...@@ -34,8 +34,8 @@ import static org.mockito.Mockito.when; ...@@ -34,8 +34,8 @@ import static org.mockito.Mockito.when;
* @author Rico Pahlisch * @author Rico Pahlisch
*/ */
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringBootTest(classes = DefaultServerIntrospectorDefaultTest.TestConfiguration.class) @SpringBootTest(classes = DefaultServerIntrospectorDefaultTests.TestConfiguration.class)
public class DefaultServerIntrospectorDefaultTest { public class DefaultServerIntrospectorDefaultTests {
@Autowired @Autowired
private ServerIntrospector serverIntrospector; private ServerIntrospector serverIntrospector;
......
...@@ -21,7 +21,6 @@ import org.junit.Assert; ...@@ -21,7 +21,6 @@ import org.junit.Assert;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired; 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.context.properties.EnableConfigurationProperties;
import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.context.annotation.Bean; 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 * @author Rico Pahlisch
*/ */
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringBootTest(classes = DefaultServerIntrospectorTest.TestConfiguration.class) @SpringBootTest(classes = DefaultServerIntrospectorTests.TestConfiguration.class)
@TestPropertySource(properties = { "ribbon.securePorts=12345,556" }) @TestPropertySource(properties = { "ribbon.securePorts=12345,556" })
public class DefaultServerIntrospectorTest { public class DefaultServerIntrospectorTests {
@Autowired @Autowired
private ServerIntrospector serverIntrospector; private ServerIntrospector serverIntrospector;
......
...@@ -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" "ribbon.eager-load.clients=testspec1,testspec2"
}) })
@DirtiesContext @DirtiesContext
public class RibbonClientsEagerInitializationTest { public class RibbonClientsEagerInitializationTests {
@Test @Test
public void contextsShouldBeInitialized() { public void contextsShouldBeInitialized() {
......
...@@ -41,7 +41,7 @@ import static org.mockito.Mockito.verify; ...@@ -41,7 +41,7 @@ import static org.mockito.Mockito.verify;
/** /**
* @author Ryan Baxter * @author Ryan Baxter
*/ */
public class RibbonLoadBalancedRetryPolicyFactoryTest { public class RibbonLoadBalancedRetryPolicyFactoryTests {
@Mock @Mock
private SpringClientFactory clientFactory; private SpringClientFactory clientFactory;
......
...@@ -39,7 +39,7 @@ import static org.mockito.Mockito.mock; ...@@ -39,7 +39,7 @@ import static org.mockito.Mockito.mock;
/** /**
* @author Ryan Baxter * @author Ryan Baxter
*/ */
public class ContextAwareRequestTest { public class ContextAwareRequestTests {
private RibbonCommandContext context; private RibbonCommandContext context;
private ContextAwareRequest request; private ContextAwareRequest request;
......
...@@ -26,7 +26,7 @@ import static org.junit.Assert.assertEquals; ...@@ -26,7 +26,7 @@ import static org.junit.Assert.assertEquals;
/** /**
* @author Ryan Baxter * @author Ryan Baxter
*/ */
public class RetryableStatusCodeExceptionTest { public class RetryableStatusCodeExceptionTests {
@Test @Test
public void testMessage() { public void testMessage() {
......
...@@ -54,9 +54,9 @@ import rx.functions.Func1; ...@@ -54,9 +54,9 @@ import rx.functions.Func1;
* @author Jakub Narloch * @author Jakub Narloch
*/ */
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringBootTest(classes = ObservableReturnValueHandlerTest.Application.class, webEnvironment = WebEnvironment.RANDOM_PORT) @SpringBootTest(classes = ObservableReturnValueHandlerTests.Application.class, webEnvironment = WebEnvironment.RANDOM_PORT)
@DirtiesContext @DirtiesContext
public class ObservableReturnValueHandlerTest { public class ObservableReturnValueHandlerTests {
@Value("${local.server.port}") @Value("${local.server.port}")
private int port = 0; private int port = 0;
......
...@@ -53,9 +53,9 @@ import rx.Observable; ...@@ -53,9 +53,9 @@ import rx.Observable;
* @author Jakub Narloch * @author Jakub Narloch
*/ */
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringBootTest(classes = ObservableSseEmitterTest.Application.class, webEnvironment = WebEnvironment.RANDOM_PORT) @SpringBootTest(classes = ObservableSseEmitterTests.Application.class, webEnvironment = WebEnvironment.RANDOM_PORT)
@DirtiesContext @DirtiesContext
public class ObservableSseEmitterTest { public class ObservableSseEmitterTests {
@Value("${local.server.port}") @Value("${local.server.port}")
private int port = 0; private int port = 0;
......
...@@ -44,9 +44,9 @@ import rx.Single; ...@@ -44,9 +44,9 @@ import rx.Single;
* @author Jakub Narloch * @author Jakub Narloch
*/ */
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringBootTest(classes = SingleReturnValueHandlerTest.Application.class, webEnvironment = WebEnvironment.RANDOM_PORT) @SpringBootTest(classes = SingleReturnValueHandlerTests.Application.class, webEnvironment = WebEnvironment.RANDOM_PORT)
@DirtiesContext @DirtiesContext
public class SingleReturnValueHandlerTest { public class SingleReturnValueHandlerTests {
@Value("${local.server.port}") @Value("${local.server.port}")
private int port = 0; private int port = 0;
......
...@@ -23,7 +23,7 @@ import org.junit.Test; ...@@ -23,7 +23,7 @@ import org.junit.Test;
* @author Ryan Baxter * @author Ryan Baxter
* *
*/ */
public class ZoneUtilsTest { public class ZoneUtilsTests {
@Test @Test
public void extractApproximateZoneTest() { public void extractApproximateZoneTest() {
......
...@@ -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.junit.Assert.*;
import static org.mockito.Mockito.mock; import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when; import static org.springframework.cloud.netflix.eureka.server.EurekaControllerTests.setInstance;
import static org.springframework.cloud.netflix.eureka.server.EurekaControllerTest.setInstance;
import java.util.Collections;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
import com.netflix.appinfo.ApplicationInfoManager; import com.netflix.appinfo.ApplicationInfoManager;
import com.netflix.appinfo.DataCenterInfo;
import com.netflix.appinfo.InstanceInfo; 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.After;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import com.netflix.eureka.util.StatusInfo; import com.netflix.eureka.util.StatusInfo;
public class EurekaControllerReplicasTest { public class EurekaControllerReplicasTests {
String noAuthList1 = "http://test1.com"; String noAuthList1 = "http://test1.com";
String noAuthList2 = noAuthList1 + ",http://test2.com"; String noAuthList2 = noAuthList1 + ",http://test2.com";
......
...@@ -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.mock;
import static org.mockito.Mockito.when; import static org.mockito.Mockito.when;
public class EurekaControllerTest { public class EurekaControllerTests {
private ApplicationInfoManager infoManager; private ApplicationInfoManager infoManager;
private ApplicationInfoManager original; private ApplicationInfoManager original;
......
...@@ -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; import com.netflix.eureka.resources.ServerCodecs;
@RunWith(SpringRunner.class) @RunWith(SpringRunner.class)
@SpringBootTest(classes = EurekaCustomPeerNodesTest.Application.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, value = { @SpringBootTest(classes = EurekaCustomPeerNodesTests.Application.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, value = {
"spring.application.name=eureka", "server.contextPath=/context", "spring.application.name=eureka", "server.contextPath=/context",
"management.security.enabled=false" }) "management.security.enabled=false" })
public class EurekaCustomPeerNodesTest { public class EurekaCustomPeerNodesTests {
@Autowired @Autowired
private PeerEurekaNodes peerEurekaNodes; private PeerEurekaNodes peerEurekaNodes;
......
...@@ -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.builder.SpringApplicationBuilder;
import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.mock.mockito.SpyBean; 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.EurekaInstanceCanceledEvent;
import org.springframework.cloud.netflix.eureka.server.event.EurekaInstanceRegisteredEvent; import org.springframework.cloud.netflix.eureka.server.event.EurekaInstanceRegisteredEvent;
import org.springframework.cloud.netflix.eureka.server.event.EurekaInstanceRenewedEvent; 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, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT,
value = {"spring.application.name=eureka", "logging.level.org.springframework." value = {"spring.application.name=eureka", "logging.level.org.springframework."
+ "cloud.netflix.eureka.server.InstanceRegistry=DEBUG"}) + "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 APP_NAME = "MY-APP-NAME";
private static final String HOST_NAME = "my-host-name"; private static final String HOST_NAME = "my-host-name";
......
...@@ -31,7 +31,7 @@ import static org.mockito.Mockito.mock; ...@@ -31,7 +31,7 @@ import static org.mockito.Mockito.mock;
/** /**
* @author Spencer Gibb * @author Spencer Gibb
*/ */
public class CommonsInstanceDiscoveryTest { public class CommonsInstanceDiscoveryTests {
private DiscoveryClient discoveryClient; private DiscoveryClient discoveryClient;
private TurbineProperties turbineProperties; private TurbineProperties turbineProperties;
......
...@@ -29,7 +29,7 @@ import static org.mockito.Mockito.mock; ...@@ -29,7 +29,7 @@ import static org.mockito.Mockito.mock;
/** /**
* @author Spencer Gibb * @author Spencer Gibb
*/ */
public class EurekaInstanceDiscoveryTest { public class EurekaInstanceDiscoveryTests {
private EurekaClient eurekaClient; private EurekaClient eurekaClient;
private TurbineProperties turbineProperties; private TurbineProperties turbineProperties;
......
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