fix java9 compilation
This commit is contained in:
parent
99db391344
commit
c203cff692
|
@ -211,8 +211,10 @@ public class RecoverySourceHandlerTests extends ESTestCase {
|
||||||
assertThat(result.totalOperations, equalTo(expectedOps));
|
assertThat(result.totalOperations, equalTo(expectedOps));
|
||||||
final ArgumentCaptor<List> shippedOpsCaptor = ArgumentCaptor.forClass(List.class);
|
final ArgumentCaptor<List> shippedOpsCaptor = ArgumentCaptor.forClass(List.class);
|
||||||
verify(recoveryTarget).indexTranslogOperations(shippedOpsCaptor.capture(), ArgumentCaptor.forClass(Integer.class).capture());
|
verify(recoveryTarget).indexTranslogOperations(shippedOpsCaptor.capture(), ArgumentCaptor.forClass(Integer.class).capture());
|
||||||
List<Translog.Operation> shippedOps = shippedOpsCaptor.getAllValues().stream()
|
List<Translog.Operation> shippedOps = new ArrayList<>();
|
||||||
.flatMap(List::stream).map(o -> (Translog.Operation) o).collect(Collectors.toList());
|
for (List list: shippedOpsCaptor.getAllValues()) {
|
||||||
|
shippedOps.addAll(list);
|
||||||
|
}
|
||||||
shippedOps.sort(Comparator.comparing(Translog.Operation::seqNo));
|
shippedOps.sort(Comparator.comparing(Translog.Operation::seqNo));
|
||||||
assertThat(shippedOps.size(), equalTo(expectedOps));
|
assertThat(shippedOps.size(), equalTo(expectedOps));
|
||||||
for (int i = 0; i < shippedOps.size(); i++) {
|
for (int i = 0; i < shippedOps.size(); i++) {
|
||||||
|
|
Loading…
Reference in New Issue