You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucenenet.apache.org by "paulirwin (via GitHub)" <gi...@apache.org> on 2024/02/25 02:26:13 UTC

[I] Meta: Add Support unit tests [lucenenet]

paulirwin opened a new issue, #920:
URL: https://github.com/apache/lucenenet/issues/920

   ### Is there an existing issue for this?
   
   - [X] I have searched the existing issues
   
   ### Task description
   
   This is a meta-issue that should be broken out into separate issues.
   
   From #914 via @NightOwl888:
   
   I also noticed we don't have tests for the following types in the Support folder:
   
   - [ ] [IndexableFieldExtensions](https://github.com/apache/lucenenet/blob/b1476aee4fe21131899c1f43b2e06e25971b3ebe/src/Lucene.Net/Support/Document/Extensions/IndexableFieldExtensions.cs)
   - [ ] [ByteArrayOutputStream](https://github.com/apache/lucenenet/blob/b1476aee4fe21131899c1f43b2e06e25971b3ebe/src/Lucene.Net/Support/IO/ByteArrayOutputStream.cs) - Patch to provide ToString() output for Stream.
   - [ ] [StreamExtensions](https://github.com/apache/lucenenet/blob/b1476aee4fe21131899c1f43b2e06e25971b3ebe/src/Lucene.Net/Support/IO/StreamExtensions.cs) - These methods were copied from Apache Harmony, and there are tests for them that didn't get ported over. Need to drill down in the code to find the location where these originated from.
   - [ ] [ReferenceContext<T>](https://github.com/apache/lucenenet/blob/b1476aee4fe21131899c1f43b2e06e25971b3ebe/src/Lucene.Net/Support/Search/ReferenceContext.cs) - We added this to make it possible to use a using block instead of Acquire() with a try finally around Release(). We should convert this to a ref struct, so it doesn't cause a heap allocation to use. Ref structs cannot implement IDisposable, but the compiler allows a using block if Dispose() exists. Note that ReferenceManagerExtensions can be tested along with it.
   - [ ] [LimitedConcurrencyLevelTaskScheduler](https://github.com/apache/lucenenet/blob/b1476aee4fe21131899c1f43b2e06e25971b3ebe/src/Lucene.Net/Support/Threading/LimitedConcurrencyLevelTaskScheduler.cs) - We originally grabbed this from MSDN. We might be able to use tests from Apache Harmony to test this.
   - [ ] [ReentrantLock](https://github.com/apache/lucenenet/blob/b1476aee4fe21131899c1f43b2e06e25971b3ebe/src/Lucene.Net/Support/Threading/ReentrantLock.cs) - There are tests in Apache Harmony for this.
   - [ ] [CastTo<T>](https://github.com/apache/lucenenet/blob/b1476aee4fe21131899c1f43b2e06e25971b3ebe/src/Lucene.Net/Support/Util/CastTo.cs)
   - [ ] [ExceptionExtensions](https://github.com/apache/lucenenet/blob/b1476aee4fe21131899c1f43b2e06e25971b3ebe/src/Lucene.Net/Support/Util/ExceptionExtensions.cs) - Apache Harmony should have tests for these.
   - [ ] [ListExtensions](https://github.com/apache/lucenenet/blob/b1476aee4fe21131899c1f43b2e06e25971b3ebe/src/Lucene.Net/Support/Util/ListExtensions.cs)
   - [ ] [SystemConsole](https://github.com/apache/lucenenet/blob/b1476aee4fe21131899c1f43b2e06e25971b3ebe/src/Lucene.Net/Support/Util/SystemConsole.cs) - .NET should have some tests we can use for this.
   - [ ] [Arrays](https://github.com/apache/lucenenet/blob/b1476aee4fe21131899c1f43b2e06e25971b3ebe/src/Lucene.Net/Support/Arrays.cs) - Apache Harmony should have tests we can use for this.
   - [ ] [AssemblyUtils](https://github.com/apache/lucenenet/blob/b1476aee4fe21131899c1f43b2e06e25971b3ebe/src/Lucene.Net/Support/AssemblyUtils.cs)
   - [ ] [CollectionExtensions](https://github.com/apache/lucenenet/blob/b1476aee4fe21131899c1f43b2e06e25971b3ebe/src/Lucene.Net/Support/CollectionExtensions.cs) - We can base the tests off of Apache Harmony tests,, but we will need to check ISet<T>, JCG.List<T>, SCG.List<T> and a collection that does not implement ISet<T> or IList<T> (the slow path). All should produce the same result.
   - [ ] [Collections](https://github.com/apache/lucenenet/blob/b1476aee4fe21131899c1f43b2e06e25971b3ebe/src/Lucene.Net/Support/Collections.cs) - There should be tests in Apache Harmony for this.
   - [ ] [ConcurrentDictionaryWrapper<TKey, TValue>](https://github.com/apache/lucenenet/blob/b1476aee4fe21131899c1f43b2e06e25971b3ebe/src/Lucene.Net/Support/ConcurrentDictionaryWrapper.cs) - This is no longer in use, we can probably eliminate it along with the DictionaryExtensions.AsConcurrent() extension method. It may come in handy for a future version of Lucene, though.
   - [ ] [ConcurrentHashSet<T>](https://github.com/apache/lucenenet/blob/b1476aee4fe21131899c1f43b2e06e25971b3ebe/src/Lucene.Net/Support/ConcurrentHashSet.cs) - Apache Harmony should have tests for this. Note that not all ISet<T> members are implemented. If they were, we could potentially move this to J2N.
   - [ ] [ConcurrentSet<T>](https://github.com/apache/lucenenet/blob/b1476aee4fe21131899c1f43b2e06e25971b3ebe/src/Lucene.Net/Support/ConcurrentSet.cs) - This is a concurrent wrapper for any ISet<T>. It should pass the same tests as ConcurrentHashSet<T>. It is mainly used for wrapping LinkedHashSet<T>. If we had a ConcurrentLinkedHashSet<T> in J2N, we could eliminate this class.
   - [ ] [DictionaryExtensions](https://github.com/apache/lucenenet/blob/b1476aee4fe21131899c1f43b2e06e25971b3ebe/src/Lucene.Net/Support/DictionaryExtensions.cs)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@lucenenet.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Meta: Add Support unit tests [lucenenet]

Posted by "NightOwl888 (via GitHub)" <gi...@apache.org>.
NightOwl888 commented on issue #920:
URL: https://github.com/apache/lucenenet/issues/920#issuecomment-1987100915

   @paulirwin - Perhaps eliminating `ConcurrentDictionaryWrapper<TKey, TValue>` and friends should be a separate issue. Alternatively, it could be rolled into #259. If there is a need for a "ConcurrentLinkedDictionary" in later versions of Lucene, perhaps the implementation should be tagged or put on its own branch so we can recover it later.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@lucenenet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Meta: Add Support unit tests [lucenenet]

Posted by "paulirwin (via GitHub)" <gi...@apache.org>.
paulirwin closed issue #920: Meta: Add Support unit tests
URL: https://github.com/apache/lucenenet/issues/920


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@lucenenet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Meta: Add Support unit tests [lucenenet]

Posted by "paulirwin (via GitHub)" <gi...@apache.org>.
paulirwin commented on issue #920:
URL: https://github.com/apache/lucenenet/issues/920#issuecomment-3322102917

   The last of the PRs for the sub-issues of this issue have been merged, so this is finally complete!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@lucenenet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org