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

QueryTimeout #61

Open
fafafifi123 opened this issue Aug 26, 2019 · 3 comments
Open

QueryTimeout #61

fafafifi123 opened this issue Aug 26, 2019 · 3 comments
Assignees
Labels

Comments

@fafafifi123
Copy link

Is there a way to specify connection / query timeout while using assertj db ?

@VanRoy VanRoy self-assigned this Dec 6, 2019
@VanRoy VanRoy added the question label Dec 6, 2019
@VanRoy
Copy link
Member

VanRoy commented Dec 6, 2019

@willyhalim , Currently you have two ways to do that :

  1. You can use properties in JDBC connection URL with AssertJ-DB Source ( For example with Postgresl : https://jdbc.postgresql.org/documentation/head/connect.html )
  2. You can use settings of DataSource and use it in Table instead of Source

Tell me if it fit with your requirement.

@fafafifi123
Copy link
Author

It seems didnt work , in normal prepared statement i can do something like this

 ps = conn.prepareStatement(query);
            if (queryTimeout > 0) {
                ps.setQueryTimeout(queryTimeout);
                LOGGER.info("set querytimeout {}", queryTimeout);
            }

@VanRoy
Copy link
Member

VanRoy commented Nov 1, 2020

Hi @willyhalim , can you send me some details of your issue / use case ? When the timeout error is raised ? During the connection ? During an assertj-db assertion ?
Thanks.

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

No branches or pull requests

2 participants