Copilot commented on code in PR #11066:
URL: https://github.com/apache/gravitino/pull/11066#discussion_r3239818172


##########
plugins/idp-basic/src/test/java/org/apache/gravitino/storage/relational/mapper/it/TestIdpUserMetaMapperH2.java:
##########
@@ -0,0 +1,90 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.apache.gravitino.storage.relational.mapper;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+

Review Comment:
   The source file lives under `.../mapper/it/TestIdpUserMetaMapperH2.java` but 
declares `package org.apache.gravitino.storage.relational.mapper;`. The package 
statement must match the directory, otherwise the file will not compile. Either 
move the file into `.../mapper/` or change the package to 
`org.apache.gravitino.storage.relational.mapper.it`. The same issue exists for 
`TestIdpUserMetaMapperMySQL.java`, `TestIdpUserMetaMapperPostgreSQL.java`, and 
`IdpUserMetaMapperTest.java`, which are all located in the `it/` directory but 
declare the parent `mapper` package.
   



##########
plugins/idp-basic/src/test/java/org/apache/gravitino/storage/relational/mapper/it/BackendTestExtension.java:
##########
@@ -0,0 +1,196 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.apache.gravitino.storage.relational.mapper.it;
+
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.sql.SQLException;
+import java.util.Comparator;
+import java.util.List;
+import java.util.stream.Stream;
+import org.apache.gravitino.Config;
+import org.apache.gravitino.Configs;
+import org.apache.gravitino.integration.test.util.BaseIT;
+import org.apache.gravitino.storage.relational.JDBCBackend;
+import org.apache.gravitino.storage.relational.TestJDBCBackend;
+import org.apache.gravitino.storage.relational.session.SqlSessionFactoryHelper;
+import org.junit.jupiter.api.extension.AfterEachCallback;
+import org.junit.jupiter.api.extension.BeforeEachCallback;
+import org.junit.jupiter.api.extension.Extension;
+import org.junit.jupiter.api.extension.ExtensionContext;
+import org.junit.jupiter.api.extension.TestTemplateInvocationContext;
+import org.junit.jupiter.api.extension.TestTemplateInvocationContextProvider;
+
+public class BackendTestExtension implements 
TestTemplateInvocationContextProvider {
+  private static final String DOCKER_TEST_FLAG = "dockerTest";
+  private static final Object SQL_SESSION_FACTORY_MUTEX = new Object();
+
+  @Override
+  public boolean supportsTestTemplate(ExtensionContext context) {
+    return true;
+  }
+
+  @Override
+  public Stream<TestTemplateInvocationContext> 
provideTestTemplateInvocationContexts(
+      ExtensionContext context) {
+    List<String> backends = resolveBackends(context.getRequiredTestClass());
+    return backends.stream().map(BackendInvocationContext::new);
+  }
+
+  public static boolean isDockerTestEnabled() {
+    String dockerTestProperty = System.getProperty(DOCKER_TEST_FLAG);
+    if (dockerTestProperty != null) {
+      return Boolean.parseBoolean(dockerTestProperty);
+    }
+
+    return Boolean.parseBoolean(System.getenv(DOCKER_TEST_FLAG));
+  }
+
+  public static List<String> resolveBackends(Class<?> testClass) {
+    BackendTypes backendTypes = findBackendTypes(testClass);
+    return backendTypes != null
+        ? List.of(backendTypes.value())
+        : (isDockerTestEnabled() ? List.of("h2", "mysql", "postgresql") : 
List.of("h2"));
+  }
+
+  private static BackendTypes findBackendTypes(Class<?> testClass) {
+    Class<?> current = testClass;
+    while (current != null) {
+      BackendTypes backendTypes = 
current.getDeclaredAnnotation(BackendTypes.class);
+      if (backendTypes != null) {
+        return backendTypes;
+      }
+      current = current.getSuperclass();
+    }
+    return null;
+  }
+
+  private static class BackendInvocationContext implements 
TestTemplateInvocationContext {
+    private final String backendType;
+
+    private BackendInvocationContext(String backendType) {
+      this.backendType = backendType;
+    }
+
+    @Override
+    public String getDisplayName(int invocationIndex) {
+      return String.format("[%s Backend]", backendType.toUpperCase());
+    }
+
+    @Override
+    public List<Extension> getAdditionalExtensions() {
+      return List.of(new BackendSetupCallback(backendType));
+    }
+  }
+
+  private static class BackendSetupCallback implements BeforeEachCallback, 
AfterEachCallback {
+    private final BaseIT baseIT = new BaseIT();
+    private final String backendType;
+
+    private JDBCBackend backend;
+    private Path h2Path;
+
+    private BackendSetupCallback(String backendType) {
+      this.backendType = backendType;
+    }
+
+    @Override
+    public void beforeEach(ExtensionContext context) throws Exception {
+      synchronized (SQL_SESSION_FACTORY_MUTEX) {
+        backend = startBackend();
+        Object testInstance = context.getRequiredTestInstance();
+        if (testInstance instanceof TestJDBCBackend) {
+          ((TestJDBCBackend) testInstance).setBackendType(backendType);
+          ((TestJDBCBackend) testInstance).setBackend(backend);
+        }
+      }
+    }
+
+    @Override
+    public void afterEach(ExtensionContext context) throws Exception {
+      synchronized (SQL_SESSION_FACTORY_MUTEX) {
+        SqlSessionFactoryHelper.getInstance().close();
+        if (backend != null) {
+          backend.close();
+          backend = null;
+        }
+
+        if (h2Path != null && Files.exists(h2Path)) {
+          deleteDirectory(h2Path);
+          h2Path = null;
+        }
+      }
+    }
+
+    private JDBCBackend startBackend() throws SQLException {

Review Comment:
   `BackendSetupCallback` is instantiated per test-template invocation, so 
`beforeEach` starts a new MySQL/PostgreSQL container (via 
`baseIT.startAndInitMySQLBackend()` / `startAndInitPGBackend()`) for every 
single test method. Booting Docker containers per test will make the IT suite 
extremely slow and flaky. Consider starting the container once per backend 
(e.g., via a `BeforeAll`/static container cached by backend type) and only 
resetting state (truncating tables) per test.



##########
plugins/idp-basic/src/test/java/org/apache/gravitino/storage/relational/mapper/it/IdpUserMetaMapperTest.java:
##########
@@ -0,0 +1,135 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.apache.gravitino.storage.relational.mapper;

Review Comment:
   Package declaration `org.apache.gravitino.storage.relational.mapper` does 
not match the directory `.../mapper/it/`. This will fail to compile. Either 
move the file into the `mapper` directory or change the declared package to 
`org.apache.gravitino.storage.relational.mapper.it` (and update referencing 
test classes accordingly).



##########
plugins/idp-basic/src/test/java/org/apache/gravitino/storage/relational/mapper/it/TestIdpUserMetaMapperMySQL.java:
##########
@@ -0,0 +1,79 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.apache.gravitino.storage.relational.mapper;
+
+import org.apache.gravitino.storage.relational.mapper.it.BackendTypes;

Review Comment:
   File path is under `.../mapper/it/` but the declared package is 
`org.apache.gravitino.storage.relational.mapper`. The compiler will reject this 
mismatch—align the package with the directory.
   



##########
plugins/idp-basic/src/main/java/org/apache/gravitino/storage/relational/mapper/IdpUserMetaSQLProviderFactory.java:
##########
@@ -0,0 +1,112 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.apache.gravitino.storage.relational.mapper;
+
+import com.google.common.collect.ImmutableMap;
+import java.util.List;
+import java.util.Map;
+import org.apache.gravitino.storage.relational.JDBCBackend.JDBCBackendType;
+import 
org.apache.gravitino.storage.relational.mapper.provider.base.IdpUserMetaBaseSQLProvider;
+import 
org.apache.gravitino.storage.relational.mapper.provider.postgresql.IdpUserMetaPostgreSQLProvider;
+import org.apache.gravitino.storage.relational.po.IdpUserPO;
+import org.apache.gravitino.storage.relational.session.SqlSessionFactoryHelper;
+import org.apache.ibatis.annotations.Param;
+
+public class IdpUserMetaSQLProviderFactory {
+  private static final Map<JDBCBackendType, IdpUserMetaBaseSQLProvider>
+      IDP_USER_META_SQL_PROVIDER_MAP =
+          ImmutableMap.of(
+              JDBCBackendType.MYSQL, new IdpUserMetaMySQLProvider(),
+              JDBCBackendType.H2, new IdpUserMetaBaseSQLProvider(),
+              JDBCBackendType.POSTGRESQL, new IdpUserMetaPostgreSQLProvider());
+
+  public static IdpUserMetaBaseSQLProvider getProvider() {
+    String databaseId =
+        SqlSessionFactoryHelper.getInstance()
+            .getSqlSessionFactory()
+            .getConfiguration()
+            .getDatabaseId();
+
+    return getProvider(databaseId);
+  }
+
+  static IdpUserMetaBaseSQLProvider getProvider(String databaseId) {
+    if (databaseId == null) {
+      throw new IllegalStateException(
+          "MyBatis databaseId is not configured for IdP user SQL providers.");
+    }
+
+    JDBCBackendType jdbcBackendType;
+    try {
+      jdbcBackendType = JDBCBackendType.fromString(databaseId);
+    } catch (IllegalArgumentException e) {
+      throw new IllegalStateException(
+          String.format(
+              "Unsupported IdP user SQL provider databaseId: %s, supported 
backends: %s",
+              databaseId, IDP_USER_META_SQL_PROVIDER_MAP.keySet()),
+          e);
+    }
+
+    return getProvider(jdbcBackendType, databaseId, 
IDP_USER_META_SQL_PROVIDER_MAP);
+  }
+
+  static IdpUserMetaBaseSQLProvider getProvider(
+      JDBCBackendType jdbcBackendType,
+      String databaseId,
+      Map<JDBCBackendType, IdpUserMetaBaseSQLProvider> providerMap) {
+    IdpUserMetaBaseSQLProvider provider = providerMap.get(jdbcBackendType);
+    if (provider == null) {
+      throw new IllegalStateException(
+          String.format(
+              "No IdP user SQL provider registered for backend %s (databaseId: 
%s)",
+              jdbcBackendType, databaseId));
+    }
+
+    return provider;
+  }
+
+  static class IdpUserMetaMySQLProvider extends IdpUserMetaBaseSQLProvider {}

Review Comment:
   `IdpUserMetaMySQLProvider` is an empty subclass nested inside the factory 
and is exposed only to tests via package-private visibility. Since it adds no 
behavior over `IdpUserMetaBaseSQLProvider`, you could either (a) drop it and 
map `JDBCBackendType.MYSQL` directly to `new IdpUserMetaBaseSQLProvider()`, or 
(b) promote it to its own top-level class under the `provider.mysql` package to 
mirror the PostgreSQL provider layout. As written it is inconsistent with how 
the other dialect providers are organized.



##########
plugins/idp-basic/src/test/java/org/apache/gravitino/storage/relational/mapper/it/TestIdpUserMetaMapperPostgreSQL.java:
##########
@@ -0,0 +1,80 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.apache.gravitino.storage.relational.mapper;
+
+import org.apache.gravitino.storage.relational.mapper.it.BackendTypes;

Review Comment:
   Package/directory mismatch: file is in `.../mapper/it/` but declares 
`package org.apache.gravitino.storage.relational.mapper;`. This will not 
compile.
   



##########
plugins/idp-basic/src/test/java/org/apache/gravitino/storage/relational/mapper/it/BackendTestExtension.java:
##########
@@ -0,0 +1,196 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.apache.gravitino.storage.relational.mapper.it;
+
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.sql.SQLException;
+import java.util.Comparator;
+import java.util.List;
+import java.util.stream.Stream;
+import org.apache.gravitino.Config;
+import org.apache.gravitino.Configs;
+import org.apache.gravitino.integration.test.util.BaseIT;
+import org.apache.gravitino.storage.relational.JDBCBackend;
+import org.apache.gravitino.storage.relational.TestJDBCBackend;
+import org.apache.gravitino.storage.relational.session.SqlSessionFactoryHelper;
+import org.junit.jupiter.api.extension.AfterEachCallback;
+import org.junit.jupiter.api.extension.BeforeEachCallback;
+import org.junit.jupiter.api.extension.Extension;
+import org.junit.jupiter.api.extension.ExtensionContext;
+import org.junit.jupiter.api.extension.TestTemplateInvocationContext;
+import org.junit.jupiter.api.extension.TestTemplateInvocationContextProvider;
+
+public class BackendTestExtension implements 
TestTemplateInvocationContextProvider {
+  private static final String DOCKER_TEST_FLAG = "dockerTest";
+  private static final Object SQL_SESSION_FACTORY_MUTEX = new Object();
+
+  @Override
+  public boolean supportsTestTemplate(ExtensionContext context) {
+    return true;

Review Comment:
   Returning `true` unconditionally means this extension claims support for 
every `@TestTemplate`, including ones unrelated to backend parameterization. If 
another `TestTemplateInvocationContextProvider` is ever added to the same 
class, both will fire. Consider gating on the presence of `@BackendTypes` 
(directly or inherited) or on the test class extending the expected base.
   



##########
plugins/idp-basic/src/test/java/org/apache/gravitino/storage/relational/mapper/it/BackendTestExtension.java:
##########
@@ -0,0 +1,196 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.apache.gravitino.storage.relational.mapper.it;
+
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.sql.SQLException;
+import java.util.Comparator;
+import java.util.List;
+import java.util.stream.Stream;
+import org.apache.gravitino.Config;
+import org.apache.gravitino.Configs;
+import org.apache.gravitino.integration.test.util.BaseIT;
+import org.apache.gravitino.storage.relational.JDBCBackend;
+import org.apache.gravitino.storage.relational.TestJDBCBackend;
+import org.apache.gravitino.storage.relational.session.SqlSessionFactoryHelper;
+import org.junit.jupiter.api.extension.AfterEachCallback;
+import org.junit.jupiter.api.extension.BeforeEachCallback;
+import org.junit.jupiter.api.extension.Extension;
+import org.junit.jupiter.api.extension.ExtensionContext;
+import org.junit.jupiter.api.extension.TestTemplateInvocationContext;
+import org.junit.jupiter.api.extension.TestTemplateInvocationContextProvider;
+
+public class BackendTestExtension implements 
TestTemplateInvocationContextProvider {
+  private static final String DOCKER_TEST_FLAG = "dockerTest";
+  private static final Object SQL_SESSION_FACTORY_MUTEX = new Object();
+
+  @Override
+  public boolean supportsTestTemplate(ExtensionContext context) {
+    return true;
+  }
+
+  @Override
+  public Stream<TestTemplateInvocationContext> 
provideTestTemplateInvocationContexts(
+      ExtensionContext context) {
+    List<String> backends = resolveBackends(context.getRequiredTestClass());
+    return backends.stream().map(BackendInvocationContext::new);
+  }
+
+  public static boolean isDockerTestEnabled() {
+    String dockerTestProperty = System.getProperty(DOCKER_TEST_FLAG);
+    if (dockerTestProperty != null) {
+      return Boolean.parseBoolean(dockerTestProperty);
+    }
+
+    return Boolean.parseBoolean(System.getenv(DOCKER_TEST_FLAG));
+  }
+
+  public static List<String> resolveBackends(Class<?> testClass) {
+    BackendTypes backendTypes = findBackendTypes(testClass);
+    return backendTypes != null
+        ? List.of(backendTypes.value())
+        : (isDockerTestEnabled() ? List.of("h2", "mysql", "postgresql") : 
List.of("h2"));
+  }
+
+  private static BackendTypes findBackendTypes(Class<?> testClass) {
+    Class<?> current = testClass;
+    while (current != null) {
+      BackendTypes backendTypes = 
current.getDeclaredAnnotation(BackendTypes.class);
+      if (backendTypes != null) {
+        return backendTypes;
+      }
+      current = current.getSuperclass();
+    }
+    return null;
+  }
+
+  private static class BackendInvocationContext implements 
TestTemplateInvocationContext {
+    private final String backendType;
+
+    private BackendInvocationContext(String backendType) {
+      this.backendType = backendType;
+    }
+
+    @Override
+    public String getDisplayName(int invocationIndex) {
+      return String.format("[%s Backend]", backendType.toUpperCase());
+    }
+
+    @Override
+    public List<Extension> getAdditionalExtensions() {
+      return List.of(new BackendSetupCallback(backendType));
+    }
+  }
+
+  private static class BackendSetupCallback implements BeforeEachCallback, 
AfterEachCallback {
+    private final BaseIT baseIT = new BaseIT();
+    private final String backendType;
+
+    private JDBCBackend backend;
+    private Path h2Path;
+
+    private BackendSetupCallback(String backendType) {
+      this.backendType = backendType;
+    }
+
+    @Override
+    public void beforeEach(ExtensionContext context) throws Exception {
+      synchronized (SQL_SESSION_FACTORY_MUTEX) {
+        backend = startBackend();
+        Object testInstance = context.getRequiredTestInstance();
+        if (testInstance instanceof TestJDBCBackend) {
+          ((TestJDBCBackend) testInstance).setBackendType(backendType);
+          ((TestJDBCBackend) testInstance).setBackend(backend);
+        }
+      }
+    }
+
+    @Override
+    public void afterEach(ExtensionContext context) throws Exception {
+      synchronized (SQL_SESSION_FACTORY_MUTEX) {
+        SqlSessionFactoryHelper.getInstance().close();
+        if (backend != null) {
+          backend.close();
+          backend = null;
+        }
+
+        if (h2Path != null && Files.exists(h2Path)) {
+          deleteDirectory(h2Path);
+          h2Path = null;
+        }
+      }
+    }
+
+    private JDBCBackend startBackend() throws SQLException {
+      Config config = new Config(false) {};
+      config.set(Configs.ENTITY_STORE, Configs.RELATIONAL_ENTITY_STORE);
+      config.set(Configs.ENTITY_RELATIONAL_STORE, backendType);
+      config.set(Configs.ENTITY_RELATIONAL_JDBC_BACKEND_MAX_CONNECTIONS, 20);
+      config.set(Configs.ENTITY_RELATIONAL_JDBC_BACKEND_WAIT_MILLISECONDS, 
1000L);
+
+      if ("mysql".equals(backendType)) {
+        config.set(Configs.ENTITY_RELATIONAL_JDBC_BACKEND_URL, 
baseIT.startAndInitMySQLBackend());

Review Comment:
   `BackendSetupCallback` is instantiated per test-template invocation, so 
`beforeEach` starts a new MySQL/PostgreSQL container (via 
`baseIT.startAndInitMySQLBackend()` / `startAndInitPGBackend()`) for every 
single test method. Booting Docker containers per test will make the IT suite 
extremely slow and flaky. Consider starting the container once per backend 
(e.g., via a `BeforeAll`/static container cached by backend type) and only 
resetting state (truncating tables) per test.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to