From 01ce2399b652e330b6d418bd2fa98d7963aa5458 Mon Sep 17 00:00:00 2001 From: Spencer Gibb Date: Thu, 8 Dec 2016 13:55:27 -0700 Subject: [PATCH] Update to latest s-c-{build,commons,netflix} --- README.adoc | 6 +++--- docs/pom.xml | 2 +- docs/src/main/asciidoc/README.adoc | 4 ++-- pom.xml | 10 +++++----- spring-cloud-starter-zookeeper-all/pom.xml | 2 +- spring-cloud-starter-zookeeper-config/pom.xml | 2 +- .../pom.xml | 2 +- spring-cloud-starter-zookeeper/pom.xml | 2 +- spring-cloud-zookeeper-config/pom.xml | 2 +- spring-cloud-zookeeper-core/pom.xml | 2 +- spring-cloud-zookeeper-dependencies/pom.xml | 4 ++-- spring-cloud-zookeeper-discovery/pom.xml | 4 ++-- ...althIndicatorWithNestedStructureTests.java | 17 ++++++++--------- .../discovery/ZookeeperDiscoveryTests.java | 18 +++++++++--------- ...perLifecycleRegistrationDisabledTests.java | 17 +++++++++-------- .../discovery/dependency/StickyRuleTests.java | 19 +++++++++---------- ...overyWithDependenciesIntegrationTests.java | 12 ++++++------ .../DefaultDependencyWatcherSpringTests.java | 12 ++++++------ .../resources/application-dependencies.yml | 3 +++ .../src/test/resources/application-ribbon.yml | 5 ++++- spring-cloud-zookeeper-sample/pom.xml | 2 +- 21 files changed, 76 insertions(+), 71 deletions(-) diff --git a/README.adoc b/README.adoc index 48042760..a7aedc5f 100644 --- a/README.adoc +++ b/README.adoc @@ -29,9 +29,9 @@ See the http://zookeeper.apache.org[Zookeeper site] for more information. Sprin 2. http://zookeeper.apache.org/doc/current/zookeeperStarted.html#sc_InstallingSingleMode[Start zookeeper]. 3. http://zookeeper.apache.org/doc/current/zookeeperStarted.html#sc_ConnectingToZooKeeper[Verify zookeeper is running]. 4. Run `mvn --settings .settings.xml package` this will bring in the required spring cloud maven repositories and build -5. Run `java -jar spring-cloud-zookeeper-sample/target/spring-cloud-zookeeper-sample-1.0.4.BUILD-SNAPSHOT.jar` +5. Run `java -jar spring-cloud-zookeeper-sample/target/spring-cloud-zookeeper-sample-1.1.0.BUILD-SNAPSHOT.jar` 6. Visit http://localhost:8080, verify that `{"serviceId":"testZookeeperApp","host":"","port":8080}` results -7. run `java -jar spring-cloud-zookeeper-sample/target/spring-cloud-zookeeper-sample-1.0.4.BUILD-SNAPSHOT.jar --server.port=8081` +7. run `java -jar spring-cloud-zookeeper-sample/target/spring-cloud-zookeeper-sample-1.1.0.BUILD-SNAPSHOT.jar --server.port=8081` 8. visit http://localhost:8080 again, verify that `{"serviceId":"testZookeeperApp","host":"","port":8081}` eventually shows up in the results in a round robbin fashion (may take a minute or so). == Building @@ -170,4 +170,4 @@ added after the original pull request but before a merge. other target branch in the main project). * When writing a commit message please follow http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html[these conventions], if you are fixing an existing issue please add `Fixes gh-XXXX` at the end of the commit - message (where XXXX is the issue number). \ No newline at end of file + message (where XXXX is the issue number). diff --git a/docs/pom.xml b/docs/pom.xml index 2d327f23..ae8853d2 100644 --- a/docs/pom.xml +++ b/docs/pom.xml @@ -6,7 +6,7 @@ org.springframework.cloud spring-cloud-zookeeper - 1.0.4.BUILD-SNAPSHOT + 1.1.0.BUILD-SNAPSHOT spring-cloud-zookeeper-docs pom diff --git a/docs/src/main/asciidoc/README.adoc b/docs/src/main/asciidoc/README.adoc index 2c431f1b..1e151b6a 100644 --- a/docs/src/main/asciidoc/README.adoc +++ b/docs/src/main/asciidoc/README.adoc @@ -20,9 +20,9 @@ See the http://zookeeper.apache.org[Zookeeper site] for more information. Sprin 2. http://zookeeper.apache.org/doc/current/zookeeperStarted.html#sc_InstallingSingleMode[Start zookeeper]. 3. http://zookeeper.apache.org/doc/current/zookeeperStarted.html#sc_ConnectingToZooKeeper[Verify zookeeper is running]. 4. Run `mvn --settings .settings.xml package` this will bring in the required spring cloud maven repositories and build -5. Run `java -jar spring-cloud-zookeeper-sample/target/spring-cloud-zookeeper-sample-1.0.4.BUILD-SNAPSHOT.jar` +5. Run `java -jar spring-cloud-zookeeper-sample/target/spring-cloud-zookeeper-sample-1.1.0.BUILD-SNAPSHOT.jar` 6. Visit http://localhost:8080, verify that `{"serviceId":"testZookeeperApp","host":"","port":8080}` results -7. run `java -jar spring-cloud-zookeeper-sample/target/spring-cloud-zookeeper-sample-1.0.4.BUILD-SNAPSHOT.jar --server.port=8081` +7. run `java -jar spring-cloud-zookeeper-sample/target/spring-cloud-zookeeper-sample-1.1.0.BUILD-SNAPSHOT.jar --server.port=8081` 8. visit http://localhost:8080 again, verify that `{"serviceId":"testZookeeperApp","host":"","port":8081}` eventually shows up in the results in a round robbin fashion (may take a minute or so). == Building diff --git a/pom.xml b/pom.xml index 3b832d11..67f071b3 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ org.springframework.cloud spring-cloud-zookeeper - 1.0.4.BUILD-SNAPSHOT + 1.1.0.BUILD-SNAPSHOT pom Spring Cloud Zookeeper Spring Cloud Zookeeper @@ -14,7 +14,7 @@ org.springframework.cloud spring-cloud-build - 1.2.2.BUILD-SNAPSHOT + 1.3.0.BUILD-SNAPSHOT @@ -197,9 +197,9 @@ 2.17 - 1.1.3.BUILD-SNAPSHOT - 1.1.3.BUILD-SNAPSHOT - 1.1.6.BUILD-SNAPSHOT + 1.3.0.BUILD-SNAPSHOT + 1.2.0.BUILD-SNAPSHOT + 1.3.0.BUILD-SNAPSHOT diff --git a/spring-cloud-starter-zookeeper-all/pom.xml b/spring-cloud-starter-zookeeper-all/pom.xml index c2f40ad3..cbfd2fed 100644 --- a/spring-cloud-starter-zookeeper-all/pom.xml +++ b/spring-cloud-starter-zookeeper-all/pom.xml @@ -5,7 +5,7 @@ org.springframework.cloud spring-cloud-zookeeper - 1.0.4.BUILD-SNAPSHOT + 1.1.0.BUILD-SNAPSHOT .. spring-cloud-starter-zookeeper-all diff --git a/spring-cloud-starter-zookeeper-config/pom.xml b/spring-cloud-starter-zookeeper-config/pom.xml index 44841845..47c8c36e 100644 --- a/spring-cloud-starter-zookeeper-config/pom.xml +++ b/spring-cloud-starter-zookeeper-config/pom.xml @@ -5,7 +5,7 @@ org.springframework.cloud spring-cloud-zookeeper - 1.0.4.BUILD-SNAPSHOT + 1.1.0.BUILD-SNAPSHOT .. spring-cloud-starter-zookeeper-config diff --git a/spring-cloud-starter-zookeeper-discovery/pom.xml b/spring-cloud-starter-zookeeper-discovery/pom.xml index dedc3007..1d3d9258 100644 --- a/spring-cloud-starter-zookeeper-discovery/pom.xml +++ b/spring-cloud-starter-zookeeper-discovery/pom.xml @@ -6,7 +6,7 @@ org.springframework.cloud spring-cloud-zookeeper - 1.0.4.BUILD-SNAPSHOT + 1.1.0.BUILD-SNAPSHOT .. spring-cloud-starter-zookeeper-discovery diff --git a/spring-cloud-starter-zookeeper/pom.xml b/spring-cloud-starter-zookeeper/pom.xml index 5416def2..f3140da8 100644 --- a/spring-cloud-starter-zookeeper/pom.xml +++ b/spring-cloud-starter-zookeeper/pom.xml @@ -5,7 +5,7 @@ org.springframework.cloud spring-cloud-zookeeper - 1.0.4.BUILD-SNAPSHOT + 1.1.0.BUILD-SNAPSHOT .. spring-cloud-starter-zookeeper diff --git a/spring-cloud-zookeeper-config/pom.xml b/spring-cloud-zookeeper-config/pom.xml index af4a9d03..11c5544d 100644 --- a/spring-cloud-zookeeper-config/pom.xml +++ b/spring-cloud-zookeeper-config/pom.xml @@ -12,7 +12,7 @@ org.springframework.cloud spring-cloud-zookeeper - 1.0.4.BUILD-SNAPSHOT + 1.1.0.BUILD-SNAPSHOT .. diff --git a/spring-cloud-zookeeper-core/pom.xml b/spring-cloud-zookeeper-core/pom.xml index 05bb7d9b..e08e63ca 100644 --- a/spring-cloud-zookeeper-core/pom.xml +++ b/spring-cloud-zookeeper-core/pom.xml @@ -12,7 +12,7 @@ org.springframework.cloud spring-cloud-zookeeper - 1.0.4.BUILD-SNAPSHOT + 1.1.0.BUILD-SNAPSHOT .. diff --git a/spring-cloud-zookeeper-dependencies/pom.xml b/spring-cloud-zookeeper-dependencies/pom.xml index 578a124c..46baa77f 100644 --- a/spring-cloud-zookeeper-dependencies/pom.xml +++ b/spring-cloud-zookeeper-dependencies/pom.xml @@ -5,11 +5,11 @@ spring-cloud-dependencies-parent org.springframework.cloud - 1.2.2.BUILD-SNAPSHOT + 1.3.0.BUILD-SNAPSHOT spring-cloud-zookeeper-dependencies - 1.0.4.BUILD-SNAPSHOT + 1.1.0.BUILD-SNAPSHOT pom spring-cloud-zookeeper-dependencies Spring Cloud Zookeeper Dependencies diff --git a/spring-cloud-zookeeper-discovery/pom.xml b/spring-cloud-zookeeper-discovery/pom.xml index b88a69ea..61c23d33 100644 --- a/spring-cloud-zookeeper-discovery/pom.xml +++ b/spring-cloud-zookeeper-discovery/pom.xml @@ -12,7 +12,7 @@ org.springframework.cloud spring-cloud-zookeeper - 1.0.4.BUILD-SNAPSHOT + 1.1.0.BUILD-SNAPSHOT .. @@ -94,7 +94,7 @@ true - com.netflix.feign + io.github.openfeign feign-core true diff --git a/spring-cloud-zookeeper-discovery/src/test/java/org/springframework/cloud/zookeeper/discovery/ZookeeperDiscoveryHealthIndicatorWithNestedStructureTests.java b/spring-cloud-zookeeper-discovery/src/test/java/org/springframework/cloud/zookeeper/discovery/ZookeeperDiscoveryHealthIndicatorWithNestedStructureTests.java index 6c74562e..9a5aef2f 100644 --- a/spring-cloud-zookeeper-discovery/src/test/java/org/springframework/cloud/zookeeper/discovery/ZookeeperDiscoveryHealthIndicatorWithNestedStructureTests.java +++ b/spring-cloud-zookeeper-discovery/src/test/java/org/springframework/cloud/zookeeper/discovery/ZookeeperDiscoveryHealthIndicatorWithNestedStructureTests.java @@ -1,5 +1,7 @@ package org.springframework.cloud.zookeeper.discovery; +import java.lang.invoke.MethodHandles; + import javax.annotation.PostConstruct; import javax.annotation.PreDestroy; @@ -11,8 +13,7 @@ import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.autoconfigure.EnableAutoConfiguration; -import org.springframework.boot.test.SpringApplicationConfiguration; -import org.springframework.boot.test.WebIntegrationTest; +import org.springframework.boot.test.context.SpringBootTest; import org.springframework.cloud.client.discovery.EnableDiscoveryClient; import org.springframework.cloud.client.loadbalancer.LoadBalanced; import org.springframework.cloud.zookeeper.discovery.test.CommonTestConfig; @@ -22,20 +23,18 @@ import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; import org.springframework.context.annotation.Profile; import org.springframework.test.context.ActiveProfiles; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import org.springframework.web.client.RestTemplate; -import java.lang.invoke.MethodHandles; - -import static com.toomuchcoding.jsonassert.JsonAssertion.*; +import static com.toomuchcoding.jsonassert.JsonAssertion.assertThat; /** * @author Marcin Grzejszczak */ -@RunWith(SpringJUnit4ClassRunner.class) -@SpringApplicationConfiguration(classes = ZookeeperDiscoveryHealthIndicatorWithNestedStructureTests.Config.class) +@RunWith(SpringRunner.class) +@SpringBootTest(classes = ZookeeperDiscoveryHealthIndicatorWithNestedStructureTests.Config.class, + webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) @ActiveProfiles("nestedstructure") -@WebIntegrationTest(randomPort = true) public class ZookeeperDiscoveryHealthIndicatorWithNestedStructureTests { private static final Log log = LogFactory.getLog(MethodHandles.lookup().lookupClass()); diff --git a/spring-cloud-zookeeper-discovery/src/test/java/org/springframework/cloud/zookeeper/discovery/ZookeeperDiscoveryTests.java b/spring-cloud-zookeeper-discovery/src/test/java/org/springframework/cloud/zookeeper/discovery/ZookeeperDiscoveryTests.java index 2291366d..800af15b 100644 --- a/spring-cloud-zookeeper-discovery/src/test/java/org/springframework/cloud/zookeeper/discovery/ZookeeperDiscoveryTests.java +++ b/spring-cloud-zookeeper-discovery/src/test/java/org/springframework/cloud/zookeeper/discovery/ZookeeperDiscoveryTests.java @@ -3,16 +3,12 @@ package org.springframework.cloud.zookeeper.discovery; import java.util.List; import java.util.concurrent.Callable; -import com.jayway.awaitility.Awaitility; -import com.toomuchcoding.jsonassert.JsonPath; - import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.autoconfigure.EnableAutoConfiguration; -import org.springframework.boot.test.SpringApplicationConfiguration; -import org.springframework.boot.test.WebIntegrationTest; +import org.springframework.boot.test.context.SpringBootTest; import org.springframework.cloud.client.ServiceInstance; import org.springframework.cloud.client.discovery.DiscoveryClient; import org.springframework.cloud.client.discovery.EnableDiscoveryClient; @@ -27,20 +23,24 @@ import org.springframework.context.annotation.Import; import org.springframework.context.annotation.Profile; import org.springframework.stereotype.Controller; import org.springframework.test.context.ActiveProfiles; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.client.RestTemplate; +import com.jayway.awaitility.Awaitility; +import com.toomuchcoding.jsonassert.JsonPath; + import static org.assertj.core.api.BDDAssertions.then; /** * @author Marcin Grzejszczak */ -@RunWith(SpringJUnit4ClassRunner.class) -@SpringApplicationConfiguration(ZookeeperDiscoveryTests.Config.class) +@RunWith(SpringRunner.class) +@SpringBootTest(classes = ZookeeperDiscoveryTests.Config.class, + properties = "feign.hystrix.enabled=false", + webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) @ActiveProfiles("ribbon") -@WebIntegrationTest(randomPort = true) public class ZookeeperDiscoveryTests { @Autowired TestRibbonClient testRibbonClient; diff --git a/spring-cloud-zookeeper-discovery/src/test/java/org/springframework/cloud/zookeeper/discovery/ZookeeperLifecycleRegistrationDisabledTests.java b/spring-cloud-zookeeper-discovery/src/test/java/org/springframework/cloud/zookeeper/discovery/ZookeeperLifecycleRegistrationDisabledTests.java index 8304d256..092fdeb4 100644 --- a/spring-cloud-zookeeper-discovery/src/test/java/org/springframework/cloud/zookeeper/discovery/ZookeeperLifecycleRegistrationDisabledTests.java +++ b/spring-cloud-zookeeper-discovery/src/test/java/org/springframework/cloud/zookeeper/discovery/ZookeeperLifecycleRegistrationDisabledTests.java @@ -22,24 +22,25 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.autoconfigure.EnableAutoConfiguration; -import org.springframework.boot.test.SpringApplicationConfiguration; -import org.springframework.boot.test.WebIntegrationTest; +import org.springframework.boot.test.context.SpringBootTest; import org.springframework.cloud.client.ServiceInstance; import org.springframework.cloud.zookeeper.ZookeeperAutoConfiguration; import org.springframework.cloud.zookeeper.discovery.test.CommonTestConfig; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import static org.junit.Assert.assertTrue; +import static org.springframework.boot.test.context.SpringBootTest.WebEnvironment.RANDOM_PORT; /** * @author Spencer Gibb */ -@RunWith(SpringJUnit4ClassRunner.class) -@SpringApplicationConfiguration(classes = ZookeeperLifecycleRegistrationDisabledTests.TestPropsConfig.class) -@WebIntegrationTest(value = { "spring.application.name=myTestNotRegisteredService", - "spring.cloud.zookeeper.discovery.register=false", "spring.cloud.zookeeper.dependency.enabled=false"}, randomPort = true) +@RunWith(SpringRunner.class) +@SpringBootTest(classes = ZookeeperLifecycleRegistrationDisabledTests.TestPropsConfig.class, + properties = { "spring.application.name=myTestNotRegisteredService", + "spring.cloud.zookeeper.discovery.register=false", "spring.cloud.zookeeper.dependency.enabled=false"}, + webEnvironment = RANDOM_PORT) public class ZookeeperLifecycleRegistrationDisabledTests { @@ -60,4 +61,4 @@ public class ZookeeperLifecycleRegistrationDisabledTests { } -} \ No newline at end of file +} diff --git a/spring-cloud-zookeeper-discovery/src/test/java/org/springframework/cloud/zookeeper/discovery/dependency/StickyRuleTests.java b/spring-cloud-zookeeper-discovery/src/test/java/org/springframework/cloud/zookeeper/discovery/dependency/StickyRuleTests.java index 13f4b4ea..bd9d3bca 100644 --- a/spring-cloud-zookeeper-discovery/src/test/java/org/springframework/cloud/zookeeper/discovery/dependency/StickyRuleTests.java +++ b/spring-cloud-zookeeper-discovery/src/test/java/org/springframework/cloud/zookeeper/discovery/dependency/StickyRuleTests.java @@ -4,18 +4,13 @@ import java.net.URI; import java.util.List; import java.util.concurrent.Callable; -import com.jayway.awaitility.Awaitility; -import com.netflix.loadbalancer.IPing; -import com.netflix.loadbalancer.NoOpPing; - import org.apache.curator.framework.CuratorFramework; import org.apache.curator.test.TestingServer; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.autoconfigure.EnableAutoConfiguration; -import org.springframework.boot.test.SpringApplicationConfiguration; -import org.springframework.boot.test.WebIntegrationTest; +import org.springframework.boot.test.context.SpringBootTest; import org.springframework.cloud.client.ServiceInstance; import org.springframework.cloud.client.discovery.DiscoveryClient; import org.springframework.cloud.client.discovery.EnableDiscoveryClient; @@ -27,17 +22,21 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Profile; import org.springframework.test.context.ActiveProfiles; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import org.springframework.util.SocketUtils; import org.springframework.web.client.RestTemplate; +import com.jayway.awaitility.Awaitility; +import com.netflix.loadbalancer.IPing; +import com.netflix.loadbalancer.NoOpPing; + /** * @author Marcin Grzejszczak */ -@RunWith(SpringJUnit4ClassRunner.class) -@SpringApplicationConfiguration(classes = StickyRuleTests.Config.class) +@RunWith(SpringRunner.class) +@SpringBootTest(classes = StickyRuleTests.Config.class, + webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) @ActiveProfiles("loadbalancerclient") -@WebIntegrationTest(randomPort = true) public class StickyRuleTests { @Autowired LoadBalancerClient loadBalancerClient; diff --git a/spring-cloud-zookeeper-discovery/src/test/java/org/springframework/cloud/zookeeper/discovery/dependency/ZookeeperDiscoveryWithDependenciesIntegrationTests.java b/spring-cloud-zookeeper-discovery/src/test/java/org/springframework/cloud/zookeeper/discovery/dependency/ZookeeperDiscoveryWithDependenciesIntegrationTests.java index db96f77d..e7898e8a 100644 --- a/spring-cloud-zookeeper-discovery/src/test/java/org/springframework/cloud/zookeeper/discovery/dependency/ZookeeperDiscoveryWithDependenciesIntegrationTests.java +++ b/spring-cloud-zookeeper-discovery/src/test/java/org/springframework/cloud/zookeeper/discovery/dependency/ZookeeperDiscoveryWithDependenciesIntegrationTests.java @@ -7,8 +7,7 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.autoconfigure.EnableAutoConfiguration; -import org.springframework.boot.test.SpringApplicationConfiguration; -import org.springframework.boot.test.WebIntegrationTest; +import org.springframework.boot.test.context.SpringBootTest; import org.springframework.cloud.client.ServiceInstance; import org.springframework.cloud.client.discovery.DiscoveryClient; import org.springframework.cloud.zookeeper.discovery.test.TestRibbonClient; @@ -16,7 +15,7 @@ import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; import org.springframework.context.annotation.Profile; import org.springframework.test.context.ActiveProfiles; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import static com.jayway.awaitility.Awaitility.await; import static org.assertj.core.api.BDDAssertions.then; @@ -24,10 +23,11 @@ import static org.assertj.core.api.BDDAssertions.then; /** * @author Marcin Grzejszczak */ -@RunWith(SpringJUnit4ClassRunner.class) -@SpringApplicationConfiguration(classes = ZookeeperDiscoveryWithDependenciesIntegrationTests.Config.class) +@RunWith(SpringRunner.class) +@SpringBootTest(classes = ZookeeperDiscoveryWithDependenciesIntegrationTests.Config.class, + properties = "feign.hystrix.enabled=false", + webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) @ActiveProfiles("dependencies") -@WebIntegrationTest(randomPort = true) public class ZookeeperDiscoveryWithDependenciesIntegrationTests { @Autowired TestRibbonClient testRibbonClient; diff --git a/spring-cloud-zookeeper-discovery/src/test/java/org/springframework/cloud/zookeeper/discovery/watcher/DefaultDependencyWatcherSpringTests.java b/spring-cloud-zookeeper-discovery/src/test/java/org/springframework/cloud/zookeeper/discovery/watcher/DefaultDependencyWatcherSpringTests.java index ef06b076..7486c0c0 100644 --- a/spring-cloud-zookeeper-discovery/src/test/java/org/springframework/cloud/zookeeper/discovery/watcher/DefaultDependencyWatcherSpringTests.java +++ b/spring-cloud-zookeeper-discovery/src/test/java/org/springframework/cloud/zookeeper/discovery/watcher/DefaultDependencyWatcherSpringTests.java @@ -2,8 +2,6 @@ package org.springframework.cloud.zookeeper.discovery.watcher; import java.util.concurrent.Callable; -import com.jayway.awaitility.Awaitility; - import org.apache.curator.framework.CuratorFramework; import org.apache.curator.framework.CuratorFrameworkFactory; import org.apache.curator.retry.ExponentialBackoffRetry; @@ -13,7 +11,7 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.autoconfigure.EnableAutoConfiguration; -import org.springframework.boot.test.SpringApplicationConfiguration; +import org.springframework.boot.test.context.SpringBootTest; import org.springframework.cloud.client.loadbalancer.LoadBalanced; import org.springframework.cloud.zookeeper.discovery.CustomZookeeperServiceDiscovery; import org.springframework.cloud.zookeeper.discovery.ZookeeperServiceDiscovery; @@ -24,17 +22,19 @@ import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Profile; import org.springframework.context.support.PropertySourcesPlaceholderConfigurer; import org.springframework.test.context.ActiveProfiles; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import org.springframework.util.SocketUtils; import org.springframework.web.client.RestTemplate; +import com.jayway.awaitility.Awaitility; + import static org.assertj.core.api.BDDAssertions.then; /** * @author Marcin Grzejszczak */ -@RunWith(SpringJUnit4ClassRunner.class) -@SpringApplicationConfiguration(classes = DefaultDependencyWatcherSpringTests.Config.class) +@RunWith(SpringRunner.class) +@SpringBootTest(classes = DefaultDependencyWatcherSpringTests.Config.class) @ActiveProfiles("watcher") public class DefaultDependencyWatcherSpringTests { diff --git a/spring-cloud-zookeeper-discovery/src/test/resources/application-dependencies.yml b/spring-cloud-zookeeper-discovery/src/test/resources/application-dependencies.yml index 3419b1bd..0d7a0f8d 100644 --- a/spring-cloud-zookeeper-discovery/src/test/resources/application-dependencies.yml +++ b/spring-cloud-zookeeper-discovery/src/test/resources/application-dependencies.yml @@ -21,3 +21,6 @@ spring.cloud.zookeeper: required: false aliasIsPath: '' anotherAlias: 'myPath' +management: + security: + enabled: false diff --git a/spring-cloud-zookeeper-discovery/src/test/resources/application-ribbon.yml b/spring-cloud-zookeeper-discovery/src/test/resources/application-ribbon.yml index f9297832..cee42c71 100644 --- a/spring-cloud-zookeeper-discovery/src/test/resources/application-ribbon.yml +++ b/spring-cloud-zookeeper-discovery/src/test/resources/application-ribbon.yml @@ -5,4 +5,7 @@ spring: zookeeper: discovery: metadata: - testMetadataKey: testMetadataValue \ No newline at end of file + testMetadataKey: testMetadataValue +management: + security: + enabled: false diff --git a/spring-cloud-zookeeper-sample/pom.xml b/spring-cloud-zookeeper-sample/pom.xml index 73331c47..8625935c 100644 --- a/spring-cloud-zookeeper-sample/pom.xml +++ b/spring-cloud-zookeeper-sample/pom.xml @@ -11,7 +11,7 @@ org.springframework.cloud spring-cloud-zookeeper - 1.0.4.BUILD-SNAPSHOT + 1.1.0.BUILD-SNAPSHOT ..