-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Conversation
…racleContainer class declaration
@@ -7,7 +7,7 @@ | |||
/** | |||
* @author gusohal | |||
*/ | |||
public class OracleContainer extends JdbcDatabaseContainer { | |||
public class OracleContainer<SELF extends OracleContainer<SELF>> extends JdbcDatabaseContainer<SELF> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be:
public class OracleContainer<SELF extends OracleContainer<SELF>> extends JdbcDatabaseContainer<SELF> { | |
public class OracleContainer extends JdbcDatabaseContainer<OracleContainer> { |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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() { |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
Thank you @mumukiller! |
Released in 1.11.3. Thanks for the contribution! |
Added waitUntilContainerStarted method
Adjusted OracleContainer class declaration
Fixes #1423