File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
server/src/test/java/org/elasticsearch/cluster/metadata Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change 8
8
9
9
package org .elasticsearch .cluster .metadata ;
10
10
11
+ import org .apache .lucene .util .automaton .Automaton ;
12
+ import org .apache .lucene .util .automaton .CharacterRunAutomaton ;
13
+ import org .apache .lucene .util .automaton .Operations ;
14
+ import org .apache .lucene .util .automaton .RegExp ;
11
15
import org .elasticsearch .ExceptionsHelper ;
12
16
import org .elasticsearch .ResourceAlreadyExistsException ;
13
17
import org .elasticsearch .TransportVersion ;
@@ -612,9 +616,20 @@ public void testCalculateNumRoutingShards() {
612
616
}
613
617
}
614
618
619
+ @ AwaitsFix (bugUrl = "https://github.com/elastic/elasticsearch/issues/112453" )
615
620
public void testValidateDotIndex () {
616
621
List <SystemIndexDescriptor > systemIndexDescriptors = new ArrayList <>();
617
622
systemIndexDescriptors .add (SystemIndexDescriptorUtils .createUnmanaged (".test-one*" , "test" ));
623
+ //TODO Lucene 10 upgrade
624
+ // The "~" operator in Rexeg Automata doesn't seem to work as expected any more without minimization
625
+ Automaton patternAutomaton = new RegExp ("\\ .test-~(one.*)" ).toAutomaton ();
626
+ assertTrue (
627
+ new CharacterRunAutomaton (Operations .determinize (patternAutomaton , Operations .DEFAULT_DETERMINIZE_WORK_LIMIT )).run (
628
+ ".test-~(one.*)"
629
+ )
630
+ );
631
+ // TODO remove this smoke test ^^^ once the issue is fixed
632
+
618
633
systemIndexDescriptors .add (SystemIndexDescriptorUtils .createUnmanaged (".test-~(one*)" , "test" ));
619
634
systemIndexDescriptors .add (SystemIndexDescriptorUtils .createUnmanaged (".pattern-test*" , "test-1" ));
620
635
You can’t perform that action at this time.
0 commit comments