Commit 07705473 authored by Ramya Authappan's avatar Ramya Authappan

Merge branch 'egb-search-nightly-cache-time' into 'master'

Consolidate wait for elasticsearch cache

See merge request gitlab-org/gitlab!48980
parents fc8fac12 ba5ef216
...@@ -26,10 +26,17 @@ module QA ...@@ -26,10 +26,17 @@ module QA
es.click_submit es.click_submit
end end
end end
sleep(90)
# wait for the change to propagate before inserting records or else
# Gitlab::CurrentSettings.elasticsearch_indexing and
# Elastic::ApplicationVersionedSearch::searchable? will be false
# this sleep can be removed after we're able to query logs via the API
# as per this issue https://gitlab.com/gitlab-org/quality/team-tasks/issues/395
end end
def fabricate_via_api! def fabricate_via_api!
@es_enabled ? api_put : resource_web_url(api_get) @es_enabled ? api_put : resource_web_url(api_get)
sleep(90)
end end
def resource_web_url(resource) def resource_web_url(resource)
......
...@@ -21,12 +21,6 @@ module QA ...@@ -21,12 +21,6 @@ module QA
before do before do
unless elasticsearch_original_state_on? unless elasticsearch_original_state_on?
QA::EE::Resource::Settings::Elasticsearch.fabricate_via_api! QA::EE::Resource::Settings::Elasticsearch.fabricate_via_api!
sleep(90)
# wait for the change to propagate before inserting records or else
# Gitlab::CurrentSettings.elasticsearch_indexing and
# Elastic::ApplicationVersionedSearch::searchable? will be false
# this sleep can be removed after we're able to query logs via the API
# as per this issue https://gitlab.com/gitlab-org/quality/team-tasks/issues/395
end end
Resource::Repository::Commit.fabricate_via_api! do |commit| Resource::Repository::Commit.fabricate_via_api! do |commit|
......
...@@ -22,12 +22,6 @@ module QA ...@@ -22,12 +22,6 @@ module QA
before do before do
unless elasticsearch_original_state_on? unless elasticsearch_original_state_on?
QA::EE::Resource::Settings::Elasticsearch.fabricate_via_api! QA::EE::Resource::Settings::Elasticsearch.fabricate_via_api!
sleep(90)
# wait for the change to propagate before inserting records or else
# Gitlab::CurrentSettings.elasticsearch_indexing and
# Elastic::ApplicationVersionedSearch::searchable? will be false
# this sleep can be removed after we're able to query logs via the API
# as per this issue https://gitlab.com/gitlab-org/quality/team-tasks/issues/395
end end
Resource::Repository::Commit.fabricate_via_api! do |commit| Resource::Repository::Commit.fabricate_via_api! do |commit|
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment