mirror of
https://github.com/nushell/nushell.git
synced 2025-08-10 05:58:13 +02:00
Shorten --max-time in tests and use a more stable error check (#14494)
- fixes flakey tests from solving #14241 # Description This is a preliminary fix for the flaky tests and also shortened the `--max-time` in the tests. # User-Facing Changes <!-- List of all changes that impact the user experience here. This helps us keep track of breaking changes. --> --------- Signed-off-by: Alex Kattathra Johnson <alex.kattathra.johnson@gmail.com>
This commit is contained in:
committed by
GitHub
parent
81d68cd478
commit
cda9ae1e42
@ -1544,8 +1544,8 @@ impl From<io::Error> for ShellError {
|
||||
impl From<Spanned<io::Error>> for ShellError {
|
||||
fn from(error: Spanned<io::Error>) -> Self {
|
||||
let Spanned { item: error, span } = error;
|
||||
if error.kind() == io::ErrorKind::Other {
|
||||
match error.into_inner() {
|
||||
match error.kind() {
|
||||
io::ErrorKind::Other => match error.into_inner() {
|
||||
Some(err) => match err.downcast() {
|
||||
Ok(err) => *err,
|
||||
Err(err) => Self::IOErrorSpanned {
|
||||
@ -1557,12 +1557,15 @@ impl From<Spanned<io::Error>> for ShellError {
|
||||
msg: "unknown error".into(),
|
||||
span,
|
||||
},
|
||||
}
|
||||
} else {
|
||||
Self::IOErrorSpanned {
|
||||
},
|
||||
io::ErrorKind::TimedOut => Self::NetworkFailure {
|
||||
msg: error.to_string(),
|
||||
span,
|
||||
}
|
||||
},
|
||||
_ => Self::IOErrorSpanned {
|
||||
msg: error.to_string(),
|
||||
span,
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user