tests/inst: Update tokio, hyper and nix
This commit is contained in:
parent
2628637a78
commit
4d9e6de46b
|
|
@ -22,11 +22,11 @@ gio = "0.9"
|
||||||
ostree = { version = "0.10.0", features = ["v2021_1"] }
|
ostree = { version = "0.10.0", features = ["v2021_1"] }
|
||||||
libtest-mimic = "0.3.0"
|
libtest-mimic = "0.3.0"
|
||||||
twoway = "0.2.1"
|
twoway = "0.2.1"
|
||||||
hyper = "0.13"
|
hyper = { version = "0.14", features = ["runtime", "http1", "http2", "tcp", "server"] }
|
||||||
|
hyper-staticfile = "0.6.0"
|
||||||
futures = "0.3.4"
|
futures = "0.3.4"
|
||||||
http = "0.2.0"
|
http = "0.2.0"
|
||||||
hyper-staticfile = "0.5.1"
|
tokio = { version = "1.4.0", features = ["full"] }
|
||||||
tokio = { version = "0.2", features = ["full"] }
|
|
||||||
futures-util = "0.3.1"
|
futures-util = "0.3.1"
|
||||||
base64 = "0.12.0"
|
base64 = "0.12.0"
|
||||||
procspawn = "0.8"
|
procspawn = "0.8"
|
||||||
|
|
@ -36,7 +36,7 @@ strum = "0.18.0"
|
||||||
strum_macros = "0.18.0"
|
strum_macros = "0.18.0"
|
||||||
openat = "0.1.19"
|
openat = "0.1.19"
|
||||||
openat-ext = "0.1.4"
|
openat-ext = "0.1.4"
|
||||||
nix = "0.17.0"
|
nix = "0.20.0"
|
||||||
# See discussion in https://github.com/coreos/rpm-ostree/pull/2569#issuecomment-780569188
|
# See discussion in https://github.com/coreos/rpm-ostree/pull/2569#issuecomment-780569188
|
||||||
rpmostree-client = { git = "https://github.com/coreos/rpm-ostree", tag = "v2021.3" }
|
rpmostree-client = { git = "https://github.com/coreos/rpm-ostree", tag = "v2021.3" }
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -208,12 +208,13 @@ fn upgrade_and_finalize() -> Result<()> {
|
||||||
|
|
||||||
async fn run_upgrade_or_timeout(timeout: time::Duration) -> Result<bool> {
|
async fn run_upgrade_or_timeout(timeout: time::Duration) -> Result<bool> {
|
||||||
let upgrade = tokio::task::spawn_blocking(upgrade_and_finalize);
|
let upgrade = tokio::task::spawn_blocking(upgrade_and_finalize);
|
||||||
|
tokio::pin!(upgrade);
|
||||||
Ok(tokio::select! {
|
Ok(tokio::select! {
|
||||||
res = upgrade => {
|
res = upgrade => {
|
||||||
let _res = res?;
|
let _res = res?;
|
||||||
true
|
true
|
||||||
},
|
},
|
||||||
_ = tokio::time::delay_for(timeout) => {
|
_ = tokio::time::sleep(timeout) => {
|
||||||
false
|
false
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
@ -383,7 +384,7 @@ fn impl_transaction_test<M: AsRef<str>>(
|
||||||
|
|
||||||
assert_ne!(commitstates.booted.as_str(), commitstates.target.as_str());
|
assert_ne!(commitstates.booted.as_str(), commitstates.target.as_str());
|
||||||
|
|
||||||
let mut rt = tokio::runtime::Runtime::new()?;
|
let rt = tokio::runtime::Runtime::new()?;
|
||||||
let cycle_time_ms = (tdata.cycle_time.as_secs_f64() * 1000f64 * FORCE_REBOOT_AFTER_MUL) as u64;
|
let cycle_time_ms = (tdata.cycle_time.as_secs_f64() * 1000f64 * FORCE_REBOOT_AFTER_MUL) as u64;
|
||||||
// Set when we're trying an interrupt strategy that isn't a reboot, so we will
|
// Set when we're trying an interrupt strategy that isn't a reboot, so we will
|
||||||
// re-enter the loop below.
|
// re-enter the loop below.
|
||||||
|
|
|
||||||
|
|
@ -158,7 +158,7 @@ where
|
||||||
F: Send + 'static,
|
F: Send + 'static,
|
||||||
{
|
{
|
||||||
let path = path.as_ref();
|
let path = path.as_ref();
|
||||||
let mut rt = Runtime::new()?;
|
let rt = Runtime::new()?;
|
||||||
rt.block_on(async move {
|
rt.block_on(async move {
|
||||||
let addr = http_server(path, *opts).await?;
|
let addr = http_server(path, *opts).await?;
|
||||||
tokio::task::spawn_blocking(move || f(&addr)).await?
|
tokio::task::spawn_blocking(move || f(&addr)).await?
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue