Skip to content

Commit

Permalink
Send 12 wifi heartbeat
Browse files Browse the repository at this point in the history
  • Loading branch information
macpie committed Jun 3, 2024
1 parent d569c3c commit c796ae6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion ingest/src/server_mobile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ pub async fn grpc_server(settings: &Settings) -> Result<()> {
fn maybe_honor_timestamp(timestamp: u64) -> u64 {
if cfg!(feature = "time") && std::env::var("HONOR_TIMESTAMP").is_ok() {
let str = std::env::var("HONOR_TIMESTAMP").unwrap();
tracing::debug!("using HONOR_TIMESTAMP={}", str);
tracing::debug!("using HONOR_TIMESTAMP={str} and timestamp={timestamp}");
match str.as_str() {
"0" => timestamp,
timestamp_str => match timestamp_str.parse::<u64>() {
Expand Down
11 changes: 5 additions & 6 deletions test_mobile/tests/integration_test.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use anyhow::Result;
use common::{docker::Docker, hotspot::Hotspot, hours_ago};
use std::time::Duration;
use uuid::Uuid;

mod common;
Expand Down Expand Up @@ -32,11 +31,11 @@ async fn main() -> Result<()> {
hotspot1.submit_speedtest(1001, 1001, 25).await?;
hotspot1.submit_speedtest(1002, 1002, 25).await?;

hotspot1
.submit_wifi_heartbeat(hours_ago(12), co_uuid)
.await?;

let _ = tokio::time::sleep(Duration::from_secs(10)).await;
for x in (1..=12).rev() {
hotspot1
.submit_wifi_heartbeat(hours_ago(x), co_uuid)
.await?;
}

Ok(())
}

0 comments on commit c796ae6

Please sign in to comment.