Merge 'vector_search: test: fix HTTPS client test flakiness' from Karol Nowacki

The default 100ms timeout for client readiness in tests is too
aggressive. In some test environments, this is not enough time for
client creation, which involves address resolution and TLS certificate
reading, leading to flaky tests.

This commit increases the default client creation timeout to 10 seconds.
This makes the tests more robust, especially in slower execution
environments, and prevents similar flakiness in other test cases.

Fixes: VECTOR-547, SCYLLADB-802, SCYLLADB-825, SCYLLADB-826

Backport to 2025.4 and 2026.1, as the same problem occurs on these branches and can potentially make the CI flaky there as well.

Closes scylladb/scylladb#28846

* github.com:scylladb/scylladb:
  vector_search: test: include ANN error in assertion
  vector_search: test: fix HTTPS client test flakiness

(cherry picked from commit 2fb981413a)

Closes scylladb/scylladb#28879
This commit is contained in:
Piotr Dulikowski
2026-03-03 19:22:12 +01:00
parent 864774fb00
commit bf369326d6
2 changed files with 9 additions and 4 deletions

View File

@@ -8,6 +8,7 @@
#pragma once
#include "vector_search/vector_store_client.hh"
#include "utils.hh"
#include <seastar/core/future.hh>
#include <seastar/net/inet_address.hh>
#include <optional>
@@ -23,7 +24,7 @@ public:
explicit configure(::vector_search::vector_store_client& vs)
: vs_ref(vs) {
with_dns_refresh_interval(std::chrono::seconds(2));
with_wait_for_client_timeout(std::chrono::milliseconds(100));
with_wait_for_client_timeout(STANDARD_WAIT);
with_dns_resolver([](auto const& host) -> seastar::future<std::optional<seastar::net::inet_address>> {
co_return seastar::net::inet_address("127.0.0.1");
});

View File

@@ -283,7 +283,10 @@ SEASTAR_TEST_CASE(vector_store_client_test_ann_addr_unavailable) {
auto schema = co_await create_test_table(env, "ks", "vs");
auto as = abort_source_timeout();
auto& vs = env.local_qp().vector_store_client();
configure(vs).with_dns_refresh_interval(seconds(1)).with_dns({{"bad.authority.here", std::nullopt}});
configure(vs)
.with_dns_refresh_interval(seconds(1))
.with_dns({{"bad.authority.here", std::nullopt}})
.with_wait_for_client_timeout(milliseconds(100));
vs.start_background_tasks();
@@ -1008,8 +1011,9 @@ SEASTAR_TEST_CASE(vector_store_client_https) {
auto keys = co_await vs.ann("ks", "idx", schema, std::vector<float>{0.1, 0.2, 0.3}, 2, rjson::empty_object(), as.reset());
BOOST_CHECK(keys);
co_return;
if (!keys) {
BOOST_FAIL("Expected successful ANN result, but got error: " << std::visit(vector_search::error_visitor{}, keys.error()));
}
},
cfg)
.finally(seastar::coroutine::lambda([&] -> future<> {