healthchecks: fix weird assert

This commit is contained in:
Harsh Shandilya 2022-06-01 11:09:17 +05:30
parent dcd03f207b
commit d40b37e182
No known key found for this signature in database
GPG Key ID: 366D7BBAD1031E80
1 changed files with 2 additions and 3 deletions

View File

@ -1,5 +1,4 @@
use healthchecks::ping::get_client;
use std::ops::Not;
use std::result::Result;
fn main() -> Result<(), Box<dyn std::error::Error>> {
@ -7,8 +6,8 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
.nth(1)
.expect("Providing a UUID as first parameter is mandatory");
let config = get_client(&uuid)?;
assert!(!config.start_timer().not(), "Failed to start timer");
assert!(config.start_timer(), "Failed to start timer");
std::thread::sleep(std::time::Duration::from_millis(10_000));
assert!(!config.report_success().not(), "Failed to report success");
assert!(config.report_success(), "Failed to report success");
Ok(())
}