Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix faucet timeout in long faucet chain test #2721

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions linera-service/src/cli_wrappers/wallet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -709,6 +709,16 @@ impl ClientWrapper {
Ok(())
}

/// Runs `linera wallet forget-chain CHAIN_ID`.
pub async fn forget_chain(&self, chain_id: ChainId) -> Result<()> {
let mut command = self.command().await?;
command
.args(["wallet", "forget-chain"])
.arg(chain_id.to_string());
command.spawn_and_wait_for_stdout().await?;
Ok(())
}

pub async fn retry_pending_block(
&self,
chain_id: Option<ChainId>,
Expand Down
3 changes: 2 additions & 1 deletion linera-service/tests/linera_net_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2867,9 +2867,10 @@ async fn test_end_to_end_faucet_with_long_chains(config: impl LineraNetConfig) -

// Use the faucet directly to initialize many chains
for _ in 0..chain_count {
faucet_client
let (_, new_chain_id) = faucet_client
.open_chain(faucet_chain, None, Amount::ONE)
afck marked this conversation as resolved.
Show resolved Hide resolved
.await?;
faucet_client.forget_chain(new_chain_id).await?;
}

let amount = Amount::ONE;
Expand Down
Loading