mirror of
https://github.com/keycloak/keycloak.git
synced 2025-12-20 14:00:09 -06:00
Flaky test: org.keycloak.testsuite.broker.KcOidcBrokerTest#testPostBrokerLoginFlowWithOTP (#44945)
Closes #43973 Signed-off-by: vramik <vramik@redhat.com>
This commit is contained in:
@@ -106,6 +106,15 @@ public class KeycloakDronePostSetup {
|
|||||||
|
|
||||||
private void configureHtmlUnitDriver(WebDriver driver) {
|
private void configureHtmlUnitDriver(WebDriver driver) {
|
||||||
if (driver instanceof HtmlUnitDriver htmlUnitDriver) {
|
if (driver instanceof HtmlUnitDriver htmlUnitDriver) {
|
||||||
|
var options = htmlUnitDriver.getWebClient().getOptions();
|
||||||
|
|
||||||
|
// Configure timeout for better compatibility with slower CI environments (especially Windows)
|
||||||
|
// Default 60 seconds should be sufficient for most scenarios including broker flows with OTP
|
||||||
|
int timeoutMillis = Integer.parseInt(System.getProperty("htmlunit.timeout", "60000"));
|
||||||
|
log.infof("Setting HtmlUnit timeout: %d ms", timeoutMillis);
|
||||||
|
options.setTimeout(timeoutMillis);
|
||||||
|
|
||||||
|
// Configure TLS settings if provided
|
||||||
final var keystore = System.getProperty(HTML_UNIT_SSL_KEYSTORE_PROP);
|
final var keystore = System.getProperty(HTML_UNIT_SSL_KEYSTORE_PROP);
|
||||||
final var keystorePassword = System.getProperty(HTML_UNIT_SSL_KEYSTORE_PASSWORD_PROP);
|
final var keystorePassword = System.getProperty(HTML_UNIT_SSL_KEYSTORE_PASSWORD_PROP);
|
||||||
final var keystoreType = System.getProperty(HTML_UNIT_SSL_KEYSTORE_TYPE_PROP);
|
final var keystoreType = System.getProperty(HTML_UNIT_SSL_KEYSTORE_TYPE_PROP);
|
||||||
@@ -115,7 +124,6 @@ public class KeycloakDronePostSetup {
|
|||||||
if (keystore != null && keystorePassword != null && keystoreType != null) {
|
if (keystore != null && keystorePassword != null && keystoreType != null) {
|
||||||
log.infof("Keystore '%s', password '%s', type '%s'", keystore, keystorePassword, keystoreType);
|
log.infof("Keystore '%s', password '%s', type '%s'", keystore, keystorePassword, keystoreType);
|
||||||
|
|
||||||
var options = htmlUnitDriver.getWebClient().getOptions();
|
|
||||||
options.setUseInsecureSSL(true);
|
options.setUseInsecureSSL(true);
|
||||||
try {
|
try {
|
||||||
options.setSSLClientCertificateKeyStore(new File(keystore).toURI().toURL(), keystorePassword, keystoreType);
|
options.setSSLClientCertificateKeyStore(new File(keystore).toURI().toURL(), keystorePassword, keystoreType);
|
||||||
|
|||||||
Reference in New Issue
Block a user