Impl PartialEq on ServerError for tests
Co-authored-by: acatangiu <adrian@parity.io> Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
This commit is contained in:
committed by
Jonathan Woollett-Light
parent
3c5d9407d3
commit
73f37d0797
@@ -1151,11 +1151,11 @@ mod tests {
|
||||
handler.join().unwrap();
|
||||
|
||||
// Expect shutdown event instead of http request event.
|
||||
match &*request_result.lock().unwrap() {
|
||||
Err(ServerError::ShutdownEvent) => (),
|
||||
v => {
|
||||
panic!("Expected shutdown event, instead got {:?}.", v)
|
||||
}
|
||||
};
|
||||
let res = request_result.lock().unwrap();
|
||||
assert_eq!(
|
||||
res.as_ref().unwrap_err(),
|
||||
&ServerError::ShutdownEvent,
|
||||
"Expected shutdown event, instead got {res:?}"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user