Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Listen backlog test failure #4099

Closed
pepone opened this issue Nov 14, 2024 · 1 comment · Fixed by #4100
Closed

Listen backlog test failure #4099

pepone opened this issue Nov 14, 2024 · 1 comment · Fixed by #4100
Labels
bug Something isn't working
Milestone

Comments

@pepone
Copy link
Member

pepone commented Nov 14, 2024

This test also failed with a Slow Windows VM, but not clear why this is time sensitive.

Assert.That(connections, Has.Count.LessThanOrEqualTo(25));

This assert seems a bit aleatory, why 25?

 IceRpc.Tests test net8.0 failed with 1 error(s) (26.1s)
    C:\Users\jose\source\repos\icerpc-csharp\tests\IceRpc.Tests\Transports\Tcp\TcpTransportTests.cs(196): error TESTERROR:
      IceRpc:Tests:Transports:Tcp:TcpTransportTests:Configure_server_connection_listen_backlog (676ms): Error Message:   Assert.That(connections, Has.Count.LessThanOrEqualTo(25))
        Expected: property Count less than or equal to 25
        But was:  30

      Stack Trace:
         at IceRpc.Tests.Transports.Tcp.TcpTransportTests.Configure_server_connection_listen_backlog() in C:\Users\jose\source\repos\icerpc-csharp\tests\IceRpc.Tests\Transports\Tcp\TcpTransportTests.cs:line 196
         at IceRpc.Tests.Transports.Tcp.TcpTransportTests.Configure_server_connection_listen_backlog() in C:\Users\jose\source\repos\icerpc-csharp\tests\IceRpc.Tests\Transports\Tcp\TcpTransportTests.cs:line 198
         at NUnit.Framework.Internal.TaskAwaitAdapter.GenericAdapter`1.BlockUntilCompleted()
         at NUnit.Framework.Internal.MessagePumpStrategy.NoMessagePumpStrategy.WaitForCompletion(AwaitAdapter awaiter)
         at NUnit.Framework.Internal.AsyncToSyncAdapter.Await[TResult](Func`1 invoke)
         at NUnit.Framework.Internal.AsyncToSyncAdapter.Await(Func`1 invoke)
         at NUnit.Framework.Internal.Commands.TestMethodCommand.RunTestMethod(TestExecutionContext context)
         at NUnit.Framework.Internal.Commands.TestMethodCommand.Execute(TestExecutionContext context)
         at NUnit.Framework.Internal.Execution.SimpleWorkItem.<>c__DisplayClass3_0.<PerformWork>b__0()
         at NUnit.Framework.Internal.ContextUtils.<>c__DisplayClass1_0`1.<DoIsolated>b__0(Object _)

      1)    at IceRpc.Tests.Transports.Tcp.TcpTransportTests.Configure_server_connection_listen_backlog() in C:\Users\jose\source\repos\icerpc-csharp\tests\IceRpc.Tests\Transports\Tcp\TcpTransportTests.cs:line 196
@pepone pepone added the bug Something isn't working label Nov 14, 2024
@pepone pepone added this to the 0.4.1 milestone Nov 14, 2024
@pepone
Copy link
Member Author

pepone commented Nov 14, 2024

Testing on Windows shows that most of the time connect fails at the 18th connection, but there is also failures with a few more connections 21, 25, and 30 like in the stack above.

Here the whole point of the test is that TcpListener call Socket.Listen with the ListenBacklog from the TCP options. Accepting a few more connections is just a detail of the Socket implementation which is out of IceRPC control.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant