More TestValidator cleanup
This commit is contained in:
committed by
mergify[bot]
parent
b5f7e39be8
commit
43b82b31e5
@ -1,23 +1,15 @@
|
||||
use solana_client::rpc_client::RpcClient;
|
||||
use solana_core::test_validator::TestValidator;
|
||||
use solana_tokens::commands::test_process_distribute_tokens_with_client;
|
||||
use std::fs::remove_dir_all;
|
||||
|
||||
#[test]
|
||||
fn test_process_distribute_with_rpc_client() {
|
||||
solana_logger::setup();
|
||||
let TestValidator {
|
||||
server,
|
||||
leader_data,
|
||||
alice,
|
||||
ledger_path,
|
||||
..
|
||||
} = TestValidator::with_no_fee();
|
||||
|
||||
let client = RpcClient::new_socket(leader_data.rpc);
|
||||
test_process_distribute_tokens_with_client(&client, alice, None);
|
||||
let test_validator = TestValidator::with_no_fees();
|
||||
|
||||
// Explicit cleanup, otherwise "pure virtual method called" crash in Docker
|
||||
server.close().unwrap();
|
||||
remove_dir_all(ledger_path).unwrap();
|
||||
let client = RpcClient::new(test_validator.rpc_url());
|
||||
test_process_distribute_tokens_with_client(&client, test_validator.mint_keypair(), None);
|
||||
|
||||
test_validator.close();
|
||||
}
|
||||
|
Reference in New Issue
Block a user