Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import static org.hamcrest.Matchers.endsWith;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.greaterThan;
import static org.hamcrest.Matchers.hasItemInArray;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.oneOf;

Expand Down Expand Up @@ -74,6 +75,9 @@ public class CrossClusterEsqlRCS1EnrichUnavailableRemotesIT extends AbstractRemo

private final String[] modes = { "_coordinator", "_remote" };

// These are the IDs used in the test data in setSourceData().
private final Integer[] employeeIDs = { 1, 2, 3, 4, 5, 6 };

@Before
public void setupPreRequisites() throws IOException {
setupRolesAndPrivileges();
Expand Down Expand Up @@ -121,7 +125,7 @@ private void esqlEnrichWithRandomSkipUnavailable() throws Exception {
// Email
assertThat(info.apply("email was: " + value.get(0)), (String) value.get(0), endsWith("@corp.co"));
// ID
assertThat(info.apply("id"), value.get(1), is(i + 1));
assertThat(info.apply("id"), employeeIDs, hasItemInArray((int) value.get(1)));
}

assertThat(info.apply("total clusters"), (int) clusters.get("total"), is(2));
Expand Down Expand Up @@ -170,7 +174,7 @@ private void esqlEnrichWithSkipUnavailableTrue() throws Exception {
// Email
assertThat(info.apply("email was: " + value.get(0)), (String) value.get(0), endsWith("@corp.co"));
// ID
assertThat(info.apply("id"), value.get(1), is(i + 1));
assertThat(info.apply("id"), employeeIDs, hasItemInArray((int) value.get(1)));
}

assertThat(info.apply("total clusters"), (int) clusters.get("total"), is(2));
Expand Down