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

Support SELF typing for OracleContainer #1425

Merged
merged 3 commits into from Apr 27, 2019

Conversation

mumukiller
Copy link
Contributor

@mumukiller mumukiller commented Apr 25, 2019

Added waitUntilContainerStarted method
Adjusted OracleContainer class declaration

Fixes #1423

@@ -7,7 +7,7 @@
/**
* @author gusohal
*/
public class OracleContainer extends JdbcDatabaseContainer {
public class OracleContainer<SELF extends OracleContainer<SELF>> extends JdbcDatabaseContainer<SELF> {
Copy link
Member

Choose a reason for hiding this comment

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

It should be:

Suggested change
public class OracleContainer<SELF extends OracleContainer<SELF>> extends JdbcDatabaseContainer<SELF> {
public class OracleContainer extends JdbcDatabaseContainer<OracleContainer> {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So PostgreSQLContainer and MySQLContainer have also legacy class declaration, is it correct?

Copy link
Member

Choose a reason for hiding this comment

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

yes, I think most of them

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

@@ -108,4 +108,9 @@ public Integer getWebPort() {
public String getTestQueryString() {
return "SELECT 1 FROM DUAL";
}

@Override
protected void waitUntilContainerStarted() {
Copy link
Member

Choose a reason for hiding this comment

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

why do you need to override it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I checked PostgreSQLContainer and it overrides waitUntilContainerStarted method but after your comment i also checked MySQLContainer which does not. I suppose that WaitStrategy for most JdbcDatabaseContainer containers is the same.

Copy link
Member

Choose a reason for hiding this comment

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

PostgreSQLContainer uses log-based wait strategy, while others inherit the JDBC one, hence the override

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

…od. Changed class declaration according.
@bsideup bsideup changed the title PR #1292 Added waitUntilContainerStarted method for OracleContainer Fix #1292 by changing the signature of OracleContainer Apr 26, 2019
@bsideup bsideup added this to the next milestone Apr 26, 2019
@bsideup bsideup changed the title Fix #1292 by changing the signature of OracleContainer Fix #1423 by changing the signature of OracleContainer Apr 26, 2019
@kiview kiview changed the title Fix #1423 by changing the signature of OracleContainer Support SELF typing for OracleContainer Apr 26, 2019
@rnorth rnorth merged commit f604a2f into testcontainers:master Apr 27, 2019
@rnorth
Copy link
Member

rnorth commented Apr 27, 2019

Thank you @mumukiller!

@rnorth rnorth modified the milestones: next, 1.11.3 May 21, 2019
@rnorth
Copy link
Member

rnorth commented May 21, 2019

Released in 1.11.3. Thanks for the contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

OracleContainer extends JdbcDatabaseContainer without generic type
4 participants