Skip to content

Commit d51e139

Browse files
Fix flaky proptest (Azure#4539)
It looks like that in prev version of regex it is possible that `.*` can eval into a digit, which in turn will lead to a valid input :) ``` ".*[0-9]{9}.*(k|K|m|M|g|G)?.*" ```
1 parent a526d63 commit d51e139

File tree

1 file changed

+1
-1
lines changed
  • mqtt/mqtt-broker/src/settings

1 file changed

+1
-1
lines changed

mqtt/mqtt-broker/src/settings/size.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ mod tests {
257257
}
258258

259259
#[test]
260-
fn it_cannot_parse_input(input in r".*[0-9]{9}.*(k|K|m|M|g|G)?.*") {
260+
fn it_cannot_parse_input(input in r"[^0-9]+[0-9]{9}[^0-9]+(k|K|m|M|g|G)?.*") {
261261
let size = input.parse::<HumanSize>();
262262
prop_assert!(size.is_err())
263263
}

0 commit comments

Comments
 (0)