Stabilize OAuth recovery assertions

This commit is contained in:
Steven Lee
2026-06-25 17:12:40 +00:00
parent 93c547454a
commit 5f5c41d6b9
2 changed files with 7 additions and 2 deletions

View File

@@ -1372,7 +1372,10 @@ mod tests {
Some("rotated-refresh-token".to_string())
);
let second_tokens = tokens_from_manager(&second_manager).await?;
assert_eq!(second_tokens.token_response, stored.token_response);
assert_token_response_match_without_expiry(
&second_tokens.token_response,
&stored.token_response,
);
Ok(())
}

View File

@@ -587,7 +587,9 @@ async fn persisted_credentials_auth_status_child() -> anyhow::Result<()> {
url: UNEXPIRED_SERVER_URL.to_string(),
client_id: "test-client-id".to_string(),
token_response: WrappedOAuthTokenResponse(response),
expires_at: Some(now.saturating_add(/*rhs*/ 60_000)),
// Keep this outside the 60-second proactive refresh guard band. The test is checking a
// healthy persisted access token, not the boundary where a refresh becomes necessary.
expires_at: Some(now.saturating_add(/*rhs*/ 120_000)),
};
save_oauth_tokens(
SERVER_NAME,