mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 22:57:16 -04:00
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
This commit is contained in:
parent
c16c702766
commit
ddb8b078ff
1 changed files with 13 additions and 9 deletions
|
@ -6,19 +6,23 @@ require "logstash/devutils/rspec/spec_helper"
|
||||||
|
|
||||||
describe "Test Dead Letter Queue" do
|
describe "Test Dead Letter Queue" do
|
||||||
|
|
||||||
before(:each) {
|
before(:all) {
|
||||||
@fixture = Fixture.new(__FILE__)
|
@fixture = Fixture.new(__FILE__)
|
||||||
|
}
|
||||||
|
|
||||||
|
after(:all) {
|
||||||
|
@fixture.teardown
|
||||||
|
}
|
||||||
|
|
||||||
|
before(:each) {
|
||||||
IO.write(config_yaml_file, config_yaml)
|
IO.write(config_yaml_file, config_yaml)
|
||||||
}
|
}
|
||||||
|
|
||||||
after(:each) {
|
after(:each) do
|
||||||
begin
|
es_client = @fixture.get_service("elasticsearch").get_client
|
||||||
es_client = @fixture.get_service("elasticsearch").get_client
|
es_client.indices.delete(index: 'logstash-*') unless es_client.nil?
|
||||||
es_client.indices.delete(index: 'logstash-*') unless es_client.nil?
|
logstash_service.teardown
|
||||||
ensure
|
end
|
||||||
@fixture.teardown
|
|
||||||
end
|
|
||||||
}
|
|
||||||
|
|
||||||
let(:logstash_service) { @fixture.get_service("logstash") }
|
let(:logstash_service) { @fixture.get_service("logstash") }
|
||||||
let(:dlq_dir) { Stud::Temporary.directory }
|
let(:dlq_dir) { Stud::Temporary.directory }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue