mirror of
https://github.com/mhx/dwarfs.git
synced 2025-09-10 21:10:02 -04:00
fix(tools_test): retry fusermount when it occasionally fails
This commit is contained in:
parent
9f0cf82a09
commit
efb5995a20
@ -645,7 +645,14 @@ class driver_runner {
|
|||||||
return is_expected_exit_code;
|
return is_expected_exit_code;
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
} else {
|
} else {
|
||||||
subprocess::check_run(find_fusermount(), "-u", mountpoint_);
|
auto fusermount = find_fusermount();
|
||||||
|
for (int i = 0; i < 5; ++i) {
|
||||||
|
if (subprocess::check_run(fusermount, "-u", mountpoint_)) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
std::cerr << "retrying fusermount...\n";
|
||||||
|
std::this_thread::sleep_for(std::chrono::milliseconds(200));
|
||||||
|
}
|
||||||
mountpoint_.clear();
|
mountpoint_.clear();
|
||||||
return dwarfs_guard_.check_exit(std::chrono::seconds(5));
|
return dwarfs_guard_.check_exit(std::chrono::seconds(5));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user