Unverified Commit 6deb31e4 authored by Sebastian "Sebbie" Silbermann's avatar Sebastian "Sebbie" Silbermann Committed by GitHub

[test] Deflake tests comparing two random numbers (#85571)

parent 17c65509
...@@ -25,8 +25,8 @@ async function getRandomIntBetween(nonce: number) { ...@@ -25,8 +25,8 @@ async function getRandomIntBetween(nonce: number) {
if (nonce === 2) { if (nonce === 2) {
// We want to exercise the case where the function arguments are length 3 // We want to exercise the case where the function arguments are length 3
// but the third arg is still not a callback so it runs sync // but the third arg is still not a callback so it runs sync
return crypto.randomInt(128, 256, undefined) as undefined as number return crypto.randomInt(0, 2 ** 48 - 1, undefined) as undefined as number
} else { } else {
return crypto.randomInt(128, 256) return crypto.randomInt(0, 2 ** 48 - 1)
} }
} }
...@@ -22,5 +22,5 @@ export default async function Page() { ...@@ -22,5 +22,5 @@ export default async function Page() {
async function getRandomIntUpTo(_nonce: number) { async function getRandomIntUpTo(_nonce: number) {
'use cache' 'use cache'
return crypto.randomInt(128) return crypto.randomInt(2 ** 48 - 1)
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment