mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 18:07:58 +00:00
Try to fix flaky temp-base-path-work test (#13505)
* Try to fix flaky `temp-base-path-work` test The test is most of the time failing when checking if the database path was deleted. The assumption is that it takes a little bit more time by the OS to actually clean up the temp path under high load. The pr tries to fix this by checking multiple times if the path was deleted. Besides that it also ensures that the tests that require the benchmark feature don't fail when compiled without the feature. * ".git/.scripts/commands/fmt/fmt.sh" * Capture signals earlier * Rewrite tests to let them having one big timeout * Remove unneeded dep * Update bin/node/cli/tests/common.rs Co-authored-by: Koute <koute@users.noreply.github.com> * Review feedback * Update bin/node/cli/tests/common.rs Co-authored-by: Anton <anton.kalyaev@gmail.com> --------- Co-authored-by: command-bot <> Co-authored-by: Koute <koute@users.noreply.github.com> Co-authored-by: Anton <anton.kalyaev@gmail.com>
This commit is contained in:
@@ -197,10 +197,15 @@ pub trait SubstrateCli: Sized {
|
||||
command: &T,
|
||||
) -> error::Result<Runner<Self>> {
|
||||
let tokio_runtime = build_runtime()?;
|
||||
|
||||
// `capture` needs to be called in a tokio context.
|
||||
// Also capture them as early as possible.
|
||||
let signals = tokio_runtime.block_on(async { Signals::capture() })?;
|
||||
|
||||
let config = command.create_configuration(self, tokio_runtime.handle().clone())?;
|
||||
|
||||
command.init(&Self::support_url(), &Self::impl_version(), |_, _| {}, &config)?;
|
||||
Runner::new(config, tokio_runtime)
|
||||
Runner::new(config, tokio_runtime, signals)
|
||||
}
|
||||
|
||||
/// Create a runner for the command provided in argument. The `logger_hook` can be used to setup
|
||||
@@ -231,10 +236,15 @@ pub trait SubstrateCli: Sized {
|
||||
F: FnOnce(&mut LoggerBuilder, &Configuration),
|
||||
{
|
||||
let tokio_runtime = build_runtime()?;
|
||||
|
||||
// `capture` needs to be called in a tokio context.
|
||||
// Also capture them as early as possible.
|
||||
let signals = tokio_runtime.block_on(async { Signals::capture() })?;
|
||||
|
||||
let config = command.create_configuration(self, tokio_runtime.handle().clone())?;
|
||||
|
||||
command.init(&Self::support_url(), &Self::impl_version(), logger_hook, &config)?;
|
||||
Runner::new(config, tokio_runtime)
|
||||
Runner::new(config, tokio_runtime, signals)
|
||||
}
|
||||
/// Native runtime version.
|
||||
fn native_runtime_version(chain_spec: &Box<dyn ChainSpec>) -> &'static RuntimeVersion;
|
||||
|
||||
Reference in New Issue
Block a user