-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Integration tests #6705
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
base: dev-2.x
Are you sure you want to change the base?
Integration tests #6705
Conversation
6f86f6b
to
8aacf4a
Compare
8aacf4a
to
c319f53
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev-2.x #6705 +/- ##
=============================================
- Coverage 71.65% 71.64% -0.01%
Complexity 18967 18967
=============================================
Files 2061 2061
Lines 77570 77570
Branches 7913 7913
=============================================
- Hits 55579 55576 -3
- Misses 19163 19165 +2
- Partials 2828 2829 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
021fbcb
to
d792072
Compare
ab7e7e4
to
728e3d5
Compare
1508062
to
b564538
Compare
* This integration test makes sure that Apache HTTP client still works with important hosts and | ||
* HTTP servers. | ||
*/ | ||
class OtpHttpClientTest { |
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 think @t2gran suggested the postfix for integration tests could be IntegrationTest.
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.
We could use the (admittedly pretty dusty) integration test feature of maven (via the failsafe plugin) or use the tags to select just these tests, like we do with @GeneratesDocumentation
. Do you have an opinion?
var stream = OTP_HTTP_CLIENT.getAsInputStream(uri, Duration.ofSeconds(30), Map.of()); | ||
var bytes = IOUtils.toByteArray(stream); | ||
|
||
assertNotEquals(0, bytes.length, "Empty response body for %s".formatted(url)); |
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.
Is the symptom of a HTTP client problem always an empty body?
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.
In the examples used in this test, yes.
I'm mainly testing that general HTTP calls don't throw an exception, which they did for two previous version upgrades.
Summary
As discussed I'm adding an integration test module that checks that Apache HTTP Client still works with the latest version of the code. It is run, when a pull request has the label "Integration Test".
Unit tests
Yes :)