Skip to content

Commit ee8f7cb

Browse files
jpatonmeta-codesync[bot]
authored andcommitted
Increase client timeout and disable queue timeout for conformance tests
Summary: Fix flaky Erlang Thrift conformance tests (`fbcode//thrift/conformance/test/rpc/erlang:rpc-client-test`) which have 75-95% flakiness rates due to two issues: 1. Client timeout too short: The Erlang BEAM VM, started via a dotslash/MSDK binary, takes longer than 10 seconds to boot in Sandcastle CI. This causes the test harness to give up before the client connects. Increase the non-sanitizer kClientTimeout from 10s to 30s. Passing tests complete in 1.5-3s, so 30s gives plenty of margin. 2. Queue timeout triggering load shedding: The conformance test server default 100ms queue timeout rejects the Erlang client RPC with a load shedding error (QUEUE_TIMEOUT). Disable queue timeout in the test server by calling server.setQueueTimeout(std::chrono::milliseconds(0)) - test environments should never reject clients due to load shedding. Reviewed By: iahs Differential Revision: D109872927 fbshipit-source-id: 9020e2934edfbe427ae29a763c685b2dd43cd147
1 parent 3751dd9 commit ee8f7cb

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎thrift/conformance/rpcclient/GTestHarnessRPCClient.cpp‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
__has_feature(thread_sanitizer) || defined(__SANITIZE_THREAD__)
2727
constexpr auto kClientTimeout = std::chrono::seconds(60);
2828
#else
29-
constexpr auto kClientTimeout = std::chrono::seconds(10);
29+
constexpr auto kClientTimeout = std::chrono::seconds(30);
3030
#endif
3131

3232
#include <fmt/core.h>
@@ -588,6 +588,10 @@ class RPCClientConformanceTest : public testing::Test {
588588
if (connectViaServer) {
589589
std::ignore = update_server_props_(server);
590590
}
591+
// Disable queue timeout for conformance tests. Test clients
592+
// (especially Erlang/BEAM VM) may be slow to start and should
593+
// never be rejected by load shedding in a test environment.
594+
server.setQueueTimeout(std::chrono::milliseconds(0));
591595
})),
592596
connectViaServer_(connectViaServer) {
593597
try {

0 commit comments

Comments
 (0)