mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 06:37:19 -04:00
fix failing test due to faulty api request
fixes https://github.com/elastic/logstash/issues/7086 Fixes #7144
This commit is contained in:
parent
b6c855a0a6
commit
8b2490bad8
1 changed files with 4 additions and 2 deletions
|
@ -138,6 +138,7 @@ describe "Test Logstash instance" do
|
|||
end
|
||||
|
||||
def get_id
|
||||
# make sure logstash is up and running when calling this
|
||||
JSON.parse(open("http://localhost:9600/").read)["id"]
|
||||
end
|
||||
|
||||
|
@ -149,10 +150,11 @@ describe "Test Logstash instance" do
|
|||
@ls1.wait_for_logstash
|
||||
}
|
||||
start_ls.call()
|
||||
first_id = get_id
|
||||
# we use a try since logstash may have started but the webserver may not yet
|
||||
first_id = try(num_retries) { get_id }
|
||||
@ls1.teardown
|
||||
start_ls.call()
|
||||
second_id = get_id
|
||||
second_id = try(num_retries) { get_id }
|
||||
expect(first_id).to eq(second_id)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue