Conversation
Collaborator
|
Please change the base of this PR to |
Collaborator
|
I assume this fails because we are sending too many requests at once to the faucet URL. Instead we could just have one faucet wallet for testing the transactions which we initialize only once using static CLIENT: tokio::sync::OnceCell<AsyncJsonRpcClient> = tokio::sync::OnceCell::const_new();
static WALLET: tokio::sync::OnceCell<Wallet> = tokio::sync::OnceCell::const_new();
async fn get_client() -> &'static AsyncJsonRpcClient {
CLIENT
.get_or_init(|| async {
AsyncJsonRpcClient::connect(Url::parse(XRPL_TEST_NET).unwrap())
})
.await
}
async fn get_wallet() -> &'static Wallet {
WALLET
.get_or_init(|| async {
generate_faucet_wallet(get_client().await, None, None, None, None)
.await
.expect("Failed to generate and fund wallet")
})
.await
}Then we would have the problem, as the tests run all at once and are using the same wallet, causing the transaction all to use the same sequence. So we would maybe need a central function to call and await all these transaction tests like so: #[tokio::test]
async fn test_transactions() {
test_account_set_transaction().await;
test_offer_create_transaction().await;
test_transaction_with_memo().await;
test_trust_set_transaction().await;
test_offer_cancel_transaction().await;
} |
…. now we just skip those.
…. now we just skip those.
…o always have the SigningPubKey field
LimpidCrypto
approved these changes
Feb 26, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
High Level Overview of Change
Adds integration tests.
Context of Change
Adds integration tests that connect to the XRPL testnets. Additionally, fixes NFT support which was broken.
Type of Change
Test Plan
Integration tests added.