From ca0833b2e48ef3fac6c524bcb5b0680a73fdb6fa Mon Sep 17 00:00:00 2001 From: Lukas Hanusovsky <61745358+lhanusov@users.noreply.github.com> Date: Thu, 13 Jun 2024 15:31:52 +0200 Subject: [PATCH] [#29412] DB Allocator removal - dependency cleanup. (#30406) Signed-off-by: Lukas Hanusovsky --- docs/tests-db.md | 34 +--- testsuite/db-allocator-plugin/pom.xml | 81 -------- .../testsuite/dballocator/AllocateDBMojo.java | 184 ------------------ .../testsuite/dballocator/Constants.java | 20 -- .../testsuite/dballocator/ReleaseDBMojo.java | 93 --------- .../client/BackoffRetryPolicy.java | 11 -- .../client/DBAllocatorServiceClient.java | 119 ----------- .../client/data/AllocationResult.java | 81 -------- .../dballocator/client/data/EraseResult.java | 45 ----- .../client/data/ReleaseResult.java | 25 --- .../exceptions/DBAllocatorException.java | 25 --- .../DBAllocatorUnavailableException.java | 11 -- .../retry/IncrementalBackoffRetryPolicy.java | 65 ------- .../client/DBAllocatorServiceClientTest.java | 71 ------- .../dballocator/client/mock/MockResponse.java | 158 --------------- .../IncrementalBackoffRetryPolicyTest.java | 68 ------- .../db-allocator-response.properties | 25 --- .../src/test/resources/log4j.properties | 5 - testsuite/integration-arquillian/pom.xml | 90 +-------- .../integration-arquillian/tests/base/pom.xml | 21 -- testsuite/pom.xml | 1 - 21 files changed, 3 insertions(+), 1230 deletions(-) delete mode 100644 testsuite/db-allocator-plugin/pom.xml delete mode 100644 testsuite/db-allocator-plugin/src/main/java/org/keycloak/testsuite/dballocator/AllocateDBMojo.java delete mode 100644 testsuite/db-allocator-plugin/src/main/java/org/keycloak/testsuite/dballocator/Constants.java delete mode 100644 testsuite/db-allocator-plugin/src/main/java/org/keycloak/testsuite/dballocator/ReleaseDBMojo.java delete mode 100644 testsuite/db-allocator-plugin/src/main/java/org/keycloak/testsuite/dballocator/client/BackoffRetryPolicy.java delete mode 100644 testsuite/db-allocator-plugin/src/main/java/org/keycloak/testsuite/dballocator/client/DBAllocatorServiceClient.java delete mode 100644 testsuite/db-allocator-plugin/src/main/java/org/keycloak/testsuite/dballocator/client/data/AllocationResult.java delete mode 100644 testsuite/db-allocator-plugin/src/main/java/org/keycloak/testsuite/dballocator/client/data/EraseResult.java delete mode 100644 testsuite/db-allocator-plugin/src/main/java/org/keycloak/testsuite/dballocator/client/data/ReleaseResult.java delete mode 100644 testsuite/db-allocator-plugin/src/main/java/org/keycloak/testsuite/dballocator/client/exceptions/DBAllocatorException.java delete mode 100644 testsuite/db-allocator-plugin/src/main/java/org/keycloak/testsuite/dballocator/client/exceptions/DBAllocatorUnavailableException.java delete mode 100644 testsuite/db-allocator-plugin/src/main/java/org/keycloak/testsuite/dballocator/client/retry/IncrementalBackoffRetryPolicy.java delete mode 100644 testsuite/db-allocator-plugin/src/test/java/org/keycloak/testsuite/dballocator/client/DBAllocatorServiceClientTest.java delete mode 100644 testsuite/db-allocator-plugin/src/test/java/org/keycloak/testsuite/dballocator/client/mock/MockResponse.java delete mode 100644 testsuite/db-allocator-plugin/src/test/java/org/keycloak/testsuite/dballocator/client/retry/IncrementalBackoffRetryPolicyTest.java delete mode 100644 testsuite/db-allocator-plugin/src/test/resources/db-allocator-response.properties delete mode 100755 testsuite/db-allocator-plugin/src/test/resources/log4j.properties diff --git a/docs/tests-db.md b/docs/tests-db.md index 78cbeae4fa..5da4534ff6 100644 --- a/docs/tests-db.md +++ b/docs/tests-db.md @@ -56,7 +56,7 @@ Stop MySQl: Using built-in profiles to run database tests using docker containers ------- -The project provides specific profiles to run database tests using containers. Below is a just a sample of implemented profiles. In order to get a full list, please invoke (`mvn help:all-profiles -pl testsuite/integration-arquillian | grep -- db- | grep -v allocator`): +The project provides specific profiles to run database tests using containers. Below is a just a sample of implemented profiles. In order to get a full list, please invoke (`mvn help:all-profiles -pl testsuite/integration-arquillian | grep -- db-`): * `db-mysql` * `db-postgres` @@ -84,35 +84,3 @@ name or tag for the image. Note that Docker containers may occupy some space even after termination, and especially with databases that might be easily a gigabyte. It is thus advisable to run `docker system prune` occasionally to reclaim that space. - - -Using DB Allocator Service -------- - -The testsuite can use the DB Allocator Service to allocate and release desired database automatically. -Since some of the database properties (such as JDBC URL, Username or Password) need to be used when building the Auth Server, -the allocation and deallocation need to happen when building the `integration-arquillian` project (instead of `tests/base` as -it happens in other cases). - -In order to use the DB Allocator Service, you must use the `jpa` profile with one of the `db-allocator-*`. Here's a full example to -run JPA with Auth Server Quarkus and MSSQL 2016: - -``` -mvn -f testsuite/integration-arquillian/pom.xml clean verify \ - -Pjpa,auth-server-quarkus,db-allocator-db-mssql2016 \ - -Ddballocator.uri=<> \ - -Ddballocator.user=<> \ - -Dmaven.test.failure.ignore=true -``` - -Using `-Dmaven.test.failure.ignore=true` is not strictly required but highly recommended. After running the tests, -the DB Allocator Plugin should release the allocated database. - -**NOTE**: If you killed the maven surefire test preliminary (for example with CTRL-C or `kill -9` command), it will be -good to manually release the allocated database. Please check `dballocator.uri` and add `?operation=report` to the end of the URL. -Find your DB in the GUI and release it manually. - -Below is a just a sample of implemented profiles. In order to get a full list, please invoke (`mvn help:all-profiles -pl testsuite/integration-arquillian | grep -- db-allocator-db-`): - -* `db-allocator-db-postgres` - for testing with Postgres 9.6.x -* `db-allocator-db-mysql` - for testing with MySQL 5.7 \ No newline at end of file diff --git a/testsuite/db-allocator-plugin/pom.xml b/testsuite/db-allocator-plugin/pom.xml deleted file mode 100644 index c82daf8462..0000000000 --- a/testsuite/db-allocator-plugin/pom.xml +++ /dev/null @@ -1,81 +0,0 @@ - - - - - - keycloak-testsuite-pom - org.keycloak - 999.0.0-SNAPSHOT - - 4.0.0 - - db-allocator-plugin - maven-plugin - DB Allocator Plugin - - - 3.3.9 - - - - - org.apache.maven - maven-plugin-api - ${maven.version} - - - org.apache.maven.plugin-tools - maven-plugin-annotations - 3.4 - provided - - - org.apache.maven - maven-core - ${maven.version} - provided - - - org.jboss.resteasy - resteasy-client - - - commons-io - commons-io - 2.11.0 - - - - junit - junit - test - - - - - - - org.apache.maven.plugins - maven-plugin-plugin - 3.6.0 - - - - diff --git a/testsuite/db-allocator-plugin/src/main/java/org/keycloak/testsuite/dballocator/AllocateDBMojo.java b/testsuite/db-allocator-plugin/src/main/java/org/keycloak/testsuite/dballocator/AllocateDBMojo.java deleted file mode 100644 index 1ed068f1d0..0000000000 --- a/testsuite/db-allocator-plugin/src/main/java/org/keycloak/testsuite/dballocator/AllocateDBMojo.java +++ /dev/null @@ -1,184 +0,0 @@ -package org.keycloak.testsuite.dballocator; - -import org.apache.commons.lang3.StringUtils; -import org.apache.maven.plugin.AbstractMojo; -import org.apache.maven.plugin.MojoFailureException; -import org.apache.maven.plugin.logging.Log; -import org.apache.maven.plugins.annotations.LifecyclePhase; -import org.apache.maven.plugins.annotations.Mojo; -import org.apache.maven.plugins.annotations.Parameter; -import org.apache.maven.project.MavenProject; -import org.keycloak.testsuite.dballocator.client.data.AllocationResult; -import org.keycloak.testsuite.dballocator.client.DBAllocatorServiceClient; -import org.keycloak.testsuite.dballocator.client.data.EraseResult; -import org.keycloak.testsuite.dballocator.client.exceptions.DBAllocatorException; -import org.keycloak.testsuite.dballocator.client.retry.IncrementalBackoffRetryPolicy; - -import java.util.List; -import java.util.concurrent.TimeUnit; - -/** - * Allocated a DB from DB Allocator Service. - */ -@Mojo(name = "allocate", defaultPhase = LifecyclePhase.PROCESS_TEST_RESOURCES) -public class AllocateDBMojo extends AbstractMojo { - - - private final Log logger = getLog(); - - @Parameter(defaultValue = "${project}", required = true, readonly = true) - protected MavenProject project; - - @Parameter(defaultValue = "${reactorProjects}", readonly = true) - List reactorProjects; - - /** - * Enables printing out a summary after execution. - */ - @Parameter(property = Constants.PROPERTY_PRINT_SUMMARY, defaultValue = "true") - private boolean printSummary; - - /** - * Skips the execution of this Mojo. - */ - @Parameter(property = Constants.PROPERTY_SKIP, defaultValue = "false") - private boolean skip; - - /** - * The number of retries for reaching the DB Allocator Service - */ - @Parameter(property = Constants.PROPERTY_RETRY_TOTAL_RETRIES, defaultValue = "3") - private int totalRetries; - - /** - * Backoff time for reaching out the DB Allocator Service. - */ - @Parameter(property = Constants.PROPERTY_RETRY_BACKOFF_SECONDS, defaultValue = "10") - private int backoffTimeSeconds; - - /** - * URI to the DB Allocator Service. - */ - @Parameter(property = Constants.PROPERTY_DB_ALLOCATOR_URI) - private String dbAllocatorURI; - - /** - * Username used for allocating DBs. - */ - @Parameter(property = Constants.PROPERTY_DB_ALLOCATOR_USER) - private String user; - - /** - * Fallback username used for allocating DBs. - */ - @Parameter(property = Constants.PROPERTY_DB_ALLOCATOR_USER_FALLBACK) - private String fallbackUser; - - /** - * Type of the database to be used. - */ - @Parameter(property = Constants.PROPERTY_DB_ALLOCATOR_DATABASE_TYPE) - private String type; - - /** - * Expiration in minutes. - */ - @Parameter(property = Constants.PROPERTY_DB_ALLOCATOR_EXPIRATION_MIN, defaultValue = "1440") - private int expirationInMinutes; - - /** - * Preferred DB location. - */ - @Parameter(property = Constants.PROPERTY_DB_ALLOCATOR_LOCATION, defaultValue = "geo_RDU") - private String location; - - /** - * A property set as an output of this Mojo for JDBC Driver. - */ - @Parameter(property = Constants.PROPERTY_TO_BE_SET_DRIVER, defaultValue = "keycloak.connectionsJpa.driver") - private String propertyDriver; - - /** - * A property set as an output of this Mojo for Database Schema. - */ - @Parameter(property = Constants.PROPERTY_TO_BE_SET_DATABASE, defaultValue = "keycloak.connectionsJpa.database") - private String propertyDatabase; - - /** - * A property set as an output of this Mojo for DB Username. - */ - @Parameter(property = Constants.PROPERTY_TO_BE_SET_USER, defaultValue = "keycloak.connectionsJpa.user") - private String propertyUser; - - /** - * A property set as an output of this Mojo for DB Password. - */ - @Parameter(property = Constants.PROPERTY_TO_BE_SET_PASSWORD, defaultValue = "keycloak.connectionsJpa.password") - private String propertyPassword; - - /** - * A property set as an output of this Mojo for JDBC Connection URI. - */ - @Parameter(property = Constants.PROPERTY_TO_BE_SET_JDBC_URL, defaultValue = "keycloak.connectionsJpa.url") - private String propertyURL; - - @Override - public void execute() throws MojoFailureException { - if (skip) { - logger.info("Skipping"); - return; - } - - logger.info("Total retries: " + totalRetries + "; backOffTime: " + backoffTimeSeconds); - try { - IncrementalBackoffRetryPolicy retryPolicy = new IncrementalBackoffRetryPolicy(totalRetries, backoffTimeSeconds, TimeUnit.SECONDS); - DBAllocatorServiceClient client = new DBAllocatorServiceClient(dbAllocatorURI, retryPolicy); - - setFallbackUserIfNecessary(); - AllocationResult allocate = client.allocate(user, type, expirationInMinutes, TimeUnit.MINUTES, location); - - reactorProjects.forEach((project) -> setPropertiesToProject(project, allocate)); - - if (printSummary) { - logger.info("Allocated database:"); - logger.info("-- UUID: " + allocate.getUUID()); - logger.info("-- Driver: " + allocate.getDriver()); - logger.info("-- Database: " + allocate.getDatabase()); - logger.info("-- User: " + allocate.getUser()); - logger.info("-- Password: " + allocate.getPassword()); - logger.info("-- URL: " + allocate.getURL()); - } - - EraseResult eraseResult = client.erase(allocate); - if (printSummary) { - logger.info("Erased database:"); - logger.info("-- UUID: " + eraseResult.getUUID()); - } - - } catch (DBAllocatorException e) { - String error = e.getMessage(); - if (e.getErrorResponse() != null) { - error = String.format("[%s](%s)", e.getErrorResponse().getStatus(), e.getErrorResponse().readEntity(String.class)); - } - throw new MojoFailureException("An error occurred while communicating with DBAllocator (" + error + ")", e); - } - } - - private void setFallbackUserIfNecessary() { - if (StringUtils.isBlank(user)) { - if (StringUtils.isBlank(fallbackUser)) { - throw new IllegalArgumentException("Both " + Constants.PROPERTY_DB_ALLOCATOR_USER + " and " + Constants.PROPERTY_DB_ALLOCATOR_USER_FALLBACK + " are empty"); - } - user = fallbackUser; - } - } - - private void setPropertiesToProject(MavenProject project, AllocationResult allocate) { - project.getProperties().setProperty(propertyDriver, allocate.getDriver()); - project.getProperties().setProperty(propertyDatabase, allocate.getDatabase()); - project.getProperties().setProperty(propertyUser, allocate.getUser()); - project.getProperties().setProperty(propertyPassword, allocate.getPassword()); - project.getProperties().setProperty(propertyURL, allocate.getURL()); - project.getProperties().setProperty(Constants.PROPERTY_ALLOCATED_DB, allocate.getUUID()); - } -} diff --git a/testsuite/db-allocator-plugin/src/main/java/org/keycloak/testsuite/dballocator/Constants.java b/testsuite/db-allocator-plugin/src/main/java/org/keycloak/testsuite/dballocator/Constants.java deleted file mode 100644 index 1ca67bc006..0000000000 --- a/testsuite/db-allocator-plugin/src/main/java/org/keycloak/testsuite/dballocator/Constants.java +++ /dev/null @@ -1,20 +0,0 @@ -package org.keycloak.testsuite.dballocator; - -public interface Constants { - String PROPERTY_ALLOCATED_DB = "dballocator.allocated.uuid"; - String PROPERTY_DB_ALLOCATOR_URI = "dballocator.uri"; - String PROPERTY_DB_ALLOCATOR_USER = "dballocator.user"; - String PROPERTY_DB_ALLOCATOR_USER_FALLBACK = "user.name"; - String PROPERTY_DB_ALLOCATOR_DATABASE_TYPE = "dballocator.type"; - String PROPERTY_DB_ALLOCATOR_EXPIRATION_MIN = "dballocator.expirationMin"; - String PROPERTY_DB_ALLOCATOR_LOCATION = "dballocator.location"; - String PROPERTY_TO_BE_SET_DRIVER = "dballocator.properties.driver"; - String PROPERTY_TO_BE_SET_DATABASE = "dballocator.properties.database"; - String PROPERTY_TO_BE_SET_USER = "dballocator.properties.user"; - String PROPERTY_TO_BE_SET_PASSWORD = "dballocator.properties.password"; - String PROPERTY_TO_BE_SET_JDBC_URL = "dballocator.properties.url"; - String PROPERTY_PRINT_SUMMARY = "dballocator.summary"; - String PROPERTY_SKIP = "dballocator.skip"; - String PROPERTY_RETRY_TOTAL_RETRIES = "dballocator.retry.totalRetries"; - String PROPERTY_RETRY_BACKOFF_SECONDS = "dballocator.retry.backoffSeconds"; -} diff --git a/testsuite/db-allocator-plugin/src/main/java/org/keycloak/testsuite/dballocator/ReleaseDBMojo.java b/testsuite/db-allocator-plugin/src/main/java/org/keycloak/testsuite/dballocator/ReleaseDBMojo.java deleted file mode 100644 index a2a68fe46b..0000000000 --- a/testsuite/db-allocator-plugin/src/main/java/org/keycloak/testsuite/dballocator/ReleaseDBMojo.java +++ /dev/null @@ -1,93 +0,0 @@ -package org.keycloak.testsuite.dballocator; - -import org.apache.maven.plugin.AbstractMojo; -import org.apache.maven.plugin.MojoFailureException; -import org.apache.maven.plugin.logging.Log; -import org.apache.maven.plugins.annotations.LifecyclePhase; -import org.apache.maven.plugins.annotations.Mojo; -import org.apache.maven.plugins.annotations.Parameter; -import org.apache.maven.project.MavenProject; -import org.keycloak.testsuite.dballocator.client.data.AllocationResult; -import org.keycloak.testsuite.dballocator.client.DBAllocatorServiceClient; -import org.keycloak.testsuite.dballocator.client.exceptions.DBAllocatorException; -import org.keycloak.testsuite.dballocator.client.retry.IncrementalBackoffRetryPolicy; -import org.keycloak.testsuite.dballocator.client.data.ReleaseResult; - -import java.net.URI; -import java.util.concurrent.TimeUnit; - -/** - * Releases a DB from DB Allocator Service. - */ -@Mojo(name = "release", defaultPhase = LifecyclePhase.TEST) -public class ReleaseDBMojo extends AbstractMojo { - - private final Log logger = getLog(); - - @Parameter(defaultValue = "${project}", required = true) - protected MavenProject project; - - /** - * Enables printing out a summary after execution. - */ - @Parameter(property = Constants.PROPERTY_PRINT_SUMMARY, defaultValue = "true") - private boolean printSummary; - - /** - * Skips the execution of this Mojo. - */ - @Parameter(property = Constants.PROPERTY_SKIP, defaultValue = "false") - private boolean skip; - - /** - * The number of retries for reaching the DB Allocator Service - */ - @Parameter(property = Constants.PROPERTY_RETRY_TOTAL_RETRIES, defaultValue = "3") - private int totalRetries; - - /** - * Backoff time for reaching out the DB Allocator Service. - */ - @Parameter(property = Constants.PROPERTY_RETRY_BACKOFF_SECONDS, defaultValue = "10") - private int backoffTimeSeconds; - - /** - * URI to the DB Allocator Service. - */ - @Parameter(property = Constants.PROPERTY_DB_ALLOCATOR_URI) - private String dbAllocatorURI; - - /** - * UUID for releasing the allocated DB. - */ - @Parameter(property = Constants.PROPERTY_ALLOCATED_DB) - private String allocatedUUID; - - @Override - public void execute() throws MojoFailureException { - if (skip) { - logger.info("Skipping"); - return; - } - - logger.info("Total retries: " + totalRetries + "; backOffTime: " + backoffTimeSeconds); - try { - IncrementalBackoffRetryPolicy retryPolicy = new IncrementalBackoffRetryPolicy(totalRetries, backoffTimeSeconds, TimeUnit.SECONDS); - DBAllocatorServiceClient client = new DBAllocatorServiceClient(dbAllocatorURI, retryPolicy); - - ReleaseResult release = client.release(AllocationResult.forRelease(allocatedUUID)); - - if (printSummary) { - logger.info("Released database:"); - logger.info("-- UUID: " + release.getUUID()); - } - - } catch (DBAllocatorException e) { - String error = e.getMessage(); - if (e.getErrorResponse() != null) { - error = String.format("[%s](%s)", e.getErrorResponse().getStatus(), e.getErrorResponse().readEntity(String.class)); - } - throw new MojoFailureException("An error occurred while communicating with DBAllocator (" + error + ")", e); - } - } -} diff --git a/testsuite/db-allocator-plugin/src/main/java/org/keycloak/testsuite/dballocator/client/BackoffRetryPolicy.java b/testsuite/db-allocator-plugin/src/main/java/org/keycloak/testsuite/dballocator/client/BackoffRetryPolicy.java deleted file mode 100644 index 5a29a4df2b..0000000000 --- a/testsuite/db-allocator-plugin/src/main/java/org/keycloak/testsuite/dballocator/client/BackoffRetryPolicy.java +++ /dev/null @@ -1,11 +0,0 @@ -package org.keycloak.testsuite.dballocator.client; - -import org.keycloak.testsuite.dballocator.client.exceptions.DBAllocatorUnavailableException; - -import jakarta.ws.rs.core.Response; -import java.util.concurrent.Callable; - -@FunctionalInterface -public interface BackoffRetryPolicy { - Response retryTillHttpOk(Callable callableSupplier) throws DBAllocatorUnavailableException; -} diff --git a/testsuite/db-allocator-plugin/src/main/java/org/keycloak/testsuite/dballocator/client/DBAllocatorServiceClient.java b/testsuite/db-allocator-plugin/src/main/java/org/keycloak/testsuite/dballocator/client/DBAllocatorServiceClient.java deleted file mode 100644 index 09f282c208..0000000000 --- a/testsuite/db-allocator-plugin/src/main/java/org/keycloak/testsuite/dballocator/client/DBAllocatorServiceClient.java +++ /dev/null @@ -1,119 +0,0 @@ -package org.keycloak.testsuite.dballocator.client; - -import org.apache.http.client.config.RequestConfig; -import org.apache.http.impl.client.CloseableHttpClient; -import org.apache.http.impl.client.HttpClientBuilder; -import org.jboss.resteasy.client.jaxrs.ResteasyClientBuilder; -import org.jboss.resteasy.client.jaxrs.engines.ApacheHttpClient43Engine; -import org.keycloak.testsuite.dballocator.client.data.AllocationResult; -import org.keycloak.testsuite.dballocator.client.data.EraseResult; -import org.keycloak.testsuite.dballocator.client.data.ReleaseResult; -import org.keycloak.testsuite.dballocator.client.exceptions.DBAllocatorException; -import org.keycloak.testsuite.dballocator.client.retry.IncrementalBackoffRetryPolicy; - -import jakarta.ws.rs.client.Client; -import jakarta.ws.rs.client.Invocation; -import jakarta.ws.rs.core.Response; -import java.io.ByteArrayInputStream; -import java.io.IOException; -import java.io.InputStream; -import java.net.URI; -import java.util.Objects; -import java.util.Properties; -import java.util.concurrent.TimeUnit; -import org.jboss.logging.Logger; - -public class DBAllocatorServiceClient { - - private static final int TIMEOUT = 10_000; - - private final Client restClient; - private final URI allocatorServletURI; - private final BackoffRetryPolicy retryPolicy; - private final Logger logger = Logger.getLogger(DBAllocatorServiceClient.class); - - public DBAllocatorServiceClient(String allocatorServletURI, BackoffRetryPolicy retryPolicy) { - Objects.requireNonNull(allocatorServletURI, "DB Allocator URI must not be null"); - - this.allocatorServletURI = URI.create(allocatorServletURI); - this.retryPolicy = retryPolicy != null ? retryPolicy : new IncrementalBackoffRetryPolicy(); - this.restClient = ((ResteasyClientBuilder) ResteasyClientBuilder.newBuilder()).httpEngine(createEngine()).build(); - } - - private final ApacheHttpClient43Engine createEngine() { - RequestConfig reqConfig = RequestConfig.custom() - .setConnectTimeout(TIMEOUT) - .setSocketTimeout(TIMEOUT) - .setConnectionRequestTimeout(TIMEOUT) - .build(); - CloseableHttpClient httpClient = HttpClientBuilder.create() - .setDefaultRequestConfig(reqConfig) - .setMaxConnTotal(1) - .build(); - - ApacheHttpClient43Engine engine = new ApacheHttpClient43Engine(httpClient); - engine.setFollowRedirects(true); - return engine; - } - - public AllocationResult allocate(String user, String type, int expiration, TimeUnit expirationTimeUnit, String location) throws DBAllocatorException { - Objects.requireNonNull(user, "User can not be null"); - Objects.requireNonNull(type, "DB Type must not be null"); - - try { - String typeWithLocation = location != null ? type + "&&" + location : type; - Invocation.Builder target = restClient - .target(allocatorServletURI) - .queryParam("operation", "allocate") - .queryParam("requestee", user) - .queryParam("expression", typeWithLocation) - .queryParam("expiry", expirationTimeUnit.toMinutes(expiration)) - .request(); - - logger.info("Calling " + allocatorServletURI); - Response response = retryPolicy.retryTillHttpOk(() -> target.get()); - Properties properties = new Properties(); - String content = response.readEntity(String.class); - - if (content != null) { - try(InputStream is = new ByteArrayInputStream(content.getBytes())) { - properties.load(is); - } - } - - return AllocationResult.successful(properties); - } catch (IOException e) { - throw new DBAllocatorException(e); - } - } - - public EraseResult erase(AllocationResult allocationResult) throws DBAllocatorException { - Objects.requireNonNull(allocationResult, "Previous allocation result must not be null"); - Objects.requireNonNull(allocationResult.getUUID(), "UUID must not be null"); - - Invocation.Builder target = restClient - .target(allocatorServletURI) - .queryParam("operation", "erase") - .queryParam("uuid", allocationResult.getUUID()) - .request(); - - try (Response response = retryPolicy.retryTillHttpOk(() -> target.get())) { - return EraseResult.successful(allocationResult.getUUID()); - } - } - - public ReleaseResult release(AllocationResult allocationResult) throws DBAllocatorException { - Objects.requireNonNull(allocationResult, "Previous allocation result must not be null"); - Objects.requireNonNull(allocationResult.getUUID(), "UUID must not be null"); - - Invocation.Builder target = restClient - .target(allocatorServletURI) - .queryParam("operation", "dealloc") - .queryParam("uuid", allocationResult.getUUID()) - .request(); - - try (Response response = retryPolicy.retryTillHttpOk(() -> target.get())) { - return ReleaseResult.successful(allocationResult.getUUID()); - } - } -} diff --git a/testsuite/db-allocator-plugin/src/main/java/org/keycloak/testsuite/dballocator/client/data/AllocationResult.java b/testsuite/db-allocator-plugin/src/main/java/org/keycloak/testsuite/dballocator/client/data/AllocationResult.java deleted file mode 100644 index 5d69fd9fb0..0000000000 --- a/testsuite/db-allocator-plugin/src/main/java/org/keycloak/testsuite/dballocator/client/data/AllocationResult.java +++ /dev/null @@ -1,81 +0,0 @@ -package org.keycloak.testsuite.dballocator.client.data; - -import java.util.Properties; - -public class AllocationResult { - - private final String uuid; - private final String driver; - private final String database; - private final String user; - private final String password; - private final String url; - - private AllocationResult(String uuid) { - this.uuid = uuid; - this.driver = null; - this.database = null; - this.user = null; - this.password = null; - this.url = null; - } - - private AllocationResult(String uuid, String driver, String database, String user, String password, String url) { - this.uuid = uuid; - this.driver = driver; - this.database = database; - this.user = user; - this.password = password; - this.url = url; - } - - public static AllocationResult forRelease(String uuid) { - return new AllocationResult(uuid); - } - - public static AllocationResult successful(Properties properties) { - return new AllocationResult( - properties.getProperty("uuid"), - properties.getProperty("db.jdbc_class"), - properties.getProperty("db.name"), - properties.getProperty("db.username"), - properties.getProperty("db.password"), - properties.getProperty("db.jdbc_url")); - } - - public String getDriver() { - return driver; - } - - public String getDatabase() { - return database; - } - - public String getUser() { - return user; - } - - public String getPassword() { - return password; - } - - public String getURL() { - return url; - } - - public String getUUID() { - return uuid; - } - - @Override - public String toString() { - return "AllocationResult{" + - "uuid='" + uuid + '\'' + - ", driver='" + driver + '\'' + - ", database='" + database + '\'' + - ", user='" + user + '\'' + - ", password='" + password + '\'' + - ", url='" + url + '\'' + - '}'; - } -} diff --git a/testsuite/db-allocator-plugin/src/main/java/org/keycloak/testsuite/dballocator/client/data/EraseResult.java b/testsuite/db-allocator-plugin/src/main/java/org/keycloak/testsuite/dballocator/client/data/EraseResult.java deleted file mode 100644 index 05391cb09f..0000000000 --- a/testsuite/db-allocator-plugin/src/main/java/org/keycloak/testsuite/dballocator/client/data/EraseResult.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2017 Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.keycloak.testsuite.dballocator.client.data; - -/** - * @author Marek Posolda - */ -public class EraseResult { - - private final String uuid; - - private EraseResult(String uuid) { - this.uuid = uuid; - } - - public static EraseResult successful(String uuid) { - return new EraseResult(uuid); - } - - public String getUUID() { - return uuid; - } - - @Override - public String toString() { - return "EraseResult{" + - "uuid='" + uuid + '\'' + - '}'; - } -} diff --git a/testsuite/db-allocator-plugin/src/main/java/org/keycloak/testsuite/dballocator/client/data/ReleaseResult.java b/testsuite/db-allocator-plugin/src/main/java/org/keycloak/testsuite/dballocator/client/data/ReleaseResult.java deleted file mode 100644 index 5fcce9e178..0000000000 --- a/testsuite/db-allocator-plugin/src/main/java/org/keycloak/testsuite/dballocator/client/data/ReleaseResult.java +++ /dev/null @@ -1,25 +0,0 @@ -package org.keycloak.testsuite.dballocator.client.data; - -public class ReleaseResult { - - private final String uuid; - - private ReleaseResult(String uuid) { - this.uuid = uuid; - } - - public static ReleaseResult successful(String uuid) { - return new ReleaseResult(uuid); - } - - public String getUUID() { - return uuid; - } - - @Override - public String toString() { - return "ReleaseResult{" + - "uuid='" + uuid + '\'' + - '}'; - } -} diff --git a/testsuite/db-allocator-plugin/src/main/java/org/keycloak/testsuite/dballocator/client/exceptions/DBAllocatorException.java b/testsuite/db-allocator-plugin/src/main/java/org/keycloak/testsuite/dballocator/client/exceptions/DBAllocatorException.java deleted file mode 100644 index 88677a5dd5..0000000000 --- a/testsuite/db-allocator-plugin/src/main/java/org/keycloak/testsuite/dballocator/client/exceptions/DBAllocatorException.java +++ /dev/null @@ -1,25 +0,0 @@ -package org.keycloak.testsuite.dballocator.client.exceptions; - -import jakarta.ws.rs.core.Response; - -public class DBAllocatorException extends Exception { - - private Response errorResponse; - - public DBAllocatorException(Response errorResponse) { - this.errorResponse = errorResponse; - } - - public DBAllocatorException(Response errorResponse, Throwable throwable) { - super(throwable); - this.errorResponse = errorResponse; - } - - public DBAllocatorException(Throwable throwable) { - super(throwable); - } - - public Response getErrorResponse() { - return errorResponse; - } -} diff --git a/testsuite/db-allocator-plugin/src/main/java/org/keycloak/testsuite/dballocator/client/exceptions/DBAllocatorUnavailableException.java b/testsuite/db-allocator-plugin/src/main/java/org/keycloak/testsuite/dballocator/client/exceptions/DBAllocatorUnavailableException.java deleted file mode 100644 index d414c4aa26..0000000000 --- a/testsuite/db-allocator-plugin/src/main/java/org/keycloak/testsuite/dballocator/client/exceptions/DBAllocatorUnavailableException.java +++ /dev/null @@ -1,11 +0,0 @@ -package org.keycloak.testsuite.dballocator.client.exceptions; - - -import jakarta.ws.rs.core.Response; - -public class DBAllocatorUnavailableException extends DBAllocatorException { - - public DBAllocatorUnavailableException(Response errorResponse) { - super(errorResponse); - } -} diff --git a/testsuite/db-allocator-plugin/src/main/java/org/keycloak/testsuite/dballocator/client/retry/IncrementalBackoffRetryPolicy.java b/testsuite/db-allocator-plugin/src/main/java/org/keycloak/testsuite/dballocator/client/retry/IncrementalBackoffRetryPolicy.java deleted file mode 100644 index 2ecd1143d3..0000000000 --- a/testsuite/db-allocator-plugin/src/main/java/org/keycloak/testsuite/dballocator/client/retry/IncrementalBackoffRetryPolicy.java +++ /dev/null @@ -1,65 +0,0 @@ -package org.keycloak.testsuite.dballocator.client.retry; - -import org.keycloak.testsuite.dballocator.client.BackoffRetryPolicy; -import org.keycloak.testsuite.dballocator.client.exceptions.DBAllocatorUnavailableException; - -import jakarta.ws.rs.core.Response; -import java.util.concurrent.Callable; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.locks.LockSupport; -import org.jboss.logging.Logger; - -public class IncrementalBackoffRetryPolicy implements BackoffRetryPolicy { - - public static final int DEFAULT_TOTAL_RETRIES = 3; - public static final int DEFAULT_BACKOFF_TIME = 10; - public static final TimeUnit DEFAULT_BACKOFF_TIME_UNIT = TimeUnit.SECONDS; - - private final int totalRetries; - private final int backoffTime; - private final TimeUnit backoffTimeUnit; - private final Logger logger = Logger.getLogger(IncrementalBackoffRetryPolicy.class); - - public IncrementalBackoffRetryPolicy() { - this(DEFAULT_TOTAL_RETRIES, DEFAULT_BACKOFF_TIME, DEFAULT_BACKOFF_TIME_UNIT); - } - - public IncrementalBackoffRetryPolicy(int totalRetries, int backoffTime, TimeUnit backoffTimeUnit) { - this.backoffTime = backoffTime; - this.backoffTimeUnit = backoffTimeUnit; - this.totalRetries = totalRetries; - } - - @Override - public Response retryTillHttpOk(Callable callableSupplier) throws DBAllocatorUnavailableException { - return retryTillHttpOk(callableSupplier, totalRetries, backoffTime, backoffTimeUnit); - } - - private Response retryTillHttpOk(Callable callableSupplier, int totalRetries, int backoffTime, TimeUnit backoffTimeUnit) throws DBAllocatorUnavailableException { - int retryCount = 0; - Response response; - while(true) { - try { - response = callableSupplier.call(); - } catch (Exception e) { - response = null; - } - - if (response != null) { - logger.info("Response status: " + response.getStatus()); - if (response.getStatus() == 200) { - return response; - } - } - - logger.info("retryCount: " + (retryCount + 1) + ", totalRetries: " + totalRetries); - if (++retryCount > totalRetries) { - logger.info("retryCount exceeded: " + retryCount); - throw new DBAllocatorUnavailableException(response); - } - - logger.info("backoffTime * retryCount: " + backoffTime * retryCount); - LockSupport.parkNanos(backoffTimeUnit.toNanos(backoffTime * retryCount)); - } - } -} diff --git a/testsuite/db-allocator-plugin/src/test/java/org/keycloak/testsuite/dballocator/client/DBAllocatorServiceClientTest.java b/testsuite/db-allocator-plugin/src/test/java/org/keycloak/testsuite/dballocator/client/DBAllocatorServiceClientTest.java deleted file mode 100644 index 76bb840bd8..0000000000 --- a/testsuite/db-allocator-plugin/src/test/java/org/keycloak/testsuite/dballocator/client/DBAllocatorServiceClientTest.java +++ /dev/null @@ -1,71 +0,0 @@ -package org.keycloak.testsuite.dballocator.client; - -import org.apache.commons.io.IOUtils; -import org.junit.Assert; -import org.junit.Test; -import org.keycloak.testsuite.dballocator.client.data.AllocationResult; -import org.keycloak.testsuite.dballocator.client.data.EraseResult; -import org.keycloak.testsuite.dballocator.client.data.ReleaseResult; -import org.keycloak.testsuite.dballocator.client.exceptions.DBAllocatorException; -import org.keycloak.testsuite.dballocator.client.exceptions.DBAllocatorUnavailableException; -import org.keycloak.testsuite.dballocator.client.mock.MockResponse; - -import jakarta.ws.rs.core.Response; -import java.io.InputStream; -import java.nio.charset.Charset; -import java.util.concurrent.TimeUnit; - - -public class DBAllocatorServiceClientTest { - - @Test - public void testSuccessfulAllocation() throws Exception { - //given - String mockURI = "http://localhost:8080/test"; - - String testProperties = null; - try(InputStream is = DBAllocatorServiceClientTest.class.getResourceAsStream("/db-allocator-response.properties")) { - testProperties = IOUtils.toString(is, Charset.defaultCharset()); - } - - Response successfulResponse = new MockResponse(200, testProperties); - BackoffRetryPolicy retryPolicyMock = callableSupplier -> successfulResponse; - - DBAllocatorServiceClient client = new DBAllocatorServiceClient(mockURI, retryPolicyMock); - - //when - AllocationResult allocationResult = client.allocate("user", "mariadb_galera_101", 1440, TimeUnit.SECONDS, "geo_RDU"); - - //then - Assert.assertEquals("d328bb0e-3dcc-42da-8ce1-83738a8dfede", allocationResult.getUUID()); - Assert.assertEquals("org.mariadb.jdbc.Driver", allocationResult.getDriver()); - Assert.assertEquals("dbname", allocationResult.getDatabase()); - Assert.assertEquals("username", allocationResult.getUser()); - Assert.assertEquals("password", allocationResult.getPassword()); - Assert.assertEquals("jdbc:mariadb://mariadb-101-galera.keycloak.org:3306", allocationResult.getURL()); - - EraseResult erase = client.erase(allocationResult); - ReleaseResult result = client.release(allocationResult); - } - - @Test - public void testFailureAllocation() throws Exception { - //given - String mockURI = "http://localhost:8080/test"; - - Response serverErrorResponse = new MockResponse(500, null); - BackoffRetryPolicy retryPolicyMock = callableSupplier -> { - throw new DBAllocatorUnavailableException(serverErrorResponse); - }; - - DBAllocatorServiceClient client = new DBAllocatorServiceClient(mockURI, retryPolicyMock); - - //when - try { - client.allocate("user", "mariadb_galera_101", 1440, TimeUnit.SECONDS, "geo_RDU"); - Assert.fail(); - } catch (DBAllocatorException e) { - Assert.assertEquals(500, e.getErrorResponse().getStatus()); - } - } -} \ No newline at end of file diff --git a/testsuite/db-allocator-plugin/src/test/java/org/keycloak/testsuite/dballocator/client/mock/MockResponse.java b/testsuite/db-allocator-plugin/src/test/java/org/keycloak/testsuite/dballocator/client/mock/MockResponse.java deleted file mode 100644 index 544f956340..0000000000 --- a/testsuite/db-allocator-plugin/src/test/java/org/keycloak/testsuite/dballocator/client/mock/MockResponse.java +++ /dev/null @@ -1,158 +0,0 @@ -package org.keycloak.testsuite.dballocator.client.mock; - -import jakarta.ws.rs.core.EntityTag; -import jakarta.ws.rs.core.GenericType; -import jakarta.ws.rs.core.Link; -import jakarta.ws.rs.core.MediaType; -import jakarta.ws.rs.core.MultivaluedMap; -import jakarta.ws.rs.core.NewCookie; -import jakarta.ws.rs.core.Response; -import java.lang.annotation.Annotation; -import java.net.URI; -import java.util.Date; -import java.util.Locale; -import java.util.Map; -import java.util.Set; - -public class MockResponse extends Response { - - private final int status; - private final String entity; - - public MockResponse(int status, String entity) { - this.status = status; - this.entity = entity; - } - - @Override - public int getStatus() { - return status; - } - - @Override - public StatusType getStatusInfo() { - throw new UnsupportedOperationException(); - } - - @Override - public Object getEntity() { - return entity; - } - - @Override - public T readEntity(Class aClass) { - if (aClass.isAssignableFrom(String.class)) { - return (T) entity; - } - throw new UnsupportedOperationException(); - } - - @Override - public T readEntity(GenericType genericType) { - throw new UnsupportedOperationException(); - } - - @Override - public T readEntity(Class aClass, Annotation[] annotations) { - throw new UnsupportedOperationException(); - } - - @Override - public T readEntity(GenericType genericType, Annotation[] annotations) { - throw new UnsupportedOperationException(); - } - - @Override - public boolean hasEntity() { - throw new UnsupportedOperationException(); - } - - @Override - public boolean bufferEntity() { - throw new UnsupportedOperationException(); - } - - @Override - public void close() { - } - - @Override - public MediaType getMediaType() { - throw new UnsupportedOperationException(); - } - - @Override - public Locale getLanguage() { - throw new UnsupportedOperationException(); - } - - @Override - public int getLength() { - throw new UnsupportedOperationException(); - } - - @Override - public Set getAllowedMethods() { - throw new UnsupportedOperationException(); - } - - @Override - public Map getCookies() { - throw new UnsupportedOperationException(); - } - - @Override - public EntityTag getEntityTag() { - throw new UnsupportedOperationException(); - } - - @Override - public Date getDate() { - throw new UnsupportedOperationException(); - } - - @Override - public Date getLastModified() { - throw new UnsupportedOperationException(); - } - - @Override - public URI getLocation() { - throw new UnsupportedOperationException(); - } - - @Override - public Set getLinks() { - throw new UnsupportedOperationException(); - } - - @Override - public boolean hasLink(String s) { - throw new UnsupportedOperationException(); - } - - @Override - public Link getLink(String s) { - throw new UnsupportedOperationException(); - } - - @Override - public Link.Builder getLinkBuilder(String s) { - throw new UnsupportedOperationException(); - } - - @Override - public MultivaluedMap getMetadata() { - throw new UnsupportedOperationException(); - } - - @Override - public MultivaluedMap getStringHeaders() { - throw new UnsupportedOperationException(); - } - - @Override - public String getHeaderString(String s) { - throw new UnsupportedOperationException(); - } -} diff --git a/testsuite/db-allocator-plugin/src/test/java/org/keycloak/testsuite/dballocator/client/retry/IncrementalBackoffRetryPolicyTest.java b/testsuite/db-allocator-plugin/src/test/java/org/keycloak/testsuite/dballocator/client/retry/IncrementalBackoffRetryPolicyTest.java deleted file mode 100644 index 8105412652..0000000000 --- a/testsuite/db-allocator-plugin/src/test/java/org/keycloak/testsuite/dballocator/client/retry/IncrementalBackoffRetryPolicyTest.java +++ /dev/null @@ -1,68 +0,0 @@ -package org.keycloak.testsuite.dballocator.client.retry; - -import org.junit.Assert; -import org.junit.Test; -import org.keycloak.testsuite.dballocator.client.exceptions.DBAllocatorUnavailableException; -import org.keycloak.testsuite.dballocator.client.retry.IncrementalBackoffRetryPolicy; - -import jakarta.ws.rs.core.Response; -import java.util.concurrent.Callable; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.LongAdder; - - -public class IncrementalBackoffRetryPolicyTest { - - static class BackoffCounter implements Callable { - - LongAdder adder = new LongAdder(); - Response responseToReport; - - public BackoffCounter(Response responseToReport) { - this.responseToReport = responseToReport; - } - - @Override - public Response call() throws Exception { - adder.add(1); - return responseToReport; - } - - public Long getCounter() { - return adder.longValue(); - } - } - - @Test - public void testBackoffLoop() { - //given - long expectedNumberOfRetries = 2; - long expectedNumberOfInvocations = expectedNumberOfRetries + 1; - BackoffCounter counter = new BackoffCounter(Response.serverError().build()); - IncrementalBackoffRetryPolicy backoffRetryPolicy = new IncrementalBackoffRetryPolicy((int) expectedNumberOfRetries, 0, TimeUnit.NANOSECONDS); - - //when - try { - backoffRetryPolicy.retryTillHttpOk(counter); - Assert.fail(); - } catch (DBAllocatorUnavailableException e) { - //then - Assert.assertEquals(expectedNumberOfInvocations, counter.getCounter().longValue()); - } - } - - @Test - public void testIgnoringBackoffWhenGettingSuccessfulResponse() throws Exception { - //given - BackoffCounter counter = new BackoffCounter(Response.ok().build()); - IncrementalBackoffRetryPolicy backoffRetryPolicy = new IncrementalBackoffRetryPolicy(3, 0, TimeUnit.NANOSECONDS); - - //when - Response response = backoffRetryPolicy.retryTillHttpOk(counter); - - //then - Assert.assertEquals(1, counter.getCounter().longValue()); - Assert.assertEquals(200, response.getStatus()); - } - -} \ No newline at end of file diff --git a/testsuite/db-allocator-plugin/src/test/resources/db-allocator-response.properties b/testsuite/db-allocator-plugin/src/test/resources/db-allocator-response.properties deleted file mode 100644 index 036c1d0e2d..0000000000 --- a/testsuite/db-allocator-plugin/src/test/resources/db-allocator-response.properties +++ /dev/null @@ -1,25 +0,0 @@ -#Generated by DBAllocator -#Mon Mar 18 12:49:24 UTC 2019 -db.password=password -hibernate.connection.password=password -hibernate41.dialect=org.hibernate.dialect.MySQL5InnoDBDialect -broken=false -db.username=username -server_geo=RDU -dballoc.db_type=clustered -db.name=dbname -db.jdbc_url=jdbc\:mariadb\://mariadb-101-galera.keycloak.org\:3306 -datasource.class.xa=org.mariadb.jdbc.MySQLDataSource -server_uid=RDU_mariadb_galera_101 -hibernate33.dialect=org.hibernate.dialect.MySQL5InnoDBDialect -hibernate.connection.username=username -server_labels=mariadb_galera_101 -db.jdbc_class=org.mariadb.jdbc.Driver -db.schema=dballo01 -hibernate.connection.driver_class=org.mariadb.jdbc.Driver -uuid=d328bb0e-3dcc-42da-8ce1-83738a8dfede -db.primary_label=mariadb_galera_101 -server_label_primary=mariadb_galera_101 -hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect -hibernate.connection.url=jdbc\:mariadb\://mariadb-101-galera-01.keycloak.org\:3306 -hibernate.connection.schema=dballo01 diff --git a/testsuite/db-allocator-plugin/src/test/resources/log4j.properties b/testsuite/db-allocator-plugin/src/test/resources/log4j.properties deleted file mode 100755 index 0032431e6f..0000000000 --- a/testsuite/db-allocator-plugin/src/test/resources/log4j.properties +++ /dev/null @@ -1,5 +0,0 @@ -log4j.rootLogger=info, stdout - -log4j.appender.stdout=org.apache.log4j.ConsoleAppender -log4j.appender.stdout.layout=org.apache.log4j.PatternLayout -log4j.appender.stdout.layout.ConversionPattern=%d{HH:mm:ss,SSS} %-5p %t [%c] %m%n \ No newline at end of file diff --git a/testsuite/integration-arquillian/pom.xml b/testsuite/integration-arquillian/pom.xml index 0fa1bc9385..35b528af8a 100644 --- a/testsuite/integration-arquillian/pom.xml +++ b/testsuite/integration-arquillian/pom.xml @@ -77,8 +77,6 @@ ${h2.version} DEFAULT - - true @@ -235,18 +233,6 @@ - - org.keycloak - db-allocator-plugin - ${project.version} - - keycloak.connectionsJpa.database - keycloak.connectionsJpa.driver - keycloak.connectionsJpa.url - keycloak.connectionsJpa.user - keycloak.connectionsJpa.password - - maven-surefire-plugin @@ -326,28 +312,6 @@ - - jpa - - - - - org.keycloak - db-allocator-plugin - false - - - allocate-db - - allocate - - - - - - - - test-70-migration @@ -429,13 +393,11 @@ + profile like "db-mysql". Also those can be manually overriden when running the test from CMD --> db-default-properties - - !dballocator.uri - + true org.h2.Driver @@ -468,14 +430,6 @@ (?si)Ready for start up.*ready [^\n]{0,30}connections - - db-allocator-db-mysql - - mysql - mysql80 - false - - db-postgres @@ -516,22 +470,6 @@ ${aws-jdbc-wrapper.version} - - db-allocator-db-postgres - - postgres - postgresql132 - false - - - - db-allocator-db-postgresplus - - postgres - postgresplus131 - false - - db-mariadb @@ -555,14 +493,6 @@ (?si)Ready for start up.*ready [^\n]{0,30}connections - - db-allocator-db-mariadb - - mariadb - mariadb_galera_103 - false - - db-mssql @@ -586,14 +516,6 @@ ${mssql-jdbc.version} - - db-allocator-db-mssql2019 - - mssql - mssql2019 - false - - db-oracle @@ -619,14 +541,6 @@ ${oracle-jdbc.version} - - db-allocator-db-oracleRAC - - oracle - oracle19cRAC - false - - diff --git a/testsuite/integration-arquillian/tests/base/pom.xml b/testsuite/integration-arquillian/tests/base/pom.xml index 1ca1b47b46..fdf03ebc7c 100644 --- a/testsuite/integration-arquillian/tests/base/pom.xml +++ b/testsuite/integration-arquillian/tests/base/pom.xml @@ -454,27 +454,6 @@ - - jpa - - - - - org.keycloak - db-allocator-plugin - false - - - release-db - - release - - - - - - - app-server-wildfly diff --git a/testsuite/pom.xml b/testsuite/pom.xml index b8f8a84e8b..11f6fdd0ae 100755 --- a/testsuite/pom.xml +++ b/testsuite/pom.xml @@ -50,7 +50,6 @@ - db-allocator-plugin integration-arquillian model utils