Skip to content

Fix inference operator circuit breaker tests#136870

Merged
afoucret merged 5 commits intoelastic:mainfrom
afoucret:fix-inference-operator-circuit-breaker-tests
Oct 21, 2025
Merged

Fix inference operator circuit breaker tests#136870
afoucret merged 5 commits intoelastic:mainfrom
afoucret:fix-inference-operator-circuit-breaker-tests

Conversation

@afoucret afoucret added >test Issues or PRs that are addressing/adding tests :Search Relevance/ES|QL Search functionality in ES|QL labels Oct 21, 2025
@elasticsearchmachine elasticsearchmachine added v9.3.0 Team:Search Relevance Meta label for the Search Relevance team in Elasticsearch labels Oct 21, 2025
@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-search-relevance (Team:Search Relevance)

});
}

private void runWithRandomDelay(Runnable runnable) {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previous implementation of runWithDelay was not really realistic:

  • It was not always adding a delay which is never the case
  • it was using the generic threadpool that can be saturated with inference request. Using a separate threadpool to execute inference looks more like the real implenentaion

}

@Override
protected int largeInputSize() {
Copy link
Copy Markdown
Contributor Author

@afoucret afoucret Oct 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Set the size of large between 100 and 1000 which is more realistic for inference operation.
Veru big size like 10000 can create timeout that might make the CI flaky.

Comment on lines +72 to +87
assertSimple(driverContext(), smallInputSize());
}

protected int smallInputSize() {
return randomIntBetween(1, 100);
}

/**
* Test a larger input set against {@link #simple}.
*/
public final void testSimpleLargeInput() {
assertSimple(driverContext(), between(1_000, 10_000));
assertSimple(driverContext(), largeInputSize());
}

protected int largeInputSize() {
return randomIntBetween(1_000, 10_000);
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Making size of small and large input configurable for operator tests. Kept the same default.

Copy link
Copy Markdown
Member

@carlosdelest carlosdelest left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@afoucret afoucret enabled auto-merge (squash) October 21, 2025 14:09
@afoucret afoucret merged commit d8ae9ae into elastic:main Oct 21, 2025
34 checks passed
afoucret pushed a commit to afoucret/elasticsearch that referenced this pull request Oct 22, 2025
afoucret added a commit that referenced this pull request Oct 22, 2025
chrisparrinello pushed a commit to chrisparrinello/elasticsearch that referenced this pull request Oct 24, 2025
fzowl pushed a commit to voyage-ai/elasticsearch that referenced this pull request Nov 3, 2025
fzowl pushed a commit to voyage-ai/elasticsearch that referenced this pull request Nov 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Search Relevance/ES|QL Search functionality in ES|QL Team:Search Relevance Meta label for the Search Relevance team in Elasticsearch >test Issues or PRs that are addressing/adding tests v9.3.0

Projects

None yet

4 participants