Skip to content
This repository has been archived by the owner on Jun 21, 2023. It is now read-only.

Commit

Permalink
Update versions (#181)
Browse files Browse the repository at this point in the history
  • Loading branch information
segabriel authored Aug 19, 2021
1 parent 87c9ecc commit 553cf0a
Show file tree
Hide file tree
Showing 9 changed files with 78 additions and 16 deletions.
14 changes: 10 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,13 @@
</scm>

<properties>
<scalecube-services.version>2.10.18</scalecube-services.version>
<scalecube-services.version>2.10.20</scalecube-services.version>
<scalecube-commons.version>1.0.17</scalecube-commons.version>
<scalecube-cluster.version>2.6.10</scalecube-cluster.version>

<reactor.version>2020.0.6</reactor.version>
<rsocket.version>1.0.4</rsocket.version>
<netty.version>4.1.63.Final</netty.version>
<reactor.version>2020.0.10</reactor.version>
<rsocket.version>1.0.5</rsocket.version>
<netty.version>4.1.66.Final</netty.version>
<jackson.version>2.11.0</jackson.version>
<metrics.version>3.1.2</metrics.version>
<slf4j.version>1.7.30</slf4j.version>
Expand Down Expand Up @@ -116,6 +117,11 @@
<artifactId>scalecube-commons</artifactId>
<version>${scalecube-commons.version}</version>
</dependency>
<dependency>
<groupId>io.scalecube</groupId>
<artifactId>scalecube-transport-netty</artifactId>
<version>${scalecube-cluster.version}</version>
</dependency>

<!-- Reactor -->
<dependency>
Expand Down
4 changes: 4 additions & 0 deletions services-gateway-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@
<groupId>io.scalecube</groupId>
<artifactId>scalecube-services-transport-jackson</artifactId>
</dependency>
<dependency>
<groupId>io.scalecube</groupId>
<artifactId>scalecube-transport-netty</artifactId>
</dependency>

<dependency>
<groupId>org.slf4j</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import io.scalecube.services.gateway.transport.StaticAddressRouter;
import io.scalecube.services.transport.api.ClientTransport;
import io.scalecube.services.transport.rsocket.RSocketServiceTransport;
import io.scalecube.transport.netty.websocket.WebsocketTransportFactory;
import java.util.function.Function;
import org.junit.jupiter.api.extension.AfterAllCallback;
import org.junit.jupiter.api.extension.AfterEachCallback;
Expand Down Expand Up @@ -47,7 +48,12 @@ protected AbstractGatewayExtension(
public final void beforeAll(ExtensionContext context) {
gateway =
Microservices.builder()
.discovery("gateway", ScalecubeServiceDiscovery::new)
.discovery(
"gateway",
serviceEndpoint ->
new ScalecubeServiceDiscovery()
.transport(cfg -> cfg.transportFactory(new WebsocketTransportFactory()))
.options(opts -> opts.metadata(serviceEndpoint)))
.transport(RSocketServiceTransport::new)
.gateway(
options -> {
Expand Down Expand Up @@ -100,7 +106,9 @@ public void startServices() {
}

private ServiceDiscovery serviceDiscovery(ServiceEndpoint serviceEndpoint) {
return new ScalecubeServiceDiscovery(serviceEndpoint)
return new ScalecubeServiceDiscovery()
.transport(cfg -> cfg.transportFactory(new WebsocketTransportFactory()))
.options(opts -> opts.metadata(serviceEndpoint))
.membership(opts -> opts.seedMembers(gateway.discovery("gateway").address()));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import io.scalecube.services.examples.GreetingServiceImpl;
import io.scalecube.services.gateway.BaseTest;
import io.scalecube.services.transport.rsocket.RSocketServiceTransport;
import io.scalecube.transport.netty.websocket.WebsocketTransportFactory;
import java.time.Duration;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
Expand All @@ -32,7 +33,12 @@ public class CorsTest extends BaseTest {

private final Microservices.Builder gatewayBuilder =
Microservices.builder()
.discovery("gateway", ScalecubeServiceDiscovery::new)
.discovery(
"gateway",
serviceEndpoint ->
new ScalecubeServiceDiscovery()
.transport(cfg -> cfg.transportFactory(new WebsocketTransportFactory()))
.options(opts -> opts.metadata(serviceEndpoint)))
.transport(RSocketServiceTransport::new)
.services(new GreetingServiceImpl());
private HttpClient client;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import io.scalecube.services.gateway.transport.StaticAddressRouter;
import io.scalecube.services.gateway.transport.http.HttpGatewayClient;
import io.scalecube.services.transport.rsocket.RSocketServiceTransport;
import io.scalecube.transport.netty.websocket.WebsocketTransportFactory;
import java.io.IOException;
import java.time.Duration;
import java.util.concurrent.atomic.AtomicInteger;
Expand All @@ -42,7 +43,12 @@ class HttpClientConnectionTest extends BaseTest {
void beforEach() {
gateway =
Microservices.builder()
.discovery("gateway", ScalecubeServiceDiscovery::new)
.discovery(
"gateway",
serviceEndpoint ->
new ScalecubeServiceDiscovery()
.transport(cfg -> cfg.transportFactory(new WebsocketTransportFactory()))
.options(opts -> opts.metadata(serviceEndpoint)))
.transport(RSocketServiceTransport::new)
.gateway(options -> new HttpGateway(options.id("HTTP")))
.startAwait();
Expand All @@ -54,7 +60,9 @@ void beforEach() {
.discovery(
"service",
serviceEndpoint ->
new ScalecubeServiceDiscovery(serviceEndpoint)
new ScalecubeServiceDiscovery()
.transport(cfg -> cfg.transportFactory(new WebsocketTransportFactory()))
.options(opts -> opts.metadata(serviceEndpoint))
.membership(
opts -> opts.seedMembers(gateway.discovery("gateway").address())))
.transport(RSocketServiceTransport::new)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import io.scalecube.services.gateway.transport.StaticAddressRouter;
import io.scalecube.services.gateway.transport.rsocket.RSocketGatewayClient;
import io.scalecube.services.transport.rsocket.RSocketServiceTransport;
import io.scalecube.transport.netty.websocket.WebsocketTransportFactory;
import java.io.IOException;
import java.time.Duration;
import java.util.Collections;
Expand Down Expand Up @@ -51,7 +52,12 @@ void beforEach() {
sessionEventHandler = new TestGatewaySessionHandler();
gateway =
Microservices.builder()
.discovery("gateway", ScalecubeServiceDiscovery::new)
.discovery(
"gateway",
serviceEndpoint ->
new ScalecubeServiceDiscovery()
.transport(cfg -> cfg.transportFactory(new WebsocketTransportFactory()))
.options(opts -> opts.metadata(serviceEndpoint)))
.transport(RSocketServiceTransport::new)
.gateway(options -> new RSocketGateway(options.id("RS"), sessionEventHandler))
.startAwait();
Expand All @@ -63,7 +69,9 @@ void beforEach() {
.discovery(
"service",
serviceEndpoint ->
new ScalecubeServiceDiscovery(serviceEndpoint)
new ScalecubeServiceDiscovery()
.transport(cfg -> cfg.transportFactory(new WebsocketTransportFactory()))
.options(opts -> opts.metadata(serviceEndpoint))
.membership(
opts -> opts.seedMembers(gateway.discovery("gateway").address())))
.transport(RSocketServiceTransport::new)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import io.scalecube.services.gateway.transport.websocket.WebsocketGatewayClientSession;
import io.scalecube.services.gateway.ws.WebsocketGateway;
import io.scalecube.services.transport.rsocket.RSocketServiceTransport;
import io.scalecube.transport.netty.websocket.WebsocketTransportFactory;
import java.io.IOException;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
Expand Down Expand Up @@ -61,7 +62,12 @@ void beforEach() {
this.sessionEventHandler = new TestGatewaySessionHandler();
gateway =
Microservices.builder()
.discovery("gateway", ScalecubeServiceDiscovery::new)
.discovery(
"gateway",
serviceEndpoint ->
new ScalecubeServiceDiscovery()
.transport(cfg -> cfg.transportFactory(new WebsocketTransportFactory()))
.options(opts -> opts.metadata(serviceEndpoint)))
.transport(RSocketServiceTransport::new)
.gateway(options -> new WebsocketGateway(options.id("WS"), sessionEventHandler))
.startAwait();
Expand All @@ -73,7 +79,9 @@ void beforEach() {
.discovery(
"service",
serviceEndpoint ->
new ScalecubeServiceDiscovery(serviceEndpoint)
new ScalecubeServiceDiscovery()
.transport(cfg -> cfg.transportFactory(new WebsocketTransportFactory()))
.options(opts -> opts.metadata(serviceEndpoint))
.membership(
opts -> opts.seedMembers(gateway.discovery("gateway").address())))
.transport(RSocketServiceTransport::new)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import io.scalecube.services.gateway.transport.websocket.WebsocketGatewayClient;
import io.scalecube.services.gateway.ws.WebsocketGateway;
import io.scalecube.services.transport.rsocket.RSocketServiceTransport;
import io.scalecube.transport.netty.websocket.WebsocketTransportFactory;
import java.time.Duration;
import java.util.concurrent.ThreadLocalRandom;
import java.util.stream.Collectors;
Expand Down Expand Up @@ -45,7 +46,12 @@ class WebsocketClientTest extends BaseTest {
static void beforeAll() {
gateway =
Microservices.builder()
.discovery("gateway", ScalecubeServiceDiscovery::new)
.discovery(
"gateway",
serviceEndpoint ->
new ScalecubeServiceDiscovery()
.transport(cfg -> cfg.transportFactory(new WebsocketTransportFactory()))
.options(opts -> opts.metadata(serviceEndpoint)))
.transport(RSocketServiceTransport::new)
.gateway(
options -> new WebsocketGateway(options.id("WS"), new TestGatewaySessionHandler()))
Expand All @@ -57,7 +63,9 @@ static void beforeAll() {
.discovery(
"service",
serviceEndpoint ->
new ScalecubeServiceDiscovery(serviceEndpoint)
new ScalecubeServiceDiscovery()
.transport(cfg -> cfg.transportFactory(new WebsocketTransportFactory()))
.options(opts -> opts.metadata(serviceEndpoint))
.membership(
opts -> opts.seedMembers(gateway.discovery("gateway").address())))
.transport(RSocketServiceTransport::new)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import io.scalecube.services.gateway.transport.websocket.WebsocketGatewayClient;
import io.scalecube.services.gateway.ws.WebsocketGateway;
import io.scalecube.services.transport.rsocket.RSocketServiceTransport;
import io.scalecube.transport.netty.websocket.WebsocketTransportFactory;
import java.time.Duration;
import java.util.concurrent.ThreadLocalRandom;
import java.util.stream.Collectors;
Expand All @@ -44,7 +45,12 @@ class WebsocketServerTest extends BaseTest {
static void beforeAll() {
gateway =
Microservices.builder()
.discovery("gateway", ScalecubeServiceDiscovery::new)
.discovery(
"gateway",
serviceEndpoint ->
new ScalecubeServiceDiscovery()
.transport(cfg -> cfg.transportFactory(new WebsocketTransportFactory()))
.options(opts -> opts.metadata(serviceEndpoint)))
.transport(RSocketServiceTransport::new)
.gateway(
options -> new WebsocketGateway(options.id("WS"), new TestGatewaySessionHandler()))
Expand Down

0 comments on commit 553cf0a

Please sign in to comment.