-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Add Support for OpenTSDB HTTP interface #2254
Add Support for OpenTSDB HTTP interface #2254
Conversation
@@ -1905,6 +1905,94 @@ func Test_ServerOpenTSDBIntegration_BadData(t *testing.T) { | |||
} | |||
} | |||
|
|||
func Test_ServerOpenTSDBIntegrationHTTPSingle(t *testing.T) { |
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.
There is a lot of boilerplate here. Do you think you could combine the tests? If you use a different series for each test, you could craft queries that wouldn't overlap.
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.
Can do. The other test cases I looked at originally stuck to a single test case per-test
@otoolep the build failure is due to a race somewhere else. |
@tcolgate we're fixing up a few tests on our end. once that's done, we'll get this merged in (which might require a few small tweaks). |
@tcolgate -- we have made some changes to our test suite, such that you'll need to rebase. If you notice, we're now pushing port 0 into test servers, so that they always use a free port. Your latest test will need to do the same. I am OK with merging this once it passes, but it would be much appreciated if you could then refactor the tests so there is much less boilerplate. I think the openTSDB tests could run entirely within a single test (so could Graphite). |
@otoolep rebased. |
@otoolep I found this trick for a project at work if you are interested... I used it to set test names based on the name of the function being called...
then
It's a bit easier to use than manually setting a unique name each time. |
now := time.Now().UTC().Round(time.Second) | ||
c, _ := main.NewTestConfig() | ||
o := main.OpenTSDB{ | ||
Port: 4245, |
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.
You now need to pass in port 0 to your tests. Please see other tests on why we do this.
Can you please re-base again? |
@otoolep Updated and rebased |
@otoolep rebased again |
This branch is continually failing CI. One failure I see is the following:
|
Yes, it works locally. I suspect it's something to do with something using ipv6. Not quite sure how best to fix it, I can try forcing it to v4, but it would be nice if v6 worked. |
@otoolep I wasn't specifying the address in the HTTP tests (TCP already specified 127.0.0.1), I suspect a plain "localhost" would do too. Some other test failed after that but doesn't seem related to the TSDB support |
OpenTSDB support a http and telnet interface on the same port. This patch adds support for the /api/put endpoint, both single, for both single and multiple datapoint submissions.
@otoolep Large number of failrues in the tests, but I can't see how they can be related to my changes. |
Thanks @tcolgate. I kicked it again, and it passed. We are actively investigating the build failures, so I'd prefer to hold off merging this. The failure rate of this branch is quite high, so I want to be sure we didn't introduce another race. |
Unfortunately I've pretty much run out of time on this. Im not in a On Fri, 1 May 2015 18:09 otoolep notifications@github.com wrote:
|
Add Support for OpenTSDB HTTP interface
OpenTSDB support a http and telnet interface on the same port. This
patch adds support for the /api/put endpoint, both single, for both
single and multiple datapoint submissions.
The unit tests currently fail, this appears to be due to a change in the test framework that I'm not understanding.