small variables renaming in AbstractJsonRpcTest (#4308)

Signed-off-by: Pedro Novais <jpvnovais@gmail.com>

Signed-off-by: Pedro Novais <jpvnovais@gmail.com>
Co-authored-by: Sally MacFarlane <sally.macfarlane@consensys.net>
pull/4309/head
Pedro Novais 2 years ago committed by GitHub
parent 4622cf6820
commit 44987b0bea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 18
      acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/AbstractJsonRpcTest.java
  2. 2
      acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/ExecutionEngineAcceptanceTest.java

@ -45,16 +45,16 @@ abstract class AbstractJsonRpcTest {
static class JsonRpcTestsContext {
final Cluster cluster;
final BesuNode executionEngine;
final OkHttpClient consensusClient;
final BesuNode besuNode;
final OkHttpClient httpClient;
final ObjectMapper mapper;
public JsonRpcTestsContext(final String genesisFile) throws IOException {
cluster = new Cluster(new NetConditions(new NetTransactions()));
executionEngine =
besuNode =
new BesuNodeFactory().createExecutionEngineGenesisNode("executionEngine", genesisFile);
cluster.start(executionEngine);
consensusClient = new OkHttpClient();
cluster.start(besuNode);
httpClient = new OkHttpClient();
mapper = new ObjectMapper();
}
@ -78,13 +78,13 @@ abstract class AbstractJsonRpcTest {
final JsonRpcTestCase testCase =
testsContext.mapper.readValue(testCaseFileURI.toURL(), JsonRpcTestCase.class);
final Call preparePayloadRequest =
testsContext.consensusClient.newCall(
final Call testRequest =
testsContext.httpClient.newCall(
new Request.Builder()
.url(testsContext.executionEngine.engineRpcUrl().get())
.url(testsContext.besuNode.engineRpcUrl().get())
.post(RequestBody.create(testCase.getRequest().toString(), MEDIA_TYPE_JSON))
.build());
final Response response = preparePayloadRequest.execute();
final Response response = testRequest.execute();
assertThat(response.code()).isEqualTo(testCase.getStatusCode());
assertThat(response.body().string()).isEqualTo(testCase.getResponse().toPrettyString());

@ -41,7 +41,7 @@ public class ExecutionEngineAcceptanceTest extends AbstractJsonRpcTest {
@Parameterized.Parameters(name = "{0}")
public static Iterable<Object[]> testCases() throws URISyntaxException {
return AbstractJsonRpcTest.testCases(TEST_CASE_PATH);
return testCases(TEST_CASE_PATH);
}
@AfterClass

Loading…
Cancel
Save