|
@@ -143,6 +143,11 @@ public:
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
+ static int GetMaxSimultaneousRequestCount()
|
|
|
+ {
|
|
|
+ return TImpl::MaxSimultaneousRequestCount;
|
|
|
+ }
|
|
|
+
|
|
|
private:
|
|
|
NConcurrency::IThreadPoolPtr WorkerPool_;
|
|
|
TTestNodeMemoryTrackerPtr MemoryUsageTracker_;
|
|
@@ -158,6 +163,7 @@ class TRpcOverBus
|
|
|
public:
|
|
|
static constexpr bool AllowTransportErrors = false;
|
|
|
static constexpr bool Secure = false;
|
|
|
+ static constexpr int MaxSimultaneousRequestCount = 1000;
|
|
|
|
|
|
static TTestServerHostPtr CreateTestServerHost(
|
|
|
NTesting::TPortHolder port,
|
|
@@ -361,6 +367,7 @@ class TRpcOverGrpcImpl
|
|
|
public:
|
|
|
static constexpr bool AllowTransportErrors = true;
|
|
|
static constexpr bool Secure = EnableSsl;
|
|
|
+ static constexpr int MaxSimultaneousRequestCount = 1000;
|
|
|
|
|
|
static IChannelPtr CreateChannel(
|
|
|
const std::string& address,
|
|
@@ -467,6 +474,10 @@ public:
|
|
|
// TODO(melkov): Fill ssl_credentials_ext in server code and enable the Secure flag.
|
|
|
static constexpr bool Secure = false;
|
|
|
|
|
|
+ // HTTP will use at least two file descriptors per test connection.
|
|
|
+ // Allow tests to run when the limit for the file descriptors is low.
|
|
|
+ static constexpr int MaxSimultaneousRequestCount = 400;
|
|
|
+
|
|
|
static IChannelPtr CreateChannel(
|
|
|
const std::string& address,
|
|
|
const std::string& /*serverAddress*/,
|
|
@@ -475,9 +486,9 @@ public:
|
|
|
static auto poller = NConcurrency::CreateThreadPoolPoller(4, "HttpChannelTest");
|
|
|
auto credentials = New<NHttps::TClientCredentialsConfig>();
|
|
|
credentials->PrivateKey = New<NCrypto::TPemBlobConfig>();
|
|
|
- credentials->PrivateKey->Value = ServerKey;
|
|
|
+ credentials->PrivateKey->Value = ClientKey;
|
|
|
credentials->CertChain = New<NCrypto::TPemBlobConfig>();
|
|
|
- credentials->CertChain->Value = ServerCert;
|
|
|
+ credentials->CertChain->Value = ClientCert;
|
|
|
return NHttp::CreateHttpChannel(address, poller, EnableSsl, credentials);
|
|
|
}
|
|
|
|