Fix compilation in RemoteClusterServiceTests

This commit fixes an issue when a JDK collection convenience method not
available in JDK 8 was backported to 7.x.
This commit is contained in:
Jason Tedor 2020-03-23 18:40:36 -04:00
parent e225f08613
commit 5c96a7e210
No known key found for this signature in database
GPG Key ID: FA89F05560F16BC5
1 changed files with 1 additions and 2 deletions

View File

@ -42,7 +42,6 @@ import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
@ -869,7 +868,7 @@ public class RemoteClusterServiceTests extends ESTestCase {
service.acceptIncomingRequests();
final IllegalArgumentException e = expectThrows(
IllegalArgumentException.class,
() -> service.getRemoteClusterService().collectNodes(Set.of(), ActionListener.wrap(r -> {}, r -> {})));
() -> service.getRemoteClusterService().collectNodes(Collections.emptySet(), ActionListener.wrap(r -> {}, r -> {})));
assertThat(e.getMessage(), equalTo("remote cluster service is not enabled"));
}
}