mirror of
https://github.com/XRPLF/clio.git
synced 2025-12-03 01:55:54 +00:00
fix: Fix GCC 15 discovered bugs (#2425)
This commit is contained in:
@@ -45,7 +45,12 @@ TEST_F(AmendmentBlockHandlerTest, CallTonotifyAmendmentBlockedSetsStateAndRepeat
|
||||
handler.notifyAmendmentBlocked();
|
||||
EXPECT_TRUE(state.isAmendmentBlocked);
|
||||
|
||||
// Code runs significantly slower when assertions are enabled
|
||||
#ifdef _GLIBCXX_ASSERTIONS
|
||||
runContextFor(std::chrono::milliseconds{10});
|
||||
#else
|
||||
runContextFor(std::chrono::milliseconds{1});
|
||||
#endif
|
||||
}
|
||||
|
||||
struct DefaultAmendmentBlockActionTest : LoggerFixture {};
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#include "data/Types.hpp"
|
||||
#include "rpc/Errors.hpp"
|
||||
#include "rpc/common/impl/ForwardingProxy.hpp"
|
||||
#include "util/HandlerBaseTestFixture.hpp"
|
||||
@@ -282,10 +283,17 @@ TEST_P(ShouldForwardParameterTest, Test)
|
||||
EXPECT_CALL(*rawHandlerProviderPtr, isClioOnly(method)).Times(testBundle.called);
|
||||
|
||||
runSpawn([&](auto yield) {
|
||||
auto const range = backend_->fetchLedgerRange();
|
||||
auto const ctx = web::Context(
|
||||
yield, method, apiVersion, params.as_object(), nullptr, tagFactory_, *range, kCLIENT_IP, testBundle.isAdmin
|
||||
);
|
||||
auto const ctx = web::Context{
|
||||
yield,
|
||||
method,
|
||||
apiVersion,
|
||||
params.as_object(),
|
||||
nullptr,
|
||||
tagFactory_,
|
||||
data::LedgerRange{},
|
||||
kCLIENT_IP,
|
||||
testBundle.isAdmin,
|
||||
};
|
||||
|
||||
auto const res = proxy_.shouldForward(ctx);
|
||||
ASSERT_EQ(res, testBundle.expected);
|
||||
@@ -311,9 +319,17 @@ TEST_F(RPCForwardingProxyTest, ForwardCallsBalancerWithCorrectParams)
|
||||
EXPECT_CALL(counters_, rpcForwarded(method));
|
||||
|
||||
runSpawn([&](auto yield) {
|
||||
auto const range = backend_->fetchLedgerRange();
|
||||
auto const ctx =
|
||||
web::Context(yield, method, apiVersion, params.as_object(), nullptr, tagFactory_, *range, kCLIENT_IP, true);
|
||||
auto const ctx = web::Context{
|
||||
yield,
|
||||
method,
|
||||
apiVersion,
|
||||
params.as_object(),
|
||||
nullptr,
|
||||
tagFactory_,
|
||||
data::LedgerRange{},
|
||||
kCLIENT_IP,
|
||||
true,
|
||||
};
|
||||
|
||||
auto const res = proxy_.forward(ctx);
|
||||
|
||||
@@ -340,9 +356,17 @@ TEST_F(RPCForwardingProxyTest, ForwardingFailYieldsErrorStatus)
|
||||
EXPECT_CALL(counters_, rpcFailedToForward(method));
|
||||
|
||||
runSpawn([&](auto yield) {
|
||||
auto const range = backend_->fetchLedgerRange();
|
||||
auto const ctx =
|
||||
web::Context(yield, method, apiVersion, params.as_object(), nullptr, tagFactory_, *range, kCLIENT_IP, true);
|
||||
auto const ctx = web::Context{
|
||||
yield,
|
||||
method,
|
||||
apiVersion,
|
||||
params.as_object(),
|
||||
nullptr,
|
||||
tagFactory_,
|
||||
data::LedgerRange{},
|
||||
kCLIENT_IP,
|
||||
true,
|
||||
};
|
||||
|
||||
auto const res = proxy_.forward(ctx);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user