@@ -64,9 +64,7 @@ public void testFailuresFromRemote() throws IOException {
64
64
// Closed shards will result to index error because shards must be in readable state
65
65
FieldCapabilitiesIT .closeShards (cluster ("remote_cluster" ), remoteErrorIndex );
66
66
67
- response = client ().prepareFieldCaps ("*" , "remote_cluster:*" )
68
- .setFields ("*" )
69
- .get ();
67
+ response = client ().prepareFieldCaps ("*" , "remote_cluster:*" ).setFields ("*" ).get ();
70
68
assertThat (response .getIndices ()[0 ], equalTo (localIndex ));
71
69
assertThat (response .getFailedIndicesCount (), equalTo (1 ));
72
70
FieldCapabilitiesFailure failure = response .getFailures ()
@@ -78,23 +76,21 @@ public void testFailuresFromRemote() throws IOException {
78
76
assertEquals (RemoteTransportException .class , ex .getClass ());
79
77
Throwable cause = ExceptionsHelper .unwrapCause (ex );
80
78
assertEquals (IllegalIndexShardStateException .class , cause .getClass ());
81
- assertEquals ("CurrentState[CLOSED] operations only allowed when shard state is one of [POST_RECOVERY, STARTED]" , cause .getMessage ());
79
+ assertEquals (
80
+ "CurrentState[CLOSED] operations only allowed when shard state is one of [POST_RECOVERY, STARTED]" ,
81
+ cause .getMessage ()
82
+ );
82
83
83
84
// if we only query the remote we should get back an exception only
84
- ex = expectThrows (
85
- IllegalIndexShardStateException .class ,
86
- client ().prepareFieldCaps ("remote_cluster:*" ).setFields ("*" )
87
- );
85
+ ex = expectThrows (IllegalIndexShardStateException .class , client ().prepareFieldCaps ("remote_cluster:*" ).setFields ("*" ));
88
86
assertEquals ("CurrentState[CLOSED] operations only allowed when shard state is one of [POST_RECOVERY, STARTED]" , ex .getMessage ());
89
87
90
88
// add an index that doesn't fail to the remote
91
89
assertAcked (remoteClient .admin ().indices ().prepareCreate ("okay_remote_index" ));
92
90
remoteClient .prepareIndex ("okay_remote_index" ).setId ("2" ).setSource ("foo" , "bar" ).get ();
93
91
remoteClient .admin ().indices ().prepareRefresh ("okay_remote_index" ).get ();
94
92
95
- response = client ().prepareFieldCaps ("*" , "remote_cluster:*" )
96
- .setFields ("*" )
97
- .get ();
93
+ response = client ().prepareFieldCaps ("*" , "remote_cluster:*" ).setFields ("*" ).get ();
98
94
assertThat (Arrays .asList (response .getIndices ()), containsInAnyOrder (localIndex , "remote_cluster:okay_remote_index" ));
99
95
assertThat (response .getFailedIndicesCount (), equalTo (1 ));
100
96
failure = response .getFailures ()
0 commit comments