diff --git a/app/commands/document/sync_all_to_search_index.rb b/app/commands/document/sync_all_to_search_index.rb index 0c6bd84bda..c39584f04c 100644 --- a/app/commands/document/sync_all_to_search_index.rb +++ b/app/commands/document/sync_all_to_search_index.rb @@ -19,7 +19,6 @@ def call end Exercism.opensearch_client.bulk(body:) - Exercism::TOUCHED_OPENSEARCH_INDEXES << Document::OPENSEARCH_INDEX if Rails.env.test? end end diff --git a/app/commands/document/sync_to_search_index.rb b/app/commands/document/sync_to_search_index.rb index 737e54671b..5c50434a76 100644 --- a/app/commands/document/sync_to_search_index.rb +++ b/app/commands/document/sync_to_search_index.rb @@ -11,6 +11,5 @@ def call id: doc.id, body: Document::CreateSearchIndexDocument.(doc) ) - Exercism::TOUCHED_OPENSEARCH_INDEXES << Document::OPENSEARCH_INDEX if Rails.env.test? end end diff --git a/app/commands/exercise/representation/sync_to_search_index.rb b/app/commands/exercise/representation/sync_to_search_index.rb index 61953a43ef..f3cbc371db 100644 --- a/app/commands/exercise/representation/sync_to_search_index.rb +++ b/app/commands/exercise/representation/sync_to_search_index.rb @@ -27,7 +27,6 @@ def create_document! id: representation.id, body: Exercise::Representation::CreateSearchIndexDocument.(representation) ) - Exercism::TOUCHED_OPENSEARCH_INDEXES << Exercise::Representation::OPENSEARCH_INDEX if Rails.env.test? end def delete_document! diff --git a/app/commands/solution/sync_all_to_search_index.rb b/app/commands/solution/sync_all_to_search_index.rb index 5419ede72d..8568cb8766 100644 --- a/app/commands/solution/sync_all_to_search_index.rb +++ b/app/commands/solution/sync_all_to_search_index.rb @@ -25,7 +25,6 @@ def call end Exercism.opensearch_client.bulk(body:) - Exercism::TOUCHED_OPENSEARCH_INDEXES << Solution::OPENSEARCH_INDEX if Rails.env.test? end end diff --git a/app/commands/solution/sync_to_search_index.rb b/app/commands/solution/sync_to_search_index.rb index 76c7ce2306..aa4ae8ff1f 100644 --- a/app/commands/solution/sync_to_search_index.rb +++ b/app/commands/solution/sync_to_search_index.rb @@ -20,7 +20,6 @@ def create_document! id: solution.id, body: Solution::CreateSearchIndexDocument.(solution) ) - Exercism::TOUCHED_OPENSEARCH_INDEXES << Solution::OPENSEARCH_INDEX if Rails.env.test? end def delete_document! diff --git a/test/test_helper.rb b/test/test_helper.rb index deab8971cc..191a162aef 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -308,7 +308,7 @@ def download_s3_file(bucket, key) # OpenSearch Helpers # ###################### def stub_opensearch! - opensearch_client = mock + opensearch_client = Exercism.opensearch_client Exercism.define_method(:opensearch_client) { opensearch_client } end @@ -327,9 +327,9 @@ def wait_for_opensearch_to_be_synced perform_enqueued_jobs # Force an index refresh to ensure there are no concurrent actions in the background - Exercism::TOUCHED_OPENSEARCH_INDEXES.each do |index| - Exercism.opensearch_client.indices.refresh(index:) - end + # Exercism::TOUCHED_OPENSEARCH_INDEXES.each do |index| + # Exercism.opensearch_client.indices.refresh(index:) + # end end def perform_enqueued_jobs_until_empty