Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,8 @@
- 发布自动化:`release.yml`(tag 自动建 GitHub Release)、`publish-nuget.yml`(OIDC Trusted Publishing 推送 nuget.org)。
- 单元测试 25 个 + 三场景端到端 demo。

[Unreleased]: https://github.com/CSJ608/StreamFrame/compare/v2.4.0...HEAD
[Unreleased]: https://github.com/CSJ608/StreamFrame/compare/v2.5.0...HEAD
[2.5.0]: https://github.com/CSJ608/StreamFrame/compare/v2.4.0...v2.5.0
[2.4.0]: https://github.com/CSJ608/StreamFrame/compare/v2.3.1...v2.4.0
[2.3.1]: https://github.com/CSJ608/StreamFrame/compare/v2.3.0...v2.3.1
[2.3.0]: https://github.com/CSJ608/StreamFrame/compare/v2.2.1...v2.3.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

<PropertyGroup>
<PackageId>StreamFrame.Protocols.Xml</PackageId>
<Version>2.4.0</Version>
<Version>2.5.0</Version>
<Description>StreamFrame 的 XML 报文示例驱动:XmlDocumentCodec(XmlSerializer / XmlWriter 编解码)。</Description>
<Authors>Marci</Authors>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
Expand Down
2 changes: 1 addition & 1 deletion src/StreamFrame/StreamFrame.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<PropertyGroup>
<PackageId>StreamFrame</PackageId>
<Version>2.4.0</Version>
<Version>2.5.0</Version>
<Description>通用 socket 通讯框架:帧定界(IFramer)与帧内编解码(ICodec&lt;TMessage&gt;)插件化,支持长度前缀 / STX-ETX 定界与 IPv4/IPv6 双栈,可选流式零拷贝发送。</Description>
<Authors>Marci</Authors>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
Expand Down
8 changes: 4 additions & 4 deletions test/StreamFrame.Tests/ReconnectWedgeTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ private static async Task ConnectWithRetryAsync(TcpClient client, int port, int
{
// Start() 是异步的:监听器完成 bind 前连接会被拒(CI 的 ubuntu 上线程池调度更慢,
// 必须容忍启动窗口),重试直到超时
var deadline = TestClock.TickCount64 + timeoutMs;
var deadline = TestClock.TickCount64 + timeoutMs; // 预算宽裕:本断言探测的是永久不可用,并行负载下偶发慢收敛不应误报
while (true)
{
try
Expand All @@ -67,9 +67,9 @@ private static async Task ConnectWithRetryAsync(TcpClient client, int port, int
}
}

private static async Task WaitConnectedAsync(StreamConnection<string> server, int timeoutMs = 10_000)
private static async Task WaitConnectedAsync(StreamConnection<string> server, int timeoutMs = 30_000)
{
var deadline = TestClock.TickCount64 + timeoutMs;
var deadline = TestClock.TickCount64 + timeoutMs; // 预算宽裕:本断言探测的是永久不可用,并行负载下偶发慢收敛不应误报
while (TestClock.TickCount64 < deadline && server.State != ConnectionState.Connected)
await Task.Delay(20);
Assert.Equal(ConnectionState.Connected, server.State);
Expand Down Expand Up @@ -100,7 +100,7 @@ public async Task RapidServerInitiatedReconnects_PortStaysAcceptable()
using (var client = new TcpClient())
{
await ConnectWithRetryAsync(client, port);
await WaitConnectedAsync(server, 15_000);
await WaitConnectedAsync(server, 30_000);

// 两路并发触发(#47 的竞速形态):杀对端(自动重连)与用户显式 Reconnect() 竞争
var kill = Task.Run(client.Dispose);
Expand Down
Loading