Skip to content

Commit

Permalink
fix flaky test: removing dead states can turn the NFA into a DFA
Browse files Browse the repository at this point in the history
Instead assert that DFA doesn't turn into an NFA, that's what we care
about.

Closes #14210
  • Loading branch information
rmuir committed Feb 6, 2025
1 parent 5692097 commit eaa79d1
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -880,9 +880,11 @@ public void testRandomFinite() throws Exception {
newTerms.add(newTerm.toBytesRef());
}
terms = newTerms;
boolean wasDeterministic1 = a.isDeterministic();
boolean wasDeterministic = a.isDeterministic();
a = Operations.concatenate(Automata.makeString(prefix.utf8ToString()), a);
assertEquals(wasDeterministic1, a.isDeterministic());
if (wasDeterministic) {
assertTrue(a.isDeterministic());
}
}
break;

Expand Down

0 comments on commit eaa79d1

Please sign in to comment.