MartijnVisser commented on code in PR #250:
URL:
https://github.com/apache/flink-connector-jdbc/pull/250#discussion_r4102679935
##########
flink-connector-jdbc-postgres/src/test/java/org/apache/flink/connector/jdbc/postgres/testutils/PostgresDatabase.java:
##########
@@ -34,16 +34,12 @@ public class PostgresDatabase extends DatabaseExtension
implements PostgresImage
private static final PostgreSQLContainer<?> CONTAINER =
new
PostgresXaContainer(POSTGRES_16).withMaxConnections(10).withMaxTransactions(50);
- private static PostgresMetadata metadata;
-
public static PostgresMetadata getMetadata() {
if (!CONTAINER.isRunning()) {
throw new FlinkRuntimeException("Container is stopped.");
}
- if (metadata == null) {
Review Comment:
It doesn't change how often the container starts, only which URL
`getMetadata()` returns. I've compared the Postgres `*Test` classes on main and
on this commit: 3 container starts and about 12s on both, over 3 runs each.
With a single fork both start one container. On main the container already
restarts per class in a reused fork, since surefire runs each class in its own
JUnit launch.
--
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]