Skip to content

Commit

Permalink
fix: Multiple integration test failures for the same causes as follow…
Browse files Browse the repository at this point in the history
…s for example:

```
SamlLoginWithLocalIdpIT > testCreateSamlIdp FAILED
  java.lang.NoSuchFieldError: LOG
    at org.openqa.selenium.remote.http.jdk.JdkHttpClient$5.close(JdkHttpClient.java:307)
```

- Manually backported from develop branch to use the same versions for all selenium dependencies and to remove code that does not work with newer dependency version

[#185369683]
  • Loading branch information
hsinn0 committed Jun 29, 2023
1 parent 049df82 commit 716f774
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 16 deletions.
18 changes: 10 additions & 8 deletions dependencies.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
// Versions we're overriding from the Spring Boot Bom
ext["flyway.version"] = "7.15.0" // flyway 8+ drops support for mysql 5.7
ext["mariadb.version"] = "2.7.7" // Bumping to v3 breaks some pipeline jobs (and compatibility with Amazon Aurora MySQL), so pinning to v2 for now. v2 (current version) is stable and will be supported until about September 2025 (https://mariadb.com/kb/en/about-mariadb-connector-j/).
ext["snakeyaml.version"] = "2.0" // Needed to resolve CVEs in internal spring-boot 2.7.12 inclusion of snakeyaml
ext["jackson-bom.version"] = "2.14.2" // Bumping to latest version because of compatiblity to snakeyaml 2.0

def versions = [:]

// Versions shared between multiple dependencies
Expand All @@ -21,6 +15,14 @@ versions.statsdClientVersion = "3.1.0" // statsd is not included in spring-boot
versions.junitVersion = "4.13.2" // Needed to support junit 4 with spring-boot 2.4
versions.velocityEngineCoreVersion = "2.3"
versions.xmlsecVersion ="3.0.2"
versions.seleniumVersion = "4.10.0"

// Versions we're overriding from the Spring Boot Bom
ext["flyway.version"] = "7.15.0" // flyway 8+ drops support for mysql 5.7
ext["mariadb.version"] = "2.7.7" // Bumping to v3 breaks some pipeline jobs (and compatibility with Amazon Aurora MySQL), so pinning to v2 for now. v2 (current version) is stable and will be supported until about September 2025 (https://mariadb.com/kb/en/about-mariadb-connector-j/).
ext["snakeyaml.version"] = "2.0" // Needed to resolve CVEs in internal spring-boot 2.7.12 inclusion of snakeyaml
ext["jackson-bom.version"] = "2.14.2" // Bumping to latest version because of compatiblity to snakeyaml 2.0
ext["selenium.version"] = "${versions.seleniumVersion}"

ext {
tomcatVersion = "${versions.tomcatVersion}"
Expand Down Expand Up @@ -69,8 +71,8 @@ libraries.mockitoJunit5 = "org.mockito:mockito-junit-jupiter"
libraries.passay = "org.passay:passay:1.6.3"
libraries.beanutils = "commons-beanutils:commons-beanutils:1.9.4"
libraries.postgresql = "org.postgresql:postgresql"
libraries.selenium = "org.seleniumhq.selenium:selenium-java:4.10.0"
libraries.seleniumHttp = "org.seleniumhq.selenium:selenium-http-jdk-client:4.10.0"
libraries.selenium = "org.seleniumhq.selenium:selenium-java:${versions.seleniumVersion}"
libraries.seleniumHttp = "org.seleniumhq.selenium:selenium-http-jdk-client:${versions.seleniumVersion}"
libraries.slf4jApi = "org.slf4j:slf4j-api"
libraries.slf4jImpl = "org.apache.logging.log4j:log4j-slf4j-impl"
libraries.snakeyaml = "org.yaml:snakeyaml"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@
import org.openqa.selenium.Dimension;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeOptions;
import org.openqa.selenium.logging.LogType;
import org.openqa.selenium.logging.LoggingPreferences;
import org.openqa.selenium.remote.CapabilityType;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
Expand All @@ -33,7 +30,6 @@
import java.io.IOException;
import java.net.HttpURLConnection;
import java.util.concurrent.TimeUnit;
import java.util.logging.Level;

@Configuration
@PropertySource("classpath:integration.test.properties")
Expand Down Expand Up @@ -68,9 +64,6 @@ public ChromeDriver webDriver() {
"--remote-allow-origins=*"
);

LoggingPreferences logs = new LoggingPreferences();
logs.enable(LogType.PERFORMANCE, Level.ALL);
options.setCapability(CapabilityType.LOGGING_PREFS, logs);
options.setAcceptInsecureCerts(true);

ChromeDriver driver = new ChromeDriver(options);
Expand All @@ -82,7 +75,6 @@ public ChromeDriver webDriver() {
return driver;
}


@Bean(destroyMethod = "stop")
public SimpleSmtpServer simpleSmtpServer(@Value("${smtp.port}") int port) {
return SimpleSmtpServer.start(port);
Expand Down

0 comments on commit 716f774

Please sign in to comment.