TLSharp/TLSharp.Tests
Mykolas Glinskis e191b59233 Tests: include testcase for "couldn't read packet length" bug
It seems that after triggering a FloodException, and waiting the required time
to be able to use Telegram again, TLSharp throws an exception. I include the
way to reproduce this bug as an [Ignore]d test with the hope that someone
may help me fix the problem soon.

For reference, the whole stacktrace of the exception was:

Test Name:	FloodExceptionShouldNotCauseCannotReadPackageLengthError
Test FullName:	TLSharp.Tests.TLSharpTestsVS.FloodExceptionShouldNotCauseCannotReadPackageLengthError
Test Source:	D:\Projects\GitHub\TLSharp\TLSharp.Tests.VS\TLSharpTestsVs.cs : line 72
Test Outcome:	Failed
Test Duration:	0:04:30.7467012

Result StackTrace:
at TLSharp.Core.Network.TcpTransport.<Receieve>d__4.MoveNext() in D:\Projects\GitHub\TLSharp\TLSharp.Core\Network\TcpTransport.cs:line 39
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at TLSharp.Core.Network.MtProtoSender.<Receive>d__9.MoveNext() in D:\Projects\GitHub\TLSharp\TLSharp.Core\Network\MtProtoSender.cs:line 139
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at TLSharp.Core.TelegramClient.<ConnectAsync>d__8.MoveNext() in D:\Projects\GitHub\TLSharp\TLSharp.Core\TelegramClient.cs:line 76
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at TLSharp.Tests.TLSharpTests.<CheckPhones>d__54.MoveNext() in D:\Projects\GitHub\TLSharp\TLSharp.Tests\TLSharpTests.cs:line 329
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at TLSharp.Tests.TLSharpTestsVS.<CheckPhones>d__9.MoveNext() in D:\Projects\GitHub\TLSharp\TLSharp.Tests.VS\TLSharpTestsVs.cs:line 68
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at TLSharp.Tests.TLSharpTests.<FloodExceptionShouldNotCauseCannotReadPackageLengthError>d__55.MoveNext() in D:\Projects\GitHub\TLSharp\TLSharp.Tests\TLSharpTests.cs:line 340
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at TLSharp.Tests.TLSharpTestsVS.<FloodExceptionShouldNotCauseCannotReadPackageLengthError>d__10.MoveNext() in D:\Projects\GitHub\TLSharp\TLSharp.Tests.VS\TLSharpTestsVs.cs:line 73
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
Result Message:
Test method TLSharp.Tests.TLSharpTestsVS.FloodExceptionShouldNotCauseCannotReadPackageLengthError threw exception:
System.InvalidOperationException: Couldn't read the packet length
2016-11-30 09:34:44 +01:00
..
data Redesign Everything 2016-09-24 17:08:26 +03:30
Properties Redesign Everything 2016-09-24 17:08:26 +03:30
app.config Add Cloud Password Support 2016-11-16 17:01:00 +03:30
packages.config Redesign Everything 2016-09-24 17:08:26 +03:30
TLSharp.Tests.csproj Tests: add NUnit support 2016-11-09 00:50:34 +08:00
TLSharpTests.cs Tests: include testcase for "couldn't read packet length" bug 2016-11-30 09:34:44 +01:00