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

Too much test data generated for a successful test run #1095

Open
shananholm opened this issue Sep 26, 2022 · 2 comments
Open

Too much test data generated for a successful test run #1095

shananholm opened this issue Sep 26, 2022 · 2 comments

Comments

@shananholm
Copy link
Contributor

Running dotnet test on the completed files for the pizza-pricing exercism fails because of the volume of tests generated in the last test case Order price for gigantic order with:

Test Run Aborted with error System.Exception: One or more errors occurred.
 ---> System.Exception: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host..
 ---> System.Exception: An existing connection was forcibly closed by the remote host.
   at System.Net.Sockets.NetworkStream.Read(Span`1 buffer)
   --- End of inner exception stack trace ---
   at System.Net.Sockets.NetworkStream.Read(Span`1 buffer)
   at System.Net.Sockets.NetworkStream.ReadByte()
   at System.IO.BinaryReader.Read7BitEncodedInt()
   at System.IO.BinaryReader.ReadString()
   at Microsoft.VisualStudio.TestPlatform.CommunicationUtilities.LengthPrefixCommunicationChannel.NotifyDataAvailable()
   at Microsoft.VisualStudio.TestPlatform.CommunicationUtilities.TcpClientExtensions.MessageLoopAsync(TcpClient client, ICommunicationChannel channel, Action`1 errorHandler, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---.

Reducing the number of items generated will run and pass, for example:
from:

let ``Order price for gigantic order``() = orderPrice (List.replicate 100_000 Margherita) |> should equal 700_000

to:

let ``Order price for gigantic order``() = orderPrice (List.replicate 10_000 Margherita) |> should equal 70_000
@ErikSchierboom
Copy link
Member

I can't seem to reprodcue this issue. While 100_000 list items is not nothing, it is also anywhere near being a lot of memory.
The error message also looks quite odd to me, as it seems to imply a networking issue.

@64J0
Copy link
Contributor

64J0 commented Jun 9, 2023

Checking the logs here and indeed, it seems to be something related to the network @shananholm.

I tested with this submission and it worked fine:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants