Skip to content

Commit

Permalink
Fix failing case tests
Browse files Browse the repository at this point in the history
  • Loading branch information
SoraSuegami committed Nov 5, 2024
1 parent de735d6 commit 605f1ae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/dns_client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ pub async fn get_dkim_public_key(
#[cfg(debug_assertions)]
let prefixes = vec!["https://dns.google/resolve"];

let seed = (ic_cdk::api::time() % 3) as usize;
let seed = ic_cdk::api::time() as usize % prefixes.len();
let mut shuffled_prefixes = vec![];
for i in 0..3 {
shuffled_prefixes.push(prefixes[(seed + i) % 3]);
shuffled_prefixes.push(prefixes[(seed + i) % prefixes.len()]);
}

let mut errors = vec![];
Expand Down

0 comments on commit 605f1ae

Please sign in to comment.