Skip to content

Commit 46bb887

Browse files
add transport action explicitly to test; improve assert error message
1 parent f47f725 commit 46bb887

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

server/src/main/java/org/elasticsearch/transport/TransportService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1050,7 +1050,7 @@ private void sendLocalRequest(long requestId, final String action, final Transpo
10501050
@SuppressWarnings("unchecked")
10511051
final RequestHandlerRegistry<TransportRequest> reg = (RequestHandlerRegistry<TransportRequest>) getRequestHandler(action);
10521052
if (reg == null) {
1053-
assert false : action;
1053+
assert false : "Action [" + action + "] not found";
10541054
throw new ActionNotFoundTransportException("Action [" + action + "] not found");
10551055
}
10561056
final Executor executor = reg.getExecutor();

server/src/test/java/org/elasticsearch/snapshots/SnapshotResiliencyTests.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2510,6 +2510,10 @@ public RecyclerBytesStreamOutput newNetworkBytesStream() {
25102510
nodeConnectionsService = new NodeConnectionsService(clusterService.getSettings(), threadPool, transportService);
25112511
final ActionFilters actionFilters = new ActionFilters(emptySet());
25122512
Map<ActionType<?>, TransportAction<?, ?>> actions = new HashMap<>();
2513+
actions.put(
2514+
TransportUpdateSnapshotStatusAction.TYPE,
2515+
new TransportUpdateSnapshotStatusAction(transportService, clusterService, threadPool, snapshotsService, actionFilters)
2516+
);
25132517
actions.put(
25142518
GlobalCheckpointSyncAction.TYPE,
25152519
new GlobalCheckpointSyncAction(

0 commit comments

Comments
 (0)