Skip to content

Commit

Permalink
Fix shutdown_timeout serialization
Browse files Browse the repository at this point in the history
Signed-off-by: David McNeil <mcneil.david2@gmail.com>
  • Loading branch information
davidMcneil committed Jun 6, 2019
1 parent 369ed1a commit ec04702
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion components/core/src/os/process/mod.rs
Expand Up @@ -41,7 +41,8 @@ use time::Duration;
/// around, and turn it into a `time::Duration` at the last possible
/// moment.)
#[derive(Deserialize, Serialize, Eq, PartialEq, Debug, Clone, Copy, Hash)]
pub struct ShutdownTimeout(#[serde(with = "serde_string")] u32);
#[serde(from = "u32")]
pub struct ShutdownTimeout(u32);

impl Default for ShutdownTimeout {
/// Unless otherwise specified, the Supervisor will wait 8 seconds
Expand Down
2 changes: 1 addition & 1 deletion components/sup/src/manager/service/spec.rs
Expand Up @@ -447,7 +447,7 @@ mod test {
assert!(toml.contains(r#"[health_check_interval]"#));
assert!(toml.contains(r#"secs = 123"#));
assert!(toml.contains(r#"nanos = 0"#));
assert!(toml.contains(r#"shutdown_timeout = "10""#));
assert!(toml.contains(r#"shutdown_timeout = 10"#));
}

#[test]
Expand Down

0 comments on commit ec04702

Please sign in to comment.