Skip to content

Commit

Permalink
use UE
Browse files Browse the repository at this point in the history
  • Loading branch information
Hellblazer committed Jun 6, 2024
1 parent 61dd978 commit 9142456
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@ private void initialize() {
AtomicBoolean frist = new AtomicBoolean(true);
final var prefix = UUID.randomUUID().toString();
final var gatewayPrefix = UUID.randomUUID().toString();
var executor = UnsafeExecutors.newVirtualThreadPerTaskExecutor();
views = members.values().stream().map(node -> {
DynamicContext<Participant> context = ctxBuilder.build();
FireflyMetricsImpl metrics = new FireflyMetricsImpl(context.getId(),
Expand All @@ -282,14 +283,15 @@ private void initialize() {
.setMetrics(
new ServerConnectionCacheMetricsImpl(
frist.getAndSet(false) ? node0Registry
: registry)));
: registry)),
executor);
var gateway = new LocalServer(gatewayPrefix, node).router(ServerConnectionCache.newBuilder()
.setTarget(200)
.setMetrics(
new ServerConnectionCacheMetricsImpl(
frist.getAndSet(false)
? node0Registry
: registry)));
? node0Registry : registry)),
executor);
comms.start();
communications.add(comms);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ public void smoke() throws Exception {
var frist = new AtomicBoolean(true);

var clientContextSupplier = clientContextSupplier();
var executor = UnsafeExecutors.newVirtualThreadPerTaskExecutor();
views = members.stream().map(node -> {
DynamicContext<Participant> context = ctxBuilder.build();
FireflyMetricsImpl metrics = new FireflyMetricsImpl(context.getId(),
Expand All @@ -127,7 +128,7 @@ public void smoke() throws Exception {
builder.setMetrics(new ServerConnectionCacheMetricsImpl(frist.getAndSet(false) ? node0Registry : registry));
CertificateWithPrivateKey certWithKey = certs.get(node.getId());
Router comms = new MtlsServer(node, ep, clientContextSupplier, serverContextSupplier(certWithKey)).router(
builder);
builder, executor);
communications.add(comms);
return new View(context, node, endpoints.get(node.getId()), EventValidation.NONE, Verifiers.NONE, comms,
parameters, DigestAlgorithm.DEFAULT, metrics);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,19 +230,21 @@ private void initialize() {
DynamicContext<Participant> context = ctxBuilder.build();
FireflyMetricsImpl metrics = new FireflyMetricsImpl(context.getId(),
frist.getAndSet(false) ? node0Registry : registry);
var executor = UnsafeExecutors.newVirtualThreadPerTaskExecutor();
var comms = new LocalServer(prefix, node).router(ServerConnectionCache.newBuilder()
.setTarget(200)
.setMetrics(
new ServerConnectionCacheMetricsImpl(
frist.getAndSet(false) ? node0Registry
: registry)));
: registry)),
executor);
var gateway = new LocalServer(gatewayPrefix, node).router(ServerConnectionCache.newBuilder()
.setTarget(200)
.setMetrics(
new ServerConnectionCacheMetricsImpl(
frist.getAndSet(false)
? node0Registry
: registry)));
? node0Registry : registry)),
executor);
comms.start();
communications.add(comms);

Expand Down

0 comments on commit 9142456

Please sign in to comment.