You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I looking for guidance on how to supply a custom query to check if my container is ready for use or not?
E.g I have Oracle Xe container which loads lot of data while initializing. The wait strategy runs 'SELECT 1 FROM DUAL' which returns result since the database is started but the init scripts and data load in not complete so my test fails.
Is there any way i can use some other query for wait strategy.
The text was updated successfully, but these errors were encountered:
As a solution I moved the validation check on spring datasource config.
I also understood that the validation query is from OracleContianer from test containers and they don't expose anyway to inject custom query.
yes, there is no default option for it right now, but should not be a problem to add it, but extending OracleContainer object, or contribute to upstream testcontainers project to allow override default check query.
if a solution with spring datasource check query suits your needs please close the ticket,
or you may contribute this change to the project so we can include it,
or you may leave this ticket open, we may take a look at this sometime later.
Aloren
changed the title
Help Needed - Is there any way to supply custom query to check if Database is ready or not.
supply custom query to check if Database is ready or not
Feb 21, 2021
Hi,
I looking for guidance on how to supply a custom query to check if my container is ready for use or not?
E.g I have Oracle Xe container which loads lot of data while initializing. The wait strategy runs 'SELECT 1 FROM DUAL' which returns result since the database is started but the init scripts and data load in not complete so my test fails.
Is there any way i can use some other query for wait strategy.
The text was updated successfully, but these errors were encountered: