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

Fix AgroalPoolTest by removing interfering datasource connections #1310

Merged

Conversation

michalvavrik
Copy link
Member

Summary

With quarkusio/quarkus#34262 our AgroalPoolTest is failing, without quarkusio/quarkus#34262, it is not (no flakyness, always fails). Flyway is using Agroal datasources to open connection, so jdbc.max-size, idle-removal-interval and so on should work even for Flyway. I'm not sure what underlying Flyway changes are (it already took me long to find this one), but it is clear that we actually test both opened connections for both datasources, but expect only opened connections for one datasource. So when I ensured that idle connections are removed for with-xa and that min-size is zero, problem got fixed.

Please select the relevant options.

  • Bug fix (non-breaking change which fixes an issue)
  • Dependency update
  • Refactoring
  • Backport
  • New scenario (non-breaking change which adds functionality)
  • This change requires a documentation update
  • This change requires execution against OCP (use run tests phrase in comment)

Checklist:

  • Methods and classes used in PR scenarios are meaningful
  • Commits are well encapsulated and follow the best practices

@michalvavrik michalvavrik requested a review from fedinskiy July 10, 2023 12:02
@fedinskiy
Copy link
Contributor

fedinskiy commented Jul 10, 2023

@michalvavrik it looks like the problem is not in minsize, but in limit on max size of a pool

@fedinskiy
Copy link
Contributor

@michalvavrik could you answer in a separate comment, please? Or, at least, not in my comment :)

@michalvavrik
Copy link
Member Author

:-D, sorry, that was not my intention :-/ I don't think it is alright that I have right to adjust your comments btw.

@michalvavrik
Copy link
Member Author

@michalvavrik it looks like the problem is not in minsize, but in limit on max size of a pool

I realize min size 0 is default, but our point is to allow 0 connections and make sure they are idle so that they are removed before we start testing. Max size is not important because we don't want any connections (ideally).

Update: I also set max size etc. Basically I wanted to be sure, we can cut it down if necessary.

@fedinskiy
Copy link
Contributor

It looks like we do not need xa connection for agroal test at all, so why don't we set agroal_pool_test.quarkus.datasource.with-xa.jdbc.max-size to zero and call it a day?

@michalvavrik
Copy link
Member Author

michalvavrik commented Jul 10, 2023

It looks like we do not need xa connection for agroal test at all, so why don't we set agroal_pool_test.quarkus.datasource.with-xa.jdbc.max-size to zero and call it a day?

I tried, there is some minimum that doesn't allow it.

Copy link
Contributor

@fedinskiy fedinskiy left a comment

Choose a reason for hiding this comment

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

Weird, that we didn't find this earlier. Thank you!

@fedinskiy fedinskiy merged commit 1583f2b into quarkus-qe:main Jul 10, 2023
@michalvavrik michalvavrik deleted the feature/fix-agroal-pool-test branch July 10, 2023 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants