Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#noissue] Cleanup #11569

Merged
merged 1 commit into from
Oct 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public Properties beforeAll() {

Properties properties = new Properties();
properties.setProperty("PORT", port.toString());
System.setProperty("PORT", port.toString());
System.getProperties().putAll(properties);
return properties;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public Properties beforeAll() {
final Integer port = cassandra.getMappedPort(CassandraContainer.CQL_PORT);
Properties properties = new Properties();
properties.setProperty("PORT", port.toString());
System.setProperty("PORT", port.toString());
System.getProperties().putAll(properties);

return properties;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public Properties beforeAll() {

Integer port = elasticsearchContainer.getMappedPort(ESServerContainerFactory.DEFAULT_PORT);
properties.setProperty("PORT", port.toString());
System.setProperty("PORT", port.toString());
System.getProperties().putAll(properties);
return properties;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ public Properties beforeAll() {

Integer port = elasticsearchContainer.getMappedPort(ESServerContainerFactory.DEFAULT_PORT);
properties.setProperty("PORT", port.toString());
System.setProperty("PORT", port.toString());

System.getProperties().putAll(properties);
return properties;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,7 @@ public Properties beforeAll() {
container.withLogConsumer(new LogOutputStream(LOGGER::info));
container.start();

Connection connection = null;
try {
connection = createConnection("localhost:" + container.getFirstMappedPort() + "/sysmaster", "informix", "in4mix");
try (Connection connection = createConnection("localhost:" + container.getFirstMappedPort() + "/sysmaster", "informix", "in4mix")) {
Statement statement = connection.createStatement();

List<String> tableQuery = createTableQuery();
Expand All @@ -59,19 +57,12 @@ public Properties beforeAll() {
}
} catch (Exception e) {
LOGGER.error("Failed to start testcontainer", e);
} finally {
if (connection != null) {
try {
connection.close();
} catch (SQLException ignored) {
}
}
}

Integer port = container.getFirstMappedPort();
Properties properties = new Properties();
properties.setProperty("PORT", port.toString());
System.setProperty("PORT", port.toString());
System.getProperties().putAll(properties);
return properties;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,7 @@ public Properties beforeAll() {
Properties properties = new Properties();
properties.setProperty("PORT", String.valueOf(server.getBrokerPort()));
properties.setProperty("OFFSET", String.valueOf(OFFSET_STORE.getOffset()));
System.setProperty("PORT", String.valueOf(server.getBrokerPort()));
System.setProperty("OFFSET", String.valueOf(OFFSET_STORE.getOffset()));
System.getProperties().putAll(properties);
return properties;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@ public Properties beforeAll() {
Properties properties = new Properties();
properties.setProperty("PORT", String.valueOf(port));
properties.setProperty("OFFSET", String.valueOf(OFFSET_STORE.getOffset()));
System.setProperty("OFFSET", String.valueOf(OFFSET_STORE.getOffset()));
System.setProperty("PORT", String.valueOf(port));
System.getProperties().putAll(properties);
return properties;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public Properties beforeAll() {

Properties properties = new Properties();
properties.setProperty("PORT", String.valueOf(port));
System.setProperty("PORT", String.valueOf(port));
System.getProperties().putAll(properties);
return properties;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public Properties beforeAll() {
int port = container.getFirstMappedPort();
Properties properties = new Properties();
properties.setProperty("PORT", String.valueOf(port));
System.setProperty("PORT", String.valueOf(port));
System.getProperties().putAll(properties);
return properties;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ public Properties beforeAll() {
Properties properties = new Properties();
properties.setProperty("HOST", redisServer.getHost());
properties.setProperty("PORT", String.valueOf(redisServer.getMappedPort(6379)));
System.setProperty("HOST", redisServer.getHost());
System.setProperty("PORT", String.valueOf(redisServer.getMappedPort(6379)));
System.getProperties().putAll(properties);

return properties;
}
Expand Down