Bound TOTP rotation wait in account tests

This commit is contained in:
Torsten Dittmann committed 2026-06-09 21:11:21 +04:00
1 parent 3a41e0620a
commit ea72585c5b
1 file changed
+8 -2
@@ -133,12 +133,18 @@ final class AccountCustomClientTest extends Scope
protected function getNextTOTP(\OTPHP\TOTP $totp, string $previousOtp): string
{
$deadline = time() + 35;
do {
sleep(1);
$otp = $totp->now();
} while ($otp === $previousOtp);
return $otp;
if ($otp !== $previousOtp) {
return $otp;
}
} while (time() < $deadline);
$this->fail('TOTP did not rotate within the expected time window.');
}
/**