alamb opened a new pull request, #936: URL: https://github.com/apache/arrow-rs-object-store/pull/936
# Which issue does this PR close? - Related to #908 # Rationale for this change #908 replaces `humantime`, which parses and formats the duration config values (timeouts and similar). There is currently only one small test of that behavior, so it is hard to tell whether a replacement changes what strings are accepted or what `ClientOptions::get_config_value` returns. This PR adds tests of the current behavior on `main` so any change is visible in review. # What changes are included in this PR? Two new tests in `src/config.rs`, no code changes: - `test_parse_duration_formats`: accepted and rejected inputs for `Duration::parse`. The cases are taken from #908, plus a few more rejected inputs. - `test_fmt_duration_roundtrip`: the exact strings `fmt_duration` produces, and that each parses back to the same `Duration`. This includes the cases whose output differs with the formatter currently in #908: | Duration | `main` (humantime) | #908 | |---|---|---| | 1 day | `1day` | `24h` | | 90,061 s | `1day 1h 1m 1s` | `25h 1m 1s` | | 10 µs | `10us` | `10µs` | | 2,630,016 s | `1month` | `730h 33m 36s` | # Are there any user-facing changes? No, tests only. Note: the fractional cases (e.g. `1.5h`) pass with humantime 2.4.0, which is what resolves today. `Cargo.toml` still declares `humantime = "2.1"`. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
