Merge branch '2.2.x'
This commit is contained in:
@@ -58,6 +58,7 @@
|
||||
|spring.cloud.consul.discovery.server-list-query-tags | | Map of serviceId's -> tag to query for in server list. This allows filtering services by a single tag.
|
||||
|spring.cloud.consul.discovery.service-name | | Service name.
|
||||
|spring.cloud.consul.discovery.tags | | Tags to use when registering service.
|
||||
|spring.cloud.consul.discovery.tags-as-metadata | true | Use tags as metadata, defaults to true.
|
||||
|spring.cloud.consul.enabled | true | Is spring cloud consul enabled.
|
||||
|spring.cloud.consul.host | localhost | Consul agent hostname. Defaults to 'localhost'.
|
||||
|spring.cloud.consul.port | 8500 | Consul agent port. Defaults to '8500'.
|
||||
|
||||
@@ -16,6 +16,8 @@
|
||||
|
||||
package org.springframework.cloud.consul.binder;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import com.ecwid.consul.v1.ConsulClient;
|
||||
import com.ecwid.consul.v1.QueryParams;
|
||||
import com.ecwid.consul.v1.Response;
|
||||
@@ -48,12 +50,15 @@ public class ConsulSendingHandler extends AbstractMessageHandler {
|
||||
}
|
||||
|
||||
Object payload = message.getPayload();
|
||||
if (payload instanceof byte[]) {
|
||||
payload = Arrays.toString((byte[]) payload);
|
||||
}
|
||||
|
||||
// TODO: support headers
|
||||
// TODO: support consul event filters: NodeFilter, ServiceFilter, TagFilter
|
||||
Response<Event> event = this.consul.eventFire(this.eventName, (String) payload,
|
||||
new EventParams(), QueryParams.DEFAULT);
|
||||
// TODO: return event?
|
||||
// return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -21,7 +21,6 @@ import java.util.concurrent.TimeUnit;
|
||||
import com.ecwid.consul.v1.ConsulClient;
|
||||
import com.github.tomakehurst.wiremock.junit.WireMockRule;
|
||||
import org.junit.Before;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
@@ -78,14 +77,12 @@ public class ConsulBinderApplicationTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore // FIXME: 2.0.0 need stream fix
|
||||
public void shouldInitializeConsulSource() {
|
||||
|
||||
assertThat(this.events).isNotNull();
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore // FIXME: 2.0.0 need stream fix
|
||||
public void shouldPublishTextConsulMessage() {
|
||||
|
||||
// given
|
||||
|
||||
@@ -18,6 +18,7 @@ package org.springframework.cloud.consul.serviceregistry;
|
||||
|
||||
import com.ecwid.consul.ConsulException;
|
||||
import com.ecwid.consul.v1.ConsulClient;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.junit.rules.ExpectedException;
|
||||
@@ -43,6 +44,7 @@ public class ConsulAutoServiceRegistrationFailFastTests {
|
||||
@Rule
|
||||
public ExpectedException exception = ExpectedException.none();
|
||||
|
||||
@Ignore
|
||||
@Test
|
||||
public void testFailFastEnabled() {
|
||||
this.exception.expectCause(isA(ConsulException.class));
|
||||
|
||||
@@ -19,6 +19,7 @@ package org.springframework.cloud.consul.serviceregistry;
|
||||
import com.ecwid.consul.ConsulException;
|
||||
import com.ecwid.consul.v1.ConsulClient;
|
||||
import org.hamcrest.Matchers;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.junit.rules.ExpectedException;
|
||||
@@ -49,6 +50,7 @@ public class ConsulAutoServiceRegistrationRetryTests {
|
||||
@Rule
|
||||
public OutputCaptureRule output = new OutputCaptureRule();
|
||||
|
||||
@Ignore
|
||||
@Test
|
||||
public void testRetry() {
|
||||
this.exception.expectCause(isA(ConsulException.class));
|
||||
|
||||
Reference in New Issue
Block a user