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

Fix default alphabetSize of NFARunAutomaton #559

Merged
merged 1 commit into from Dec 21, 2021
Merged

Conversation

zhaih
Copy link
Contributor

@zhaih zhaih commented Dec 21, 2021

Description

The test NFARunAutomaton is using default max codepoint as alphabet size, and the assertion c < alphabetSize failed, which means c is MAX_CODEPOINT

Stacktrace

java.lang.AssertionError
	at __randomizedtesting.SeedInfo.seed([75637BDB16D0FDF0:1030A407D690701]:0)
	at org.apache.lucene.util.automaton.NFARunAutomaton.getCharClass(NFARunAutomaton.java:161)
	at org.apache.lucene.util.automaton.NFARunAutomaton.step(NFARunAutomaton.java:133)
	at org.apache.lucene.util.automaton.NFARunAutomaton.step(NFARunAutomaton.java:98)
	at org.apache.lucene.util.automaton.NFARunAutomaton.run(NFARunAutomaton.java:121)
	at org.apache.lucene.util.automaton.TestNFARunAutomaton.testAcceptedString(TestNFARunAutomaton.java:161)
	at org.apache.lucene.util.automaton.TestNFARunAutomaton.testWithRandomRegex(TestNFARunAutomaton.java:70)
...

NOTE: reproduce with: gradlew test --tests TestNFARunAutomaton.testWithRandomRegex -Dtests.seed=75637BDB16D0FDF0 -Dtests.multiplier=3 -Dtests.slow=true -Dtests.locale=ff-Latn-BF -Dtests.timezone=Europe/Gibraltar -Dtests.asserts=true -Dtests.file.encoding=UTF-8
NOTE: test params are: codec=Asserting(Lucene90): {field=PostingsFormat(name=LuceneVarGapDocFreqInterval)}, docValues:{}, maxPointsInLeafNode=1344, maxMBSortInHeap=6.120921628968405, sim=Asserting(RandomSimilarity(queryNorm=true): {field=org.apache.lucene.search.similarities.BooleanSimilarity@64e5ef99}), locale=ff-Latn-BF, timezone=Europe/Gibraltar
NOTE: Linux 5.11.0-41-generic amd64/Oracle Corporation 16 (64-bit)/cpus=16,threads=1,free=134519392,total=259588096
NOTE: All tests run in this JVM: [TestBKD, TestWeakIdentityMap, TestDaciukMihovAutomatonBuilder, TestCompiledAutomaton, TestNFARunAutomaton]

@zhaih zhaih merged commit 8f99c12 into apache:main Dec 21, 2021
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.

None yet

2 participants