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

Test review E-I, #259 #1014

Merged
merged 6 commits into from
Nov 12, 2024
Merged

Test review E-I, #259 #1014

merged 6 commits into from
Nov 12, 2024

Conversation

paulirwin
Copy link
Contributor

@paulirwin paulirwin commented Nov 10, 2024

  • You've read the Contributor Guide and Code of Conduct.
  • You've included unit or integration tests for your change, where applicable.
  • You've included inline docs for your change, where applicable.
  • There's an open issue for the PR that you are making. If you'd like to propose a change, please open an issue to discuss the change or find an existing issue.

Test review for core E-I tests

Partial #259

Description

This updates the tests in the E-I test assembly to match upstream Lucene for style, formatting, etc. Additionally, some minor bugs (including documentation bugs) have been fixed.

@paulirwin paulirwin marked this pull request as ready for review November 10, 2024 05:27
@NightOwl888 NightOwl888 added notes:improvement An enhancement to an existing feature and removed notes:improvement An enhancement to an existing feature labels Nov 10, 2024
@paulirwin paulirwin changed the title Test review E-I, #259 BREAKING: Test review E-I, #259 Nov 10, 2024
@paulirwin
Copy link
Contributor Author

@NightOwl888 Updated title to indicate the breaking changes of changing some static readonly fields to be const. This will affect any NuGet packages or custom binaries that use these fields, although it's generally not breaking from a source standpoint. We should probably do a sweep before beta 18 for other const-able fields.

@NightOwl888
Copy link
Contributor

@NightOwl888 Updated title to indicate the breaking changes of changing some static readonly fields to be const. This will affect any NuGet packages or custom binaries that use these fields, although it's generally not breaking from a source standpoint. We should probably do a sweep before beta 18 for other const-able fields.

Looks like this only affects test classes except for the Assert class that is part of the test framework, but there are no breaking API or behavioral changes in it. Or am I missing something?

@paulirwin
Copy link
Contributor Author

IndexWriter and ByteBlockPool have some public const changes. I can revert those if we'd rather do them as part of a separate sweep.

@NightOwl888
Copy link
Contributor

IndexWriter and ByteBlockPool have some public const changes. I can revert those if we'd rather do them as part of a separate sweep.

I see 'em. I have 7 files left to review and those 2 are at the bottom.

@NightOwl888
Copy link
Contributor

If these are made const, that means they will be compiled as metadata in the consuming assembly. So any changes to the values will not be seen unless the consuming app is recompiled.

This may or may not be a problem, though. Technically, we should never update the values on these unless porting a new version of Lucene. It would be helpful to know if Lucene ever changes values during minor or patch version bumps, though, because we will eventually catch up with them. The safest bet without knowing that is to leave them static. That said, I have been guilty of changing many of these to const recently.

Copy link
Contributor

@NightOwl888 NightOwl888 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work!

I found a few minor things to address. Please see my comments inline.

src/Lucene.Net.Tests/Index/TestAddIndexes.cs Outdated Show resolved Hide resolved
src/Lucene.Net.Tests/Index/TestAddIndexes.cs Outdated Show resolved Hide resolved
src/Lucene.Net.Tests/Index/TestAddIndexes.cs Outdated Show resolved Hide resolved
src/Lucene.Net.Tests/Index/TestAddIndexes.cs Outdated Show resolved Hide resolved
src/Lucene.Net.Tests/Index/TestDirectoryReader.cs Outdated Show resolved Hide resolved
src/Lucene.Net.Tests/Index/TestDirectoryReaderReopen.cs Outdated Show resolved Hide resolved
src/Lucene.Net/Index/IndexWriter.cs Outdated Show resolved Hide resolved
src/Lucene.Net/Util/ByteBlockPool.cs Outdated Show resolved Hide resolved
@paulirwin paulirwin changed the title BREAKING: Test review E-I, #259 Test review E-I, #259 Nov 11, 2024
@paulirwin
Copy link
Contributor Author

@NightOwl888 All feedback items should be addressed now. Thanks!

@NightOwl888 NightOwl888 merged commit 3adb958 into apache:master Nov 12, 2024
199 checks passed
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

Successfully merging this pull request may close these issues.

2 participants