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

Large-Data Unit tests for all protocols #69

Merged
merged 3 commits into from
Jun 1, 2021

Conversation

thijsk
Copy link
Contributor

@thijsk thijsk commented May 28, 2021

An attempt to reproduce issue #68 , unit tests for all protocols seem to run succesfully.

@Job79 Job79 self-assigned this May 28, 2021
@Job79
Copy link
Owner

Job79 commented May 28, 2021

Hello @thijsk,
First thanks for your merge request. I appreciate your contribution.
I will merge this when the following issue is resolved:

When I tried running this on my (slow) laptop the test for the DelimiterProtocol timed out.
This is because the TestHelper.WaitWhileTrue and TestHelper.WaitWhileFalse only wait for a maximum of 1 second.
These functions have an optional parameter for the maximum delay time.

This problem only exists with the delimiter protocol, which is the most inefficient protocol. (because it needs to compare every received byte to the delimiter)

Regards,
Job79

Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
  Failed DelimiterProtocolReceiveLargeData [21 s]
  Error Message:
     Expected: 25165440
  But was:  16776960

  Stack Trace:
     at EasyTcp4.Test.EasyTcp.DataTransfer.Protocols.Delimiter.DelimiterProtocolReceiveLargeData() in /home/job/EasyTcp/EasyTcp4/EasyTcp4.Test/EasyTcp/DataTransfer/Protocols/Delimiter.cs:line 59
   at NUnit.Framework.Internal.TaskAwaitAdapter.GenericAdapter`1.BlockUntilCompleted()
   at NUnit.Framework.Internal.MessagePumpStrategy.NoMessagePumpStrategy.WaitForCompletion(AwaitAdapter awaitable)
   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.PerformWork()


Failed!  - Failed:     1, Passed:    49, Skipped:     0, Total:    50, Duration: 23 s

@Job79
Copy link
Owner

Job79 commented Jun 1, 2021

Tested again and tests seem all to run succesfully.
Many thanks for the contribution.

Regards,
Job79

@Job79 Job79 merged commit d690509 into Job79:develop Jun 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants