This repository was archived by the owner on Jan 16, 2026. It is now read-only.
testing: add a basic integration test#110
Merged
keep94 merged 1 commit intowavefrontHQ:masterfrom Oct 24, 2022
LukeWinikates:integration-test
Merged
testing: add a basic integration test#110keep94 merged 1 commit intowavefrontHQ:masterfrom LukeWinikates:integration-test
keep94 merged 1 commit intowavefrontHQ:masterfrom
LukeWinikates:integration-test
Conversation
keep94
suggested changes
Oct 12, 2022
Contributor
keep94
left a comment
There was a problem hiding this comment.
Thanks for adding this integration test, LukeWinikates. I'd like to see this test use the httptest.Server type which binds to a random opened port. Recently I had trouble running a test suite of a library because I was already running a service on the same port it happened to be trying to use.
keep94
reviewed
Oct 13, 2022
Contributor
keep94
left a comment
There was a problem hiding this comment.
Thanks LukeWinikates for this work. Just a few minor comments.
keep94
reviewed
Oct 17, 2022
| metricLines = append(metricLines, line) | ||
| } | ||
| if scanner.Err() != nil { | ||
| return metricLines, scanner.Err() |
Contributor
There was a problem hiding this comment.
If you get here, you will leak the gzip.Reader
Contributor
Author
There was a problem hiding this comment.
Thanks for the catch! I just pushed a change adding reader.Close() right before this line. That seems like a reasonable choice but it did have me wishing I could just use defer.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In the process of working on #109 , I was worried about not having automated end-to-end test coverage, and I thought that even a simple test against a local http server might make it easier to refactor the sdk internals with greater confidence.
@keep94 what do you think?
cc: @suprajanarasimhan @ktollivervmw