File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
server/src/test/java/org/elasticsearch/transport Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -1446,7 +1446,7 @@ public void testRemoteClusterServiceEnsureClientIsEnabled() throws IOException {
14461446 );
14471447 }
14481448
1449- // Shouldn't throw when stateless is enabled on a search node or a node with remote cluster client role.
1449+ // Shouldn't throw when stateless is enabled on a search node, or a node with remote cluster client role, or both .
14501450 final var statelessEnabledOnSearchNodeSettings = Settings .builder ()
14511451 .put (nodeNameSettings )
14521452 .put (onlyRole (DiscoveryNodeRole .SEARCH_ROLE ))
@@ -1463,6 +1463,14 @@ public void testRemoteClusterServiceEnsureClientIsEnabled() throws IOException {
14631463 try (RemoteClusterService service = new RemoteClusterService (statelessEnabledOnRemoteClusterClientSettings , null )) {
14641464 service .ensureClientIsEnabled ();
14651465 }
1466+ final var statelessEnabledOnSearchNodeAndRemoteClusterClientSettings = Settings .builder ()
1467+ .put (nodeNameSettings )
1468+ .put (onlyRoles (Set .of (DiscoveryNodeRole .SEARCH_ROLE , DiscoveryNodeRole .REMOTE_CLUSTER_CLIENT_ROLE )))
1469+ .put (DiscoveryNode .STATELESS_ENABLED_SETTING_NAME , true )
1470+ .build ();
1471+ try (RemoteClusterService service = new RemoteClusterService (statelessEnabledOnSearchNodeAndRemoteClusterClientSettings , null )) {
1472+ service .ensureClientIsEnabled ();
1473+ }
14661474 }
14671475
14681476 public void testRemoteClusterServiceNotEnabledGetCollectNodes () {
You can’t perform that action at this time.
0 commit comments