File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
core/src/test/java/org/elasticsearch/index/mapper Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -273,7 +273,14 @@ protected void doTestIncludeInAll(String type) throws Exception {
273273 IndexableField [] fields = doc .rootDoc ().getFields ("_all" );
274274 assertEquals (1 , fields .length );
275275
276- assertThat (fields [0 ].stringValue (), containsString (type .equals ("date_range" ) ? "1477872000000" : "5" ));
276+ String strVal = "5" ;
277+ if (type .equals ("date_range" )) {
278+ strVal = "1477872000000" ;
279+ } else if (type .equals ("ip_range" )) {
280+ strVal = InetAddresses .toAddrString (InetAddresses .forString ("192.168.1.7" )) + " : "
281+ + InetAddresses .toAddrString (InetAddresses .forString ("2001:db8:0:0:0:0:0:0" ));
282+ }
283+ assertThat (fields [0 ].stringValue (), containsString (strVal ));
277284
278285 mapping = XContentFactory .jsonBuilder ().startObject ().startObject ("type" )
279286 .startObject ("properties" ).startObject ("field" ).field ("type" , type );
You can’t perform that action at this time.
0 commit comments