0.32.7
This commit is contained in:
1 parent
1b9135117c
commit
4f36de240c
32 files changed
+1175
-704
No files matched your search
@@ -571,3 +571,28 @@ mod authority_tests {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod graceful_h2_tests {
|
||||
use super::*;
|
||||
use std::fmt;
|
||||
|
||||
#[derive(Debug)]
|
||||
struct H2DebugError(&'static str);
|
||||
impl fmt::Display for H2DebugError {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
write!(f, "client error (SendRequest): {}", self.0)
|
||||
}
|
||||
}
|
||||
impl std::error::Error for H2DebugError {}
|
||||
|
||||
#[test]
|
||||
fn only_graceful_remote_h2_goaway_is_neutral() {
|
||||
let valid = H2DebugError("GoAway(b\"\", NO_ERROR, Remote)");
|
||||
let protocol = H2DebugError("GoAway(b\"\", PROTOCOL_ERROR, Remote)");
|
||||
let local = H2DebugError("GoAway(b\"\", NO_ERROR, Local)");
|
||||
assert!(is_graceful_h2_goaway(&valid));
|
||||
assert!(!is_graceful_h2_goaway(&protocol));
|
||||
assert!(!is_graceful_h2_goaway(&local));
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user