Commit graph

253 commits

Author SHA1 Message Date
Armin
6179c9662a JAVAFICATION: Port namespace definitions to Java
Fixes #9490
2018-04-26 12:00:15 +00:00
Armin
76795b1633 BUILD: Stabilize integration tests
Fixes #9412
2018-04-20 15:49:16 +00:00
Armin
4b3b145968 BUILD: Stabilize integration tests
Fixes #9411
2018-04-20 14:55:21 +00:00
Tamara Braun
d919e93322 #8004 fix load order to start webserver after pipeline
Fixes #9398
2018-04-18 16:51:11 +00:00
Armin
5ef2de9802 BUILD: Stop using Exec tasks for ITs
Fixes #9388
2018-04-17 14:02:55 +00:00
Andrew Cholakian
181000c684 Add more generous try timeout for multiple pipelines specs
Fixes #9225
2018-04-10 23:48:58 +00:00
Andrew Cholakian
a1c0e417e5 Support for inter-pipeline comms with a new pipeline input/output
This also makes the load / reload cycle of pipelines threadsafe
and concurrent in the Agent class.

Fixes #9225
2018-04-10 23:48:58 +00:00
Jake Landis
4e0a139004 test fix: use single worker in test to avoid concurrency issue in sleep filter
See: https://github.com/elastic/logstash/issues/8073
See: https://github.com/logstash-plugins/logstash-filter-sleep/issues/7

Fixes: #8974

Fixes #8975
2018-01-17 18:07:53 +00:00
Jake Landis
60c883fcf7 test fix: don't use stdin for blocking pipeline
Fixes #8961
2018-01-17 14:53:42 +00:00
Jake Landis
da70fc6da6 Rspec integration tests for secret store
Fixes #8944
2018-01-16 16:46:42 +00:00
Dan Hermann
d2c7fc7eb5 Support setting logging back to defaults via the API.
Fixes #8384

Fixes #8786
2017-12-01 23:09:05 +00:00
Armin
27137ee2f6 MINOR: Make ITs use same RSpec version used by the main project
Fixes #8712
2017-11-22 18:23:39 +00:00
Armin
35022f5c02 #7135 add Gradle task for bootstrapping and running all integration tests
Fixes #8599
2017-11-14 15:25:36 +00:00
Rob Bavey
58b1e5c832 Clean up es data and log folders after ITs
Change the data and log directories to be in /tmp/ls_integrations
(matching the kafka service folder structure), and delete
them in the teardown script.

Fixes #8528
2017-11-07 21:10:50 +00:00
Armin
c7b7025cc1 #8216 Use standard name for Gemfile.lock
Fixes #8525
2017-10-26 08:33:03 +00:00
Armin
54611c3699 MINOR: Upgrade to newest devutils
Fixes #8487
2017-10-13 06:49:19 +00:00
Jake Landis
8b3cae9685 Test fix: Allow slowlog to have >= 1 entries, instead of exactly 2 entries.
Fixes #8322

Fixes #8323
2017-09-19 21:54:45 +00:00
Jake Landis
2c36246234 Test fix: ensure 'fatal: Not a git repository' is not picked up as expectation integration test Fixes #8319
Fixes #8320
2017-09-19 19:57:53 +00:00
Jake Landis
196d1a1f7e Introduce docker for CI builds.
This commit includes:
* A base Dockerfile and script to push to a Docker repo
* A per-build Dockerfile (derived from the base)
* Updates to the test scripts to allow for more parallel builds
* Docker wrappers for the tests scripts
* Update for the integration test readme to manually run the tests
* Clean up the output of the Java tests
* Remove offline tag for tests (no longer needed that we don't use docker dependent services)

This commit does NOT include:
* Changes needed for the CI system to use Docker

Fixes #8223
2017-09-14 18:55:41 +00:00
Rob Bavey
af6b610b9e Remove wait for client sleep
Fixes #8175
2017-09-13 12:53:33 +00:00
Rob Bavey
38832d367d Handle Elasticsearch errors better during DLQ integration tests
Give more time for Elasticsearch to start up, and retry after
503 responses

Fixes #8175
2017-09-13 12:53:33 +00:00
Armin
c2aba55290 #8177 break cyclic dependency on old Logstash core in ITs and properly load it before service setup
Fixes #8181
2017-09-12 21:24:25 +00:00
Jake Landis
a42b3a5f7a RATS: Remove Docker from integration tests
This is in prep for a Docker based test run approach, and by removing the dependent Docker containers we will avoid Docker in Docker requirements.

Fixes #8211
2017-09-12 13:51:04 +00:00
Armin
8edf9402c4 MINOR: Exclude JAVA_OPT* line from matching in prepare_offline_pack_spec
Fixes #8182
2017-09-08 12:59:48 +00:00
Rob Bavey
ddb8b078ff DLQ Integration Test stabilization
Attempt to stabilize DLQ Integration tests
 - Only tear down ES instance once tests are complete
 - Delete indices after each test
 - Tear down Logstash after each test

Fixes #8143
2017-09-05 23:09:39 +00:00
Rob Bavey
d1aa2864c6 DLQ integration test improvements
Added single pipeline tests

Fixes #8026
2017-09-01 19:43:45 +00:00
Rob Bavey
b1b3a117a6 Add multi-pipeline test
Needs DRY-ing up before commit, but tests should be valid

Fixes #8026
2017-09-01 19:43:45 +00:00
Rob Bavey
6b1ffbc35e RATS: Dead Letter Queue integration tests (WIP)
Simple test for dead letter queue integration tests:
  Attempt to write invalid entries to elastic search, fail and
  remove invalid field. Verify that mutated entry exists in es

Not for committing - has different jvm.options to improve stability
  to ensure that the tests pass in CI.

Fixes #7882

Fixes #8026
2017-09-01 19:43:44 +00:00
Rob Bavey
8da0737252 DeadLetterQueueReader should handle missing segment files at startup
Change DeadLetterQueueReader, so that if a missing segment file is
encountered at startup, the next valid entry will be used instead

Fixes #7433

Fixes #7457
2017-08-14 20:07:26 +00:00
Armin
a1c067dd9a MINOR: Enable JRuby AOT compilation and turn JIT threshold down to 0
Fixes #7783
2017-07-24 21:34:41 +00:00
João Duarte
7579f96797 test multiple pipelines using RATS (#7732)
- also adds `config.support_escapes` do list of pipeline settings
2017-07-19 16:43:56 +01:00
Jake Landis
3a6902c2f3 Bug Fix: Log messages from Java code base
This change re-configures default instead of creating a new context.

Fixes #7526

Fixes #7528
2017-07-06 16:53:08 +00:00
Armin
8fb4eced1b #7178 retry building Kafka image because of unstable errors from that image build
Fixes #7587
2017-07-04 13:51:19 +00:00
Pier-Hugues Pellerin
76286b4f0e use jruby 9.1.9.0
Work done by @guyboertje and @ph

Since JRuby 1.7.25 is now EOL we are migrating Logstash to use JRuby 9k and JDK8 only,
Not much needed updating to make this work, its was mostly a drop in replacement from the previous version.

The major point was the change in the implementation of Time in JRuby, JRuby now use `java.time`
instead of joda time, this allow JRuby to have nanoseconds precision on time object.
2017-06-12 12:35:10 -04:00
Rob Bavey
2d2cee4d2e Add Metrics for dead letter queue
Add an initial set of metrics for the dead letter queue.

Metrics are supplied under the pipeline in the following format:

"dead_letter_queue": {
        "queue_size_in_bytes": ...,
      }

Metrics are populated via a PeriodicPoller

Also fixed up calculation of currentQueueSize to take account
of version headers, which was previously being skipped.

Additionally, whether the dlq is enabled, and if so, the path
of the dlq is supplied under the pipelines API endpoint

Resolves #7287

Fixes #7338
2017-06-09 17:14:18 +00:00
Jake Landis
5b4a725a36 Fix #7277 Review updates
Fixes #7321
2017-06-09 14:56:40 +00:00
Jake Landis
55979c3a07 Bug Fix: Fix ability to change log level via the API
The ability to change the log level as described at https://www.elastic.co/guide/en/logstash/current/logging.html#_logging_apis appears to no longer work. The root cause of this issue is that log4j2 context we initialize is different from the log4j2 context that we are setting via the API. The fix here is to mirror the functionality of org.apache.logging.log4j.core.config.Configurator.setLevel Java method, but instead use the logging_context initialized in our code via JRuby.

Fixes #7277

Fixes #7321
2017-06-09 14:56:40 +00:00
Wainer dos Santos Moschetta
0020541370 ci: dockerized elastisearch service.
This change makes the elasticsearch service used
in integration tests be installed and started in
a docker container.

Fixes #7097

Fixes #7234
2017-06-06 10:29:19 +00:00
Joao Duarte
bed8b8a084 support multiple pipelines in one logstash instance
* add multi_local source for multi pipelines
* introduce pipelines.yml
* introduce PipelineSettings class
* support reloading of pipeline parameters
* fix pipeline api call for _node/pipelines
* inform user pipelines.yml is ignored if -e or -f is enabled
2017-05-30 09:47:53 +01:00
Andrew Cholakian
bb60eb8f47 Run offline specs separately from online ones.
The internet disabling C hack can break other tests, so, we now run
those tests separately.

Fixes https://github.com/elastic/logstash/issues/7178

Fixes #7179
2017-05-22 15:28:27 +00:00
Joao Duarte
412dd7bc08 add ExpectationNotMetError to Stud.try on monitoring_api_spec
in some tests against metrics api it's possible the values aren't there,
making the assertion fail. By default Stud.try only catches StandardError,
but rspec throws a RSpec::Expectations::ExpectationNotMetError on a failed
assertion, and this exception inherits directly from Exception.

This commit explicitly adds this exception to the list of Stud.try exceptions

Fixes #7177
2017-05-22 13:46:30 +00:00
Joao Duarte
c3df20b7cf protect monitoring_api_spec against timing issues
Fixes #7145
2017-05-21 18:52:14 +00:00
Armin
7493471063 #7160 don't run Kafka setup for every IT
Fixes #7168
2017-05-19 17:45:10 +00:00
Joao Duarte
8b2490bad8 fix failing test due to faulty api request
fixes https://github.com/elastic/logstash/issues/7086

Fixes #7144
2017-05-18 11:00:27 +00:00
Armin
f0302f100d Added note on Docker dependency to IT Readme
Fixes #7134
2017-05-17 12:07:18 +00:00
Andrew Cholakian
5cd9cba3ee Use the headless JRE for the kafka docker image
Fixes #7107
2017-05-16 17:44:01 +00:00
Pier-Hugues Pellerin
90432f5265 Relax the Geoip filter test
Since the database of the plugin can be update we cannot do a strict
assert on the geoip lat/long values instead we will use a range of
possible and valid latitude and longitude.

Fixes: #7119

Fixes #7122
2017-05-16 17:36:33 +00:00
Armin
2ac72226d3 #7091 Dockerized Kafka IT fixture
Fixes #7093
2017-05-13 22:46:24 +00:00
Armin
0aea12ce00 #7081 fix portability issues with Kafka Broker IPV4 and log path creation
Fixes #7092
2017-05-12 18:06:34 +00:00
Armin
af16ed5a88 #7081 up Kafka IT version to 0.10.2.1
Fixes #7088
2017-05-12 16:53:49 +00:00