Skip to content

Commit ebfa683

Browse files
committed
code format
1 parent dec138f commit ebfa683

41 files changed

Lines changed: 385 additions & 358 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/Servus.Akka.Tests/IO/Quic/QuicConnectionManagerActorSpec.cs

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -250,12 +250,18 @@ public async Task Multiple_hosts_should_be_independent()
250250
var options1 = new QuicOptions { Host = "host1.example.com", Port = 443 };
251251
var endpoint1 = new RequestEndpoint
252252
{
253-
Host = "host1.example.com", Port = 443, Scheme = "https", Version = HttpVersion.Version30
253+
Host = "host1.example.com",
254+
Port = 443,
255+
Scheme = "https",
256+
Version = HttpVersion.Version30
254257
};
255258
var options2 = new QuicOptions { Host = "host2.example.com", Port = 443 };
256259
var endpoint2 = new RequestEndpoint
257260
{
258-
Host = "host2.example.com", Port = 443, Scheme = "https", Version = HttpVersion.Version30
261+
Host = "host2.example.com",
262+
Port = 443,
263+
Scheme = "https",
264+
Version = HttpVersion.Version30
259265
};
260266

261267
var lease1 =
@@ -358,7 +364,10 @@ public async Task Release_unknown_lease_should_dispose()
358364
var handle = new QuicConnectionHandle(provider, new QuicOptions { Host = "orphan.local", Port = 443 },
359365
new RequestEndpoint
360366
{
361-
Host = "orphan.local", Port = 443, Scheme = "https", Version = HttpVersion.Version30
367+
Host = "orphan.local",
368+
Port = 443,
369+
Scheme = "https",
370+
Version = HttpVersion.Version30
362371
});
363372
var orphanLease = new QuicConnectionLease(handle);
364373
orphanLease.MarkBusy();
@@ -422,12 +431,18 @@ public async Task Multiple_hosts_should_maintain_separate_pools()
422431
var options1 = new QuicOptions { Host = "host1.example.com", Port = 443 };
423432
var endpoint1 = new RequestEndpoint
424433
{
425-
Host = "host1.example.com", Port = 443, Scheme = "https", Version = HttpVersion.Version30
434+
Host = "host1.example.com",
435+
Port = 443,
436+
Scheme = "https",
437+
Version = HttpVersion.Version30
426438
};
427439
var options2 = new QuicOptions { Host = "host2.example.com", Port = 443 };
428440
var endpoint2 = new RequestEndpoint
429441
{
430-
Host = "host2.example.com", Port = 443, Scheme = "https", Version = HttpVersion.Version30
442+
Host = "host2.example.com",
443+
Port = 443,
444+
Scheme = "https",
445+
Version = HttpVersion.Version30
431446
};
432447

433448
var lease1 =

src/Servus.Akka.Tests/IO/Quic/QuicStreamRouterEnhancedSpec.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ public void EnsureStreamContext_should_reject_null_scheme()
239239
{
240240
var (router, _) = CreateRouter();
241241
var endpoint = new RequestEndpoint
242-
{ Scheme = null!, Host = "localhost", Port = 443, Version = HttpVersion.Version30 };
242+
{ Scheme = null!, Host = "localhost", Port = 443, Version = HttpVersion.Version30 };
243243
var item = new ConnectItem(new QuicOptions { Host = "localhost", Port = 443 })
244244
{
245245
Key = endpoint

src/Servus.Akka.Tests/IO/Tcp/TcpConnectionManagerActorSpec.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,12 +267,18 @@ public async Task Multiple_hosts_should_maintain_separate_pools()
267267
var options1 = new TcpOptions { Host = "host1.example.com", Port = 80 };
268268
var endpoint1 = new RequestEndpoint
269269
{
270-
Host = "host1.example.com", Port = 80, Scheme = "http", Version = HttpVersion.Version11
270+
Host = "host1.example.com",
271+
Port = 80,
272+
Scheme = "http",
273+
Version = HttpVersion.Version11
271274
};
272275
var options2 = new TcpOptions { Host = "host2.example.com", Port = 80 };
273276
var endpoint2 = new RequestEndpoint
274277
{
275-
Host = "host2.example.com", Port = 80, Scheme = "http", Version = HttpVersion.Version11
278+
Host = "host2.example.com",
279+
Port = 80,
280+
Scheme = "http",
281+
Version = HttpVersion.Version11
276282
};
277283

278284
var lease1 =

src/Servus.Akka.Tests/IO/Tcp/TcpTransportStateMachineLifecycleSpec.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public void Dispatch_LeaseAcquired_during_reconnect_should_push_connected_signal
6060
var (sm, ops) = CreateStateMachine();
6161

6262
sm.HandlePush(new ConnectItem(new TcpOptions { Host = TestEndpoint.Host, Port = TestEndpoint.Port })
63-
{ Key = TestEndpoint, IsReconnect = true });
63+
{ Key = TestEndpoint, IsReconnect = true });
6464
ops.PushedOutputs.Clear();
6565

6666
var lease = CreateTestLease();
@@ -173,7 +173,7 @@ public void HandleConnectionReuseItem_canReuse_false_with_upstream_finished_shou
173173
Assert.Equal(0, ops.CompleteStageCount);
174174

175175
sm.HandlePush(new ConnectionReuseItem(false)
176-
{ Key = TestEndpoint });
176+
{ Key = TestEndpoint });
177177

178178
Assert.Equal(1, ops.CompleteStageCount);
179179
}
@@ -201,7 +201,7 @@ public void ConnectItem_with_IsReconnect_should_teardown_and_acquire()
201201
ops.PushedOutputs.Clear();
202202

203203
sm.HandlePush(new ConnectItem(new TcpOptions { Host = AltEndpoint.Host, Port = AltEndpoint.Port })
204-
{ Key = AltEndpoint, IsReconnect = true });
204+
{ Key = AltEndpoint, IsReconnect = true });
205205

206206
Assert.Contains(ops.ScheduledTimers, t => t.Key == "connect-timeout");
207207
Assert.False(lease1.IsAlive);

src/Servus.Akka.Tests/IO/Tcp/TcpTransportStateMachineSpec.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ public void HandlePush_ConnectionReuseItem_canReuse_false_should_teardown_and_pu
220220
var pullBefore = ops.PullInputCount;
221221

222222
sm.HandlePush(new ConnectionReuseItem(false)
223-
{ Key = TestEndpoint });
223+
{ Key = TestEndpoint });
224224

225225
Assert.True(ops.PullInputCount > pullBefore);
226226
}

src/Servus.Akka/IO/Tcp/TcpTransportStateMachine.cs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -240,25 +240,25 @@ public void OnTimer(string? timerKey)
240240
switch (timerKey)
241241
{
242242
case ConnectTimerKey:
243-
{
244-
if (_pendingConnect is null)
245243
{
246-
return;
247-
}
244+
if (_pendingConnect is null)
245+
{
246+
return;
247+
}
248248

249-
_ops.Log.Warning("TcpConnectionStage: Connection acquisition timed out for {0}:{1}",
250-
_pendingConnect.Value.Key.Host, _pendingConnect.Value.Key.Port);
249+
_ops.Log.Warning("TcpConnectionStage: Connection acquisition timed out for {0}:{1}",
250+
_pendingConnect.Value.Key.Host, _pendingConnect.Value.Key.Port);
251251

252-
_waitActivity?.Stop();
253-
_waitActivity = null;
252+
_waitActivity?.Stop();
253+
_waitActivity = null;
254254

255-
var signal = new CloseSignalItem(TlsCloseKind.AbruptClose) { Key = _pendingConnect.Value.Key };
256-
_pendingConnect = null;
255+
var signal = new CloseSignalItem(TlsCloseKind.AbruptClose) { Key = _pendingConnect.Value.Key };
256+
_pendingConnect = null;
257257

258-
_ops.OnPushOutput(signal);
259-
_ops.OnSignalPullInput();
260-
break;
261-
}
258+
_ops.OnPushOutput(signal);
259+
_ops.OnSignalPullInput();
260+
break;
261+
}
262262
}
263263
}
264264

src/TurboHTTP.StreamTests/Http11/Http11ConnectionStageReconnectSpec.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ private static NetworkBuffer MakeResponseBuffer(string raw)
3030
public async Task Http11ConnectionStage_should_reconnect_and_replay_request_on_connection_drop()
3131
{
3232
var stage = new Http11ConnectionStage(new TurboClientOptions
33-
{ Http1 = { MaxPipelineDepth = 1, MaxReconnectAttempts = 1 } });
33+
{ Http1 = { MaxPipelineDepth = 1, MaxReconnectAttempts = 1 } });
3434

3535
var appProbe = this.CreateManualPublisherProbe<HttpRequestMessage>();
3636
var serverProbe = this.CreateManualPublisherProbe<IInputItem>();
@@ -95,7 +95,7 @@ public async Task Http11ConnectionStage_should_reconnect_and_replay_request_on_c
9595
public async Task Http11ConnectionStage_should_complete_stage_when_max_reconnect_attempts_exceeded()
9696
{
9797
var stage = new Http11ConnectionStage(new TurboClientOptions
98-
{ Http1 = { MaxPipelineDepth = 1, MaxReconnectAttempts = 1 } });
98+
{ Http1 = { MaxPipelineDepth = 1, MaxReconnectAttempts = 1 } });
9999

100100
var appProbe = this.CreateManualPublisherProbe<HttpRequestMessage>();
101101
var serverProbe = this.CreateManualPublisherProbe<IInputItem>();
@@ -143,7 +143,7 @@ public async Task Http11ConnectionStage_should_complete_stage_when_max_reconnect
143143
public async Task Http11ConnectionStage_should_not_reconnect_when_no_inflight_request_on_close()
144144
{
145145
var stage = new Http11ConnectionStage(new TurboClientOptions
146-
{ Http1 = { MaxPipelineDepth = 1, MaxReconnectAttempts = 1 } });
146+
{ Http1 = { MaxPipelineDepth = 1, MaxReconnectAttempts = 1 } });
147147

148148
var appProbe = this.CreateManualPublisherProbe<HttpRequestMessage>();
149149
var serverProbe = this.CreateManualPublisherProbe<IInputItem>();

src/TurboHTTP.StreamTests/Http2/Http20ConnectionStageSpec.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ private static NetworkBuffer MakeResponseBuffer(string raw)
3232
public async Task Http20ConnectionStage_should_emit_preface_on_first_network_pull()
3333
{
3434
var stage = new Http20ConnectionStage(new TurboClientOptions
35-
{ Http2 = { MaxReconnectAttempts = 3 } });
35+
{ Http2 = { MaxReconnectAttempts = 3 } });
3636

3737
var appProbe = this.CreateManualPublisherProbe<HttpRequestMessage>();
3838
var serverProbe = this.CreateManualPublisherProbe<IInputItem>();
@@ -76,7 +76,7 @@ public async Task Http20ConnectionStage_should_emit_preface_on_first_network_pul
7676
public async Task Http20ConnectionStage_should_encode_request_as_headers_frame()
7777
{
7878
var stage = new Http20ConnectionStage(new TurboClientOptions
79-
{ Http2 = { MaxReconnectAttempts = 3 } });
79+
{ Http2 = { MaxReconnectAttempts = 3 } });
8080

8181
var appProbe = this.CreateManualPublisherProbe<HttpRequestMessage>();
8282
var serverProbe = this.CreateManualPublisherProbe<IInputItem>();

src/TurboHTTP.StreamTests/Http2/Http2ConnectionBackpressureSpec.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public sealed class Http2ConnectionBackpressureSpec : StreamTestBase
2828
(b, reqSrc) =>
2929
{
3030
var stage = b.Add(new Http20ConnectionStage(new TurboClientOptions
31-
{ Http2 = { MaxConcurrentStreams = maxConcurrentStreams } }));
31+
{ Http2 = { MaxConcurrentStreams = maxConcurrentStreams } }));
3232
var srvSrc = b.Add(Source.FromPublisher(serverProbe));
3333

3434
b.From(srvSrc).To(stage.InServer);

src/TurboHTTP.StreamTests/Http2/Http2ConnectionFlowControlBatchingSpec.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public sealed class Http2ConnectionFlowControlBatchingSpec : StreamTestBase
2525
(b, dsSink, nwSink) =>
2626
{
2727
var stage = b.Add(new Http20ConnectionStage(new TurboClientOptions()
28-
{ Http2 = { InitialConnectionWindowSize = initialWindowSize } }));
28+
{ Http2 = { InitialConnectionWindowSize = initialWindowSize } }));
2929
var serverSource = b.Add(Source.From(FramesToInputs(serverFrames)));
3030
var requestSource = b.Add(Source.Never<HttpRequestMessage>());
3131

0 commit comments

Comments
 (0)