Skip to content

Commit

Permalink
#1870 improve tests
Browse files Browse the repository at this point in the history
  • Loading branch information
olehnikolaiev committed Feb 5, 2025
1 parent a9ce394 commit 54fbcc0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions test/unittests/libweb3jsonrpc/jsonrpc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -396,20 +396,22 @@ struct JsonRpcFixture : public TestOutputHelperFixture {

sleep( 1 );

auto httpClient = new jsonrpc::HttpClient(
httpClient = new jsonrpc::HttpClient(
"http://" + chainParams.nodeInfo.ip + ":" +
std::to_string( serverOpts.netOpts_.bindOptsStandard_.nBasePortHTTP4_ ) );
httpClient->SetTimeout( 1000000000 );

rpcClient = unique_ptr< WebThreeStubClient >( new WebThreeStubClient( *httpClient ) );


BOOST_TEST_MESSAGE( "Constructed JsonRpcFixture" );
}

~JsonRpcFixture() {
if ( skale_server_connector )
skale_server_connector->StopListening();

if ( httpClient )
delete httpClient;
BOOST_TEST_MESSAGE( "Destructed JsonRpcFixture" );
}

Expand Down Expand Up @@ -447,6 +449,7 @@ struct JsonRpcFixture : public TestOutputHelperFixture {
unique_ptr< WebThreeStubClient > rpcClient;
std::string adminSession;
SkaleServerOverride* skale_server_connector;
jsonrpc::HttpClient* httpClient;
time_t powPatchActivationTimestamp;
time_t push0PatchActivationTimestamp;
};
Expand Down

0 comments on commit 54fbcc0

Please sign in to comment.