File tree 2 files changed +9
-6
lines changed
rest-api-spec/src/main/resources/rest-api-spec/test/search
server/src/test/java/org/elasticsearch/index/mapper
2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change 20
20
Content-Type : application/json
21
21
index :
22
22
index : test
23
+ refresh : true
23
24
id : 1
24
25
body :
25
26
binary : U29tZSBiaW5hcnkgYmxvYg==
26
27
27
- - do :
28
- indices.refresh : {}
29
-
30
28
- do :
31
29
search :
32
30
index : test
Original file line number Diff line number Diff line change 19
19
20
20
import java .io .IOException ;
21
21
import java .io .OutputStream ;
22
+ import java .nio .charset .StandardCharsets ;
22
23
import java .util .Arrays ;
24
+ import java .util .Base64 ;
23
25
24
26
import static org .hamcrest .Matchers .instanceOf ;
25
27
@@ -121,9 +123,12 @@ public void testStoredValue() throws IOException {
121
123
122
124
@ Override
123
125
protected Object generateRandomInputValue (MappedFieldType ft ) {
124
- assumeFalse ("We can't parse the binary doc values we send" , true );
125
- // AwaitsFix https://github.com/elastic/elasticsearch/issues/70244
126
- return null ;
126
+ if (rarely ()) {
127
+ return null ;
128
+ } else {
129
+ byte [] value = randomAlphaOfLengthBetween (1 , 30 ).getBytes (StandardCharsets .UTF_8 );
130
+ return Base64 .getEncoder ().encodeToString (value );
131
+ }
127
132
}
128
133
129
134
@ Override
You can’t perform that action at this time.
0 commit comments