File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
src/test/java/org/elasticsearch/percolator Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -1145,6 +1145,7 @@ public void testPercolateScoreAndSorting() throws Exception {
1145
1145
}
1146
1146
controlMap .get (value ).add (i );
1147
1147
}
1148
+ List <Integer > usedValues = new ArrayList <Integer >(controlMap .keySet ());
1148
1149
refresh ();
1149
1150
1150
1151
// Only retrieve the score
@@ -1166,7 +1167,6 @@ public void testPercolateScoreAndSorting() throws Exception {
1166
1167
}
1167
1168
1168
1169
// Sort the queries by the score
1169
- runs = randomInt (27 );
1170
1170
for (int i = 0 ; i < runs ; i ++) {
1171
1171
int size = randomIntBetween (1 , 10 );
1172
1172
PercolateResponse response = client ().preparePercolate ().setIndices ("my-index" ).setDocumentType ("my-type" )
@@ -1188,9 +1188,8 @@ public void testPercolateScoreAndSorting() throws Exception {
1188
1188
}
1189
1189
1190
1190
1191
- runs = randomInt (27 );
1192
1191
for (int i = 0 ; i < runs ; i ++) {
1193
- int value = randomInt (10 );
1192
+ int value = usedValues . get ( randomInt (usedValues . size () - 1 ) );
1194
1193
NavigableSet <Integer > levels = controlMap .get (value );
1195
1194
int size = randomIntBetween (1 , levels .size ());
1196
1195
PercolateResponse response = client ().preparePercolate ().setIndices ("my-index" ).setDocumentType ("my-type" )
You can’t perform that action at this time.
0 commit comments