2020package org .elasticsearch .cluster ;
2121
2222import org .elasticsearch .action .ActionRequestBuilder ;
23- import org .elasticsearch .action .UnavailableShardsException ;
2423import org .elasticsearch .action .admin .cluster .configuration .AddVotingConfigExclusionsAction ;
2524import org .elasticsearch .action .admin .cluster .configuration .AddVotingConfigExclusionsRequest ;
2625import org .elasticsearch .action .admin .cluster .state .ClusterStateResponse ;
@@ -326,7 +325,7 @@ public void testNoMasterActionsMetadataWriteMasterBlock() throws Exception {
326325 client (randomFrom (nodesWithShards )).prepareUpdate ("test1" , "1" )
327326 .setDoc (Requests .INDEX_CONTENT_TYPE , "field" , "value2" ).setTimeout (timeout ).get ();
328327
329- expectThrows (UnavailableShardsException .class , () -> client (partitionedNode ).prepareUpdate ("test1" , "1" )
328+ expectThrows (Exception .class , () -> client (partitionedNode ).prepareUpdate ("test1" , "1" )
330329 .setDoc (Requests .INDEX_CONTENT_TYPE , "field" , "value2" ).setTimeout (timeout ).get ());
331330
332331 client (randomFrom (nodesWithShards )).prepareIndex ("test1" ).setId ("1" )
@@ -341,7 +340,7 @@ public void testNoMasterActionsMetadataWriteMasterBlock() throws Exception {
341340 expectThrows (MasterNotDiscoveredException .class , () -> client (randomFrom (nodesWithShards )).prepareIndex ("test2" ).setId ("1" )
342341 .setSource (XContentFactory .jsonBuilder ().startObject ().endObject ()).setTimeout (timeout ).get ());
343342
344- expectThrows (UnavailableShardsException .class , () -> client (partitionedNode ).prepareIndex ("test1" ).setId ("1" )
343+ expectThrows (Exception .class , () -> client (partitionedNode ).prepareIndex ("test1" ).setId ("1" )
345344 .setSource (XContentFactory .jsonBuilder ().startObject ().endObject ()).setTimeout (timeout ).get ());
346345
347346 internalCluster ().clearDisruptionScheme (true );
0 commit comments