Skip to content
Closed
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 @@ -64,9 +64,18 @@ public OracleContainer(String dockerImageName) {
this(DockerImageName.parse(dockerImageName));
}

public OracleContainer(Future<String> image) {
Copy link

Copilot AI Jun 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new Future constructor does not enforce compatibility with DEFAULT_IMAGE_NAME. Consider parsing the resolved image into a DockerImageName and calling assertCompatibleWith(DEFAULT_IMAGE_NAME) to maintain consistent safety checks.

Copilot uses AI. Check for mistakes.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That comment is actually correct.

super(image);
preconfigure();
}

public OracleContainer(final DockerImageName dockerImageName) {
super(dockerImageName);
dockerImageName.assertCompatibleWith(DEFAULT_IMAGE_NAME);
preconfigure();
}

private void preconfigure() {
Comment on lines +69 to +78
Copy link

Copilot AI Jun 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The method name preconfigure is generic; consider renaming it to something more descriptive, like applyDefaultWaitingStrategy or configureStartupWait for clarity.

Suggested change
preconfigure();
}
public OracleContainer(final DockerImageName dockerImageName) {
super(dockerImageName);
dockerImageName.assertCompatibleWith(DEFAULT_IMAGE_NAME);
preconfigure();
}
private void preconfigure() {
configureStartupWait();
}
public OracleContainer(final DockerImageName dockerImageName) {
super(dockerImageName);
dockerImageName.assertCompatibleWith(DEFAULT_IMAGE_NAME);
configureStartupWait();
}
private void configureStartupWait() {

Copilot uses AI. Check for mistakes.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we normally have this config in a protected void configure() method.

waitingFor(
Wait
.forLogMessage(".*DATABASE IS READY TO USE!.*\\s", 1)
Expand Down
Loading