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

Occasional failing tests on LimitedConcurrencyLevelTaskScheduler #1123

Open
paulirwin opened this issue Jan 23, 2025 · 0 comments
Open

Occasional failing tests on LimitedConcurrencyLevelTaskScheduler #1123

paulirwin opened this issue Jan 23, 2025 · 0 comments

Comments

@paulirwin
Copy link
Contributor

It looks like there is a problem with these tests on:

  • net9.0 x64, Windows
  • net9.0 x64 Linux
  • net6.0 x64 Windows

https://dev.azure.com/LuceneNET-Temp/Lucene.NET/_build/results?buildId=2410&view=ms.vss-test-web.build-test-results-tab

Expected: 1, Actual: 0
(Test: Lucene.Net.Support.Threading.TestLimitedConcurrencyLevelTaskScheduler.TestGetActiveCount)


To reproduce this test result:


Option 1:


Apply the following assembly-level attributes:


[assembly: Lucene.Net.Util.RandomSeed("0x9054fc2057c057c9")]
[assembly: NUnit.Framework.SetCulture("ia")]


Option 2:


Use the following .runsettings file:


<RunSettings>
  <TestRunParameters>
    <Parameter name="tests:seed" value="0x9054fc2057c057c9" />
    <Parameter name="tests:culture" value="ia" />
  </TestRunParameters>
</RunSettings>
Option 3:


Create the following lucene.testsettings.json file somewhere between the test assembly and the root of your drive:


{
"tests": {
"seed": "0x9054fc2057c057c9",
"culture": "ia"
}
}


Fixture Test Values

Random Seed:           0x9054fc2057c057c9
Culture:               ia
Time Zone:             (UTC-04:00) Georgetown, La Paz, Manaus, San Juan
Default Codec:         Lucene45 (Lucene45RWCodec)
Default Similarity:    RandomSimilarityProvider(queryNorm=False,coord=crazy): {}


System Properties

Nightly:               False
Weekly:                False
Slow:                  True
Awaits Fix:            False
Directory:             random
Verbose:               False
Random Multiplier:     1

Expected: 1, Actual: 0
(Test: Lucene.Net.Support.Threading.TestLimitedConcurrencyLevelTaskScheduler.TestGetCompletedTaskCount)


To reproduce this test result:


Option 1:


Apply the following assembly-level attributes:


[assembly: Lucene.Net.Util.RandomSeed("0x9054fc2057c057c9")]
[assembly: NUnit.Framework.SetCulture("ia")]


Option 2:


Use the following .runsettings file:


<RunSettings>
  <TestRunParameters>
    <Parameter name="tests:seed" value="0x9054fc2057c057c9" />
    <Parameter name="tests:culture" value="ia" />
  </TestRunParameters>
</RunSettings>
Option 3:


Create the following lucene.testsettings.json file somewhere between the test assembly and the root of your drive:


{
"tests": {
"seed": "0x9054fc2057c057c9",
"culture": "ia"
}
}


Fixture Test Values

Random Seed:           0x9054fc2057c057c9
Culture:               ia
Time Zone:             (UTC-04:00) Georgetown, La Paz, Manaus, San Juan
Default Codec:         Lucene45 (Lucene45RWCodec)
Default Similarity:    RandomSimilarityProvider(queryNorm=False,coord=crazy): {}


System Properties

Nightly:               False
Weekly:                False
Slow:                  True
Awaits Fix:            False
Directory:             random
Verbose:               False
Random Multiplier:     1

Originally posted by @NightOwl888 in #1119 (comment)

Additional context from @paulirwin: These tests rely on thread/task timing to assert properly, so there might be some thread or other contention causing them to take a while to begin or finish their queue. I'm wondering if these tests should be considered inconclusive if their counts aren't exact, rather than failures. They do succeed on GitHub actions for the same platforms.

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

No branches or pull requests

1 participant