Commit Graph

19 Commits

Author SHA1 Message Date
javanna 33bdab1a5a Build: temporarily disable dependency licenses check (till our own get filtered out) 2016-06-09 17:32:51 +02:00
javanna 3474a145b0 fix line length 2016-06-09 17:09:15 +02:00
javanna d8c0fad08f fix failing tests 2016-06-09 17:06:58 +02:00
javanna 85606e8a4b renamed all time intervals arguments and members to include the time unit in their name 2016-06-09 16:27:52 +02:00
javanna 437c4f210b rename ElasticsearchResponse to Response and ElasticsearchResponseException to ResponseException 2016-06-09 14:38:32 +02:00
javanna be5e2e145b Decouple HostsSniffer from Sniffer
Sniffer now requires a HostsSniffer instance as a constructor argument, HostsSniffer has its won Builder helper. Also synchronized accesses to scheduledExecutorService in SnifferTask.
2016-06-09 14:27:30 +02:00
javanna 04d620da74 require hosts when creating RestClient.Builder
Also fix order of arguments when using assertEquals
2016-06-08 12:37:50 +02:00
javanna a78fe1305d require RestClient when creating Sniffer.Builder 2016-06-08 12:37:24 +02:00
javanna 791db1fb48 remove TODO around using /_cat/nodes rather than /_nodes, test compatibility with 2.x
_cat/nodes returns the http address only in 5.x. Would be nice to use as we could drop the jackson dependency, but we care more about being compatible with 2.x.
 Not compatible with previous versions as the format of returned http addresses have changed since 2.0.

Also fixed test bug that caused sporadic failures.
2016-06-08 11:43:02 +02:00
javanna 467dfbda0c use TimeUnit and long to keep track of time 2016-06-06 15:12:13 +02:00
javanna a461dd84d2 Build: add hamcrest and securemock to version.properties 2016-06-06 15:02:52 +02:00
javanna f2318ed5ae Build: add missing licenses, SHAs and enable dependency licenses check 2016-06-04 00:56:42 +02:00
javanna b15279b5ef Allow to pass socket facttry registry to createDefaultHttpClient method 2016-06-03 23:59:26 +02:00
javanna f5825b86e6 [TEST] restore needed LogManager.reset to prevent logging to sysout 2016-06-03 16:56:29 +02:00
javanna 4572b69011 [TEST] add RestClient unit tests
Unit tests rely on mockito to mock the internal HttpClient instance. No http request is performed, we only simulate interaction between RestClient and its internal HttpClient.
2016-06-03 16:20:12 +02:00
javanna 24ea585c9e don't use setDefaultHeaders from HttpClient
Store default headers ourselves instead, otherwise default ones cannot be replaced. Don't allow for multiple headers with same key, last one wins and replaces previous ones with same key.

Also fail with null params or headers.
2016-06-03 16:20:11 +02:00
javanna 51e487fa55 [TEST] remove okhttp test dependency
Use sun HttpServer instead and disable forbidden-apis for test classes. It turns out to be more flexible than okhttp as it allows get & delete with body.
2016-06-03 16:01:07 +02:00
javanna 3745305ffb [TEST] be more specific around http method used for sniffing 2016-06-03 16:01:07 +02:00
javanna 044a97c740 move client sniffer to its own project
Create a new subproject called client-sniffer that contains the o.e.client.sniff package. Since it is going to go to a separate jar, due to its additional functionalities and dependency on jackson, it makes sense to have it as a separate project that depends on client. This way we make sure that client doesn't depend on it etc.
2016-06-03 16:01:07 +02:00