Update SNAPSHOT to 1.1.0.M1
This commit is contained in:
@@ -36,9 +36,9 @@ See the https://consul.io/intro/index.html[intro] for more information.
|
||||
1. Run `docker-compose up`
|
||||
2. Verify consul is running by visiting http://localhost:8500
|
||||
3. Run `mvn package` this will bring in the required spring cloud maven repositories and build
|
||||
4. Run `java -jar spring-cloud-consul-sample/target/spring-cloud-consul-sample-1.0.3.BUILD-SNAPSHOT.jar`
|
||||
4. Run `java -jar spring-cloud-consul-sample/target/spring-cloud-consul-sample-1.2.0.RELEASE.jar`
|
||||
5. visit http://localhost:8080, verify that `{"serviceId":"<yourhost>:8080","host":"<yourhost>","port":8080}` results
|
||||
6. run `java -jar spring-cloud-consul-sample/target/spring-cloud-consul-sample-1.0.3.BUILD-SNAPSHOT.jar --server.port=8081`
|
||||
6. run `java -jar spring-cloud-consul-sample/target/spring-cloud-consul-sample-1.2.0.RELEASE.jar --server.port=8081`
|
||||
7. visit http://localhost:8080 again, verify that `{"serviceId":"<yourhost>:8081","host":"<yourhost>","port":8081}` eventually shows up in the results in a round robbin fashion (may take a minute or so).
|
||||
|
||||
== Building
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-consul</artifactId>
|
||||
<version>1.1.0.BUILD-SNAPSHOT</version>
|
||||
<version>1.1.0.M1</version>
|
||||
</parent>
|
||||
<artifactId>spring-cloud-consul-docs</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
@@ -27,9 +27,9 @@ See the https://consul.io/intro/index.html[intro] for more information.
|
||||
1. Run `docker-compose up`
|
||||
2. Verify consul is running by visiting http://localhost:8500
|
||||
3. Run `mvn package` this will bring in the required spring cloud maven repositories and build
|
||||
4. Run `java -jar spring-cloud-consul-sample/target/spring-cloud-consul-sample-1.0.3.BUILD-SNAPSHOT.jar`
|
||||
4. Run `java -jar spring-cloud-consul-sample/target/spring-cloud-consul-sample-1.2.0.RELEASE.jar`
|
||||
5. visit http://localhost:8080, verify that `{"serviceId":"<yourhost>:8080","host":"<yourhost>","port":8080}` results
|
||||
6. run `java -jar spring-cloud-consul-sample/target/spring-cloud-consul-sample-1.0.3.BUILD-SNAPSHOT.jar --server.port=8081`
|
||||
6. run `java -jar spring-cloud-consul-sample/target/spring-cloud-consul-sample-1.2.0.RELEASE.jar --server.port=8081`
|
||||
7. visit http://localhost:8080 again, verify that `{"serviceId":"<yourhost>:8081","host":"<yourhost>","port":8081}` eventually shows up in the results in a round robbin fashion (may take a minute or so).
|
||||
|
||||
== Building
|
||||
|
||||
4
pom.xml
4
pom.xml
@@ -6,7 +6,7 @@
|
||||
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-consul</artifactId>
|
||||
<version>1.1.0.BUILD-SNAPSHOT</version>
|
||||
<version>1.1.0.M1</version>
|
||||
<packaging>pom</packaging>
|
||||
<name>Spring Cloud Consul</name>
|
||||
<description>Spring Cloud Consul</description>
|
||||
@@ -14,7 +14,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-build</artifactId>
|
||||
<version>1.2.0.BUILD-SNAPSHOT</version>
|
||||
<version>1.2.0.RELEASE</version>
|
||||
<relativePath/>
|
||||
<!-- lookup parent from repository -->
|
||||
</parent>
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-consul</artifactId>
|
||||
<version>1.1.0.BUILD-SNAPSHOT</version>
|
||||
<version>1.1.0.M1</version>
|
||||
<relativePath>..</relativePath>
|
||||
</parent>
|
||||
|
||||
|
||||
@@ -90,7 +90,7 @@ public class ConsulBinderTests {
|
||||
*/
|
||||
@Test
|
||||
public void testMessageSendReceive() throws Exception {
|
||||
testMessageSendReceive(null, false);
|
||||
testMessageSendReceive(null);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -120,21 +120,17 @@ public class ConsulBinderTests {
|
||||
* @param partitioned if true, execute test with a partition selector
|
||||
* @throws Exception
|
||||
*/
|
||||
private void testMessageSendReceive(String[] groups, boolean partitioned) throws Exception {
|
||||
private void testMessageSendReceive(String[] groups) throws Exception {
|
||||
Set<AppId> consumers = null;
|
||||
AppId producer = null;
|
||||
|
||||
try {
|
||||
consumers = launchConsumers(groups);
|
||||
producer = launchProducer(partitioned);
|
||||
producer = launchProducer();
|
||||
|
||||
for (AppId consumer : consumers) {
|
||||
assertEquals(MESSAGE_PAYLOAD, waitForMessage(consumer.port));
|
||||
}
|
||||
|
||||
if (partitioned) {
|
||||
assertTrue(partitionSelectorUsed(producer.port));
|
||||
}
|
||||
}
|
||||
finally {
|
||||
if (producer != null) {
|
||||
@@ -182,16 +178,15 @@ public class ConsulBinderTests {
|
||||
/**
|
||||
* Launch a producer that publishes a test message.
|
||||
*
|
||||
* @param partitioned if true, configure producer to use a partition selector
|
||||
* @return {@link AppId} for producer
|
||||
*/
|
||||
private AppId launchProducer(boolean partitioned) {
|
||||
private AppId launchProducer() {
|
||||
int producerPort = SocketUtils.findAvailableTcpPort();
|
||||
Map<String, String> appProperties = new HashMap<>();
|
||||
appProperties.put("server.port", String.valueOf(producerPort));
|
||||
List<String> args = new ArrayList<>();
|
||||
args.add(String.format("--server.port=%d", producerPort));
|
||||
args.add(String.format("--partitioned=%b", partitioned));
|
||||
args.add(String.format("--partitioned=%b", false));
|
||||
args.add("--debug");
|
||||
|
||||
return new AppId(launchApplication(TestProducer.class, appProperties, args), producerPort);
|
||||
|
||||
@@ -60,10 +60,10 @@ public class TestProducer implements ApplicationRunner {
|
||||
|
||||
@Override
|
||||
public void run(ApplicationArguments args) throws Exception {
|
||||
if (args.containsOption("partitioned")
|
||||
/*if (args.containsOption("partitioned")
|
||||
&& Boolean.valueOf(args.getOptionValues("partitioned").get(0))) {
|
||||
binder.setPartitionSelector(stubPartitionSelectorStrategy());
|
||||
}
|
||||
}*/
|
||||
SubscribableChannel producerChannel = producerChannel();
|
||||
ProducerProperties properties = new ProducerProperties();
|
||||
properties.setPartitionKeyExpression(new SpelExpressionParser().parseExpression("payload"));
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-consul</artifactId>
|
||||
<version>1.1.0.BUILD-SNAPSHOT</version>
|
||||
<version>1.1.0.M1</version>
|
||||
<relativePath>..</relativePath>
|
||||
</parent>
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-consul</artifactId>
|
||||
<version>1.1.0.BUILD-SNAPSHOT</version>
|
||||
<version>1.1.0.M1</version>
|
||||
<relativePath>..</relativePath>
|
||||
</parent>
|
||||
|
||||
|
||||
@@ -5,20 +5,20 @@
|
||||
<parent>
|
||||
<artifactId>spring-cloud-dependencies-parent</artifactId>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<version>1.2.0.BUILD-SNAPSHOT</version>
|
||||
<version>1.2.0.RELEASE</version>
|
||||
<relativePath/>
|
||||
</parent>
|
||||
<artifactId>spring-cloud-consul-dependencies</artifactId>
|
||||
<version>1.1.0.BUILD-SNAPSHOT</version>
|
||||
<version>1.1.0.M1</version>
|
||||
<packaging>pom</packaging>
|
||||
<name>spring-cloud-consul-dependencies</name>
|
||||
<description>Spring Cloud Consul Dependencies</description>
|
||||
<properties>
|
||||
<spring-cloud-bus.version>1.1.1.BUILD-SNAPSHOT</spring-cloud-bus.version>
|
||||
<spring-cloud-commons.version>1.1.2.BUILD-SNAPSHOT</spring-cloud-commons.version>
|
||||
<spring-cloud-netflix.version>1.2.0.BUILD-SNAPSHOT</spring-cloud-netflix.version>
|
||||
<spring-cloud-deployer.version>1.0.0.BUILD-SNAPSHOT</spring-cloud-deployer.version>
|
||||
<spring-cloud-stream.version>1.0.3.BUILD-SNAPSHOT</spring-cloud-stream.version>
|
||||
<spring-cloud-bus.version>1.2.0.M1</spring-cloud-bus.version>
|
||||
<spring-cloud-commons.version>1.1.1.RELEASE</spring-cloud-commons.version>
|
||||
<spring-cloud-netflix.version>1.2.0.M1</spring-cloud-netflix.version>
|
||||
<spring-cloud-deployer.version>1.0.2.RELEASE</spring-cloud-deployer.version>
|
||||
<spring-cloud-stream.version>Brooklyn.M1</spring-cloud-stream.version>
|
||||
<consul-api.version>1.1.10</consul-api.version>
|
||||
<gson.version>2.3.1</gson.version>
|
||||
<httpclient.version>4.5</httpclient.version>
|
||||
@@ -109,6 +109,7 @@
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-deployer-local</artifactId>
|
||||
<version>${spring-cloud-deployer.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-consul</artifactId>
|
||||
<version>1.1.0.BUILD-SNAPSHOT</version>
|
||||
<version>1.1.0.M1</version>
|
||||
<relativePath>..</relativePath>
|
||||
</parent>
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-consul</artifactId>
|
||||
<version>1.1.0.BUILD-SNAPSHOT</version>
|
||||
<version>1.1.0.M1</version>
|
||||
<relativePath>..</relativePath>
|
||||
</parent>
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-consul</artifactId>
|
||||
<version>1.1.0.BUILD-SNAPSHOT</version>
|
||||
<version>1.1.0.M1</version>
|
||||
<relativePath>..</relativePath>
|
||||
</parent>
|
||||
<artifactId>spring-cloud-starter-consul-all</artifactId>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-consul</artifactId>
|
||||
<version>1.1.0.BUILD-SNAPSHOT</version>
|
||||
<version>1.1.0.M1</version>
|
||||
<relativePath>..</relativePath>
|
||||
</parent>
|
||||
<artifactId>spring-cloud-starter-consul-bus</artifactId>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-consul</artifactId>
|
||||
<version>1.1.0.BUILD-SNAPSHOT</version>
|
||||
<version>1.1.0.M1</version>
|
||||
<relativePath>..</relativePath>
|
||||
</parent>
|
||||
<artifactId>spring-cloud-starter-consul-config</artifactId>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-consul</artifactId>
|
||||
<version>1.1.0.BUILD-SNAPSHOT</version>
|
||||
<version>1.1.0.M1</version>
|
||||
<relativePath>..</relativePath>
|
||||
</parent>
|
||||
<artifactId>spring-cloud-starter-consul-discovery</artifactId>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-consul</artifactId>
|
||||
<version>1.1.0.BUILD-SNAPSHOT</version>
|
||||
<version>1.1.0.M1</version>
|
||||
<relativePath>..</relativePath>
|
||||
</parent>
|
||||
<artifactId>spring-cloud-starter-consul</artifactId>
|
||||
|
||||
Reference in New Issue
Block a user