mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Refactor Env for AbstractClient:
Env is changed to use the AbstractClient interface, which generalizes the transport for submitting client requests to the Env server instance. The JSONRPCClient implementation is added, supporting a simple, synchronous interface. Env is changed to use the JSONRPCClient implementation instead of the built in JSON-RPC client.
This commit is contained in:
committed by
Nik Bougalis
parent
f9f2b8124d
commit
040d7ebb46
@@ -74,13 +74,11 @@ struct Transaction_ordering_test : public beast::unit_test::suite
|
||||
|
||||
{
|
||||
auto const result = env.rpc("tx", to_string(tx1.stx->getTransactionID()));
|
||||
expect(result.first == rpcSUCCESS);
|
||||
expect(result.second["result"]["meta"]["TransactionResult"] == "tesSUCCESS");
|
||||
expect(result["result"]["meta"]["TransactionResult"] == "tesSUCCESS");
|
||||
}
|
||||
{
|
||||
auto const result = env.rpc("tx", to_string(tx2.stx->getTransactionID()));
|
||||
expect(result.first == rpcSUCCESS);
|
||||
expect(result.second["result"]["meta"]["TransactionResult"] == "tesSUCCESS");
|
||||
expect(result["result"]["meta"]["TransactionResult"] == "tesSUCCESS");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -112,13 +110,11 @@ struct Transaction_ordering_test : public beast::unit_test::suite
|
||||
|
||||
{
|
||||
auto const result = env.rpc("tx", to_string(tx1.stx->getTransactionID()));
|
||||
expect(result.first == rpcSUCCESS);
|
||||
expect(result.second["result"]["meta"]["TransactionResult"] == "tesSUCCESS");
|
||||
expect(result["result"]["meta"]["TransactionResult"] == "tesSUCCESS");
|
||||
}
|
||||
{
|
||||
auto const result = env.rpc("tx", to_string(tx2.stx->getTransactionID()));
|
||||
expect(result.first == rpcSUCCESS);
|
||||
expect(result.second["result"]["meta"]["TransactionResult"] == "tesSUCCESS");
|
||||
expect(result["result"]["meta"]["TransactionResult"] == "tesSUCCESS");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -160,8 +156,7 @@ struct Transaction_ordering_test : public beast::unit_test::suite
|
||||
for (auto i = 0; i < 5; ++i)
|
||||
{
|
||||
auto const result = env.rpc("tx", to_string(tx[i].stx->getTransactionID()));
|
||||
expect(result.first == rpcSUCCESS);
|
||||
expect(result.second["result"]["meta"]["TransactionResult"] == "tesSUCCESS");
|
||||
expect(result["result"]["meta"]["TransactionResult"] == "tesSUCCESS");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user