Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
fuyufjh committed Sep 12, 2023
1 parent b7903f1 commit f40fa09
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/common/src/system_param/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -356,14 +356,15 @@ mod tests {
(BACKUP_STORAGE_DIRECTORY_KEY, "a"),
(MAX_CONCURRENT_CREATING_STREAMING_JOBS_KEY, "1"),
(PAUSE_ON_NEXT_BOOTSTRAP_KEY, "false"),
("a_deprecated_param", "foo"),
];

// To kv - missing field.
let p = PbSystemParams::default();
assert!(system_params_to_kv(&p).is_err());

// From kv - unrecognized field.
assert!(system_params_from_kv(vec![("?", "?")]).is_err());
// From kv - unrecognized field should be ignored
assert!(system_params_from_kv(vec![("?", "?")]).is_ok());

// Deser & ser.
let p = system_params_from_kv(kvs).unwrap();
Expand Down

0 comments on commit f40fa09

Please sign in to comment.