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
4 changes: 4 additions & 0 deletions tests/unix/ConnectionFailTest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ class ConnectionFailTest : public ::testing::TestWithParam<int> {
struct rlimit limit;
ASSERT_EQ(getrlimit(RLIMIT_NOFILE, &limit), 0);
maxFdCount_ = limit.rlim_max;
// The previous test leaves the soft fd limit lowered, which could make the HTTP request below fail
// to open a socket. Restore it before creating the topic.
limit.rlim_cur = limit.rlim_max;
ASSERT_EQ(setrlimit(RLIMIT_NOFILE, &limit), 0);
int numPartitions = GetParam();
topic_ = "test-connection-fail-" + std::to_string(numPartitions) + std::to_string(time(nullptr));
if (numPartitions > 0) {
Expand Down
Loading