DnDGen / RollGen

Rolls a set of dice, as determined by the D20 die system.
http://dndgen.com
MIT License
10 stars 3 forks source link

2 FullRangeHit tests failing? #25

Closed LiruMouse closed 8 years ago

LiruMouse commented 8 years ago
Test Name:  FullRangeHit(6,7)
Test FullName:  RollGen.Tests.Integration.Stress.dTests.FullRangeHit(6,7)
Test Source:    C:\Users\Lirusaito\Nekobot\RollGen\RollGen.Tests.Integration.Stress\dTests.cs : line 28
Test Outcome:   Failed
Test Duration:  0:00:01.316

Result StackTrace:  
at RollGen.Tests.Integration.Stress.StressTests.Populate(ICollection`1 target, Func`1 generate, Int32 expectedTotal) in C:\Users\Lirusaito\Nekobot\RollGen\RollGen.Tests.Integration.Stress\StressTests.cs:line 98
at RollGen.Tests.Integration.Stress.dTests.FullRangeHit(Int32 quantity, Int32 die) in C:\Users\Lirusaito\Nekobot\RollGen\RollGen.Tests.Integration.Stress\dTests.cs:line 30
Result Message: 
Stress test timed out after 00:00:01.0004134, 232876 iterations, and 36 of 37 populated:
7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42
Result StandardOutput:  
5/19/2016 3:44:31 AM: Stress test time limit is 00:00:01
5/19/2016 3:44:32 AM: Population complete after 00:00:01.0003149 and 232875 iterations

The FullRangeHit(1,70000) also fails, but that is massive to copy paste, so I'll leave it out.

cidthecoatrack commented 8 years ago

Ah yes. These full range tests are sort of percentage-chance to populate within the 1,000,000 iterations. I have tried to whittle them down to numbers that should always pass. If they fail (as you have seen), then I need to decrease them some more. Thanks for noting these.

Since it is stopping the tests after 1 second, I assume you are running these tests locally? On my machine I can complete a million iterations within a second - is your machine not as powerful?

LiruMouse commented 8 years ago

HAH! This machine is a Lenovo G50-45, I'm happy it does perform as well as it does ^^;

On Thu, May 19, 2016 at 4:52 PM, Karl Speer notifications@github.com wrote:

Closed #25 https://github.com/DnDGen/RollGen/issues/25.

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/DnDGen/RollGen/issues/25#event-666355130

cidthecoatrack commented 8 years ago

Either way, I have removed the FullRangeHit(6, 7) test and reduced the other to FullRangeHit(1, 60000). That can be seen in the linked commits above.