-
-
Notifications
You must be signed in to change notification settings - Fork 445
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
test for sql wait strategy #214
Conversation
c3728cb
to
15d2e8f
Compare
The wait.ForSQL wait strategy does not have a testcase and I forgot about how to use it as well. I decided to write it in preparation for the work/discussion ongoing here: #166
15d2e8f
to
7623f53
Compare
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.
LGTM!
Codecov Report
@@ Coverage Diff @@
## main #214 +/- ##
==========================================
+ Coverage 68.88% 75.40% +6.51%
==========================================
Files 22 23 +1
Lines 2144 2500 +356
==========================================
+ Hits 1477 1885 +408
+ Misses 528 484 -44
+ Partials 139 131 -8
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
wait/sql.go
Outdated
db.SetConnMaxLifetime(0) | ||
db.SetMaxIdleConns(3) | ||
db.SetMaxOpenConns(3) |
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.
Although the code LGTM, I'm a bit reluctant to hardcode this value here without giving the user the ability to set them in the wait strategy, according to their own requirements for the database under test. If we add them as part of the SQL strategy, then I think it's fine.
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.
Thinking about this twice, these settings should be added in a separate PR. Will send a commit on top removing them, and opening a discussion to make this configurable
✅ Deploy Preview for testcontainers-go ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
I think I'm going to close this issue, as it's changing the default timeout values. I'd reopen it if we receive issues for the wait.ForSQL to fail under low timeout values. Thanks for your work here. |
The wait.ForSQL wait strategy does not have a testcase and I forgot
about how to use it as well.
I decided to write it in preparation for the work/discussion ongoing
here: #166