mirror of
https://github.com/XRPLF/clio.git
synced 2026-09-27 23:48:08 +00:00
Remove test
This commit is contained in:
@@ -12,7 +12,6 @@
|
||||
|
||||
#include <algorithm>
|
||||
#include <chrono>
|
||||
#include <cstddef>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
@@ -84,38 +83,6 @@ TEST_F(ForwardingSourceOperationsTests, XUserHeader)
|
||||
});
|
||||
}
|
||||
|
||||
struct ForwardingSourceWriteFailedTests : SyncAsioContextTest {
|
||||
protected:
|
||||
static constexpr std::size_t kPayloadSize = 8 * 1024 * 1024;
|
||||
|
||||
TestWsServer server_{ctx_, "0.0.0.0"};
|
||||
ForwardingSource forwardingSource_{
|
||||
"127.0.0.1",
|
||||
server_.port(),
|
||||
std::chrono::milliseconds{10},
|
||||
std::chrono::milliseconds{20}
|
||||
};
|
||||
};
|
||||
|
||||
TEST_F(ForwardingSourceWriteFailedTests, WriteFailed)
|
||||
{
|
||||
TestWsConnectionPtr connection;
|
||||
util::spawn(ctx_, [&](boost::asio::yield_context yield) {
|
||||
server_.acceptConnection(yield);
|
||||
auto accepted = server_.acceptConnection(yield);
|
||||
[&]() { ASSERT_TRUE(accepted) << accepted.error().message(); }();
|
||||
connection = std::make_unique<TestWsConnection>(std::move(accepted).value());
|
||||
});
|
||||
|
||||
runSpawn([&](boost::asio::yield_context yield) {
|
||||
boost::json::object const request{{"data", std::string(kPayloadSize, 'x')}};
|
||||
auto result = forwardingSource_.forwardToRippled(request, {}, {}, yield);
|
||||
|
||||
ASSERT_FALSE(result);
|
||||
EXPECT_EQ(result.error(), rpc::ClioError::RpcForwardingRequestError);
|
||||
});
|
||||
}
|
||||
|
||||
TEST_F(ForwardingSourceOperationsTests, ReadFailed)
|
||||
{
|
||||
util::spawn(ctx_, [&](boost::asio::yield_context yield) {
|
||||
|
||||
Reference in New Issue
Block a user