File tree Expand file tree Collapse file tree 2 files changed +4
-11
lines changed
rest-api-spec/src/main/resources/rest-api-spec/test/indices.stats
server/src/test/java/org/elasticsearch/action/admin/indices/stats Expand file tree Collapse file tree 2 files changed +4
-11
lines changed Original file line number Diff line number Diff line change 4747 - match : { _shards.total: 18 }
4848 - is_true : _all
4949 - is_true : indices.test1
50+ - is_true : indices.test1.uuid
5051 - is_true : indices.test2
52+ - is_true : indices.test2.uuid
5153
5254
5355---
Original file line number Diff line number Diff line change 2727import org .elasticsearch .common .settings .Settings ;
2828import org .elasticsearch .common .xcontent .XContentBuilder ;
2929import org .elasticsearch .common .xcontent .XContentFactory ;
30- import org .elasticsearch .common .xcontent .XContentParser ;
31- import org .elasticsearch .common .xcontent .json .JsonXContent ;
3230import org .elasticsearch .index .engine .CommitStats ;
3331import org .elasticsearch .index .engine .SegmentsStats ;
3432import org .elasticsearch .index .translog .Translog ;
3533import org .elasticsearch .test .ESSingleNodeTestCase ;
3634
37- import java .io .IOException ;
3835import java .util .List ;
39- import java .util .Map ;
4036import java .util .concurrent .TimeUnit ;
4137
4238import static org .elasticsearch .test .hamcrest .ElasticsearchAssertions .assertAcked ;
@@ -158,15 +154,10 @@ public void testRefreshListeners() throws Exception {
158154 }
159155
160156 @ SuppressWarnings ("unchecked" )
161- public void testUuidOnRootStatsIndices () throws IOException {
157+ public void testUuidOnRootStatsIndices () {
162158 String uuid = createIndex ("test" ).indexUUID ();
163159 IndicesStatsResponse rsp = client ().admin ().indices ().prepareStats ().get ();
164- try (XContentParser parser = createParser (JsonXContent .jsonXContent , rsp .toString ())) {
165- assertEquals (
166- uuid ,
167- ((Map <String , Object >)((Map <String ,Object >) parser .map ().get ("indices" )).get ("test" )).get ("uuid" )
168- );
169- }
160+ assertEquals (uuid , rsp .getIndex ("test" ).getUuid ());
170161 }
171162
172163 /**
You can’t perform that action at this time.
0 commit comments