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

Fixes several slow tests (#295) #298

Merged
merged 26 commits into from
Jun 24, 2020

Conversation

NightOwl888
Copy link
Contributor

This fixes performance of several tests by eliminating boxing/unboxing when passing arguments to test asserts. We already had our own facade Assert class, but needed to extend it with overloads for primitive types.

In addition, one of the contributors of the slowness of OfflineSorter has been addressed, as well as the primary contributor to the slowness of the Lucene.Net.Facet.Taxonomy.WriterCache.TestCharBlockArray.TestArray test.

Based on several runs on Azure DevOps, this reduces the average testing time by approximately 10 minutes (45min average instead of 55min). Running the tests sequentially in Visual Studio locally now takes ~35min (before it was around 1 hour).

Michael and others added 26 commits June 20, 2020 14:27
…nit seems to not treat these as numerics or at least elongates test times.

Did the same for byte comparisons.
…numerable to IList to take advantage of indexing
using Assert = Lucene.Net.TestFramework.Assert; to use TestFramework Assert
…() and Count() LINQ methods, fixed boxing issue with the Assert.AreEquals call when comparing files (addresses apache#295).
…dated assertEquals overloads to support additional collection types
…rongly-typed overloads are being called to reduce boxing. (addresses apache#295, apache#261)
…ged test to utilize the J2N's ArrayEqualityComparer to optimize the speed of the test (apache#295, apache#261)
…ith J2N.Collections.ArrayEqualityComparer<T> before cascading only the failing calls to NUnit.CollectionAssert.AreEqual to generate the error message (apache#295, apache#261)
… the Assert class in the test framework instead of NUnit (apache#295, apache#261)
…s.Document: Switched to using the Assert class from the test framework instead of NUnit (apache#295, apache#261)
…rray(): Optimized by comparing against string, since indexing into a StringBuilder is painfully slow in .NET
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants