Skip to main content

set_state_entered_at_for_testing

Function set_state_entered_at_for_testing 

Source
pub async fn set_state_entered_at_for_testing(
    conn: &mut PgConnection,
    id: Uuid,
    state_entered_at: DateTime<Utc>,
) -> ModelResult<()>
Expand description

Backdates state_entered_at for a registration, so a test can simulate a row that has been sitting in its state long enough for a backoff or timeout to fire.

Exists only for test setup: transition owns this stamp, and calling this from a live path would desynchronize it from the state it is supposed to describe.