Sanity check exception message in tests

This commit is contained in:
Jason Tedor 2015-11-11 12:45:29 -05:00
parent 06c07ce275
commit e4e68c0463
1 changed files with 3 additions and 3 deletions

View File

@ -239,13 +239,13 @@ public class TransportBroadcastByNodeActionTests extends ESTestCase {
PlainActionFuture<Response> listener = new PlainActionFuture<>();
ClusterBlocks.Builder block = ClusterBlocks.builder()
.addGlobalBlock(new ClusterBlock(1, "", false, true, RestStatus.SERVICE_UNAVAILABLE, ClusterBlockLevel.ALL));
.addGlobalBlock(new ClusterBlock(1, "test-block", false, true, RestStatus.SERVICE_UNAVAILABLE, ClusterBlockLevel.ALL));
clusterService.setState(ClusterState.builder(clusterService.state()).blocks(block));
try {
action.new AsyncAction(request, listener).start();
fail("expected ClusterBlockException");
} catch (ClusterBlockException expected) {
assertEquals("blocked by: [SERVICE_UNAVAILABLE/1/test-block];", expected.getMessage());
}
}
@ -260,7 +260,7 @@ public class TransportBroadcastByNodeActionTests extends ESTestCase {
action.new AsyncAction(request, listener).start();
fail("expected ClusterBlockException");
} catch (ClusterBlockException expected) {
assertEquals("blocked by: [SERVICE_UNAVAILABLE/1/test-block];", expected.getMessage());
}
}