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

Await endpoints in check, not httpClient #2667

Merged
merged 3 commits into from Jul 15, 2019

Conversation

anuraaga
Copy link
Contributor

@anuraaga anuraaga commented Jul 14, 2019

Noticed that some non-integration tests were slow waiting and failing on the initial endpoints because they don't have real ones. It was dubious to be waiting in the method that creates an object anyways, so I moved it to check which seems like the right spot. Reduced the timeout to use the configured one too.

Also apply some cleanups mentioned in #2653

Copy link
Member

@codefromthecrypt codefromthecrypt left a comment

Choose a reason for hiding this comment

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

good work

* Customizes the {@link HttpClientBuilder} used when connecting to ElasticSearch. Mostly for
* testing.
* Customizes the {@link HttpClientBuilder} used when connecting to ElasticSearch. This is used
* by the server and tests to enable detailed logging and tweak timeouts.
Copy link
Member

Choose a reason for hiding this comment

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

this is good but doesnt explain why it needs to be public. usually for tests we use internal package accessors which allows us to remove or change the method. we dont expose public methods unless there is non test code using it in other words

Copy link
Member

Choose a reason for hiding this comment

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

ex below you could add exactly why like // specifically this is used for self tracing

or whatever it is used for.. reason is, that sometimes we have added methidd for gcp or aws and forgot and then broke them

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The main reason is the server - it calls these from zipkin2.server.internal.elasticsearch. Actually don't see usage of these in zipkin-aws.

I'll leave the comments like this for now since not sure of a better alternative.

@codefromthecrypt
Copy link
Member

ps my note on docs is a nit as they are already better than probably everything. just didn't merge as it is red and haven't looked into why

Copy link
Contributor Author

@anuraaga anuraaga left a comment

Choose a reason for hiding this comment

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

Yeah found the lifecycle during autocomplete integration tests was tripping up so made it more explicit. I'll take a scalpel to these integration tests soon to make them clearer / faster.

* Customizes the {@link HttpClientBuilder} used when connecting to ElasticSearch. Mostly for
* testing.
* Customizes the {@link HttpClientBuilder} used when connecting to ElasticSearch. This is used
* by the server and tests to enable detailed logging and tweak timeouts.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The main reason is the server - it calls these from zipkin2.server.internal.elasticsearch. Actually don't see usage of these in zipkin-aws.

I'll leave the comments like this for now since not sure of a better alternative.

@anuraaga anuraaga merged commit 5d56d19 into openzipkin:master Jul 15, 2019
@codefromthecrypt
Copy link
Member

heh we will have to port zipkin-aws soon (probably today would be good) as it is not using this because it hasn't migrated off okhttp yet https://github.com/openzipkin/zipkin-aws/blob/master/autoconfigure/storage-elasticsearch-aws/src/main/java/zipkin/autoconfigure/storage/elasticsearch/aws/ZipkinElasticsearchAwsStorageAutoConfiguration.java#L53

abesto pushed a commit to abesto/zipkin that referenced this pull request Sep 10, 2019
* Await endpoints in check, not httpClient

* More explicit cleanup order in autocomplete tests.
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.

None yet

2 participants