    [cmr.system-int-test.utils.ingest-util :as ingest]
    [cmr.system-int-test.utils.search-util :as search]))
 
-(use-fixtures :each (join-fixtures
-                      [(ingest/reset-fixture {"provguid1" "PROV1"})
-                       hu/grant-all-humanizers-fixture
-                       hu/save-sample-humanizers-fixture]))
 
 (defn compare-autocomplete-results
- "Compare expected to actual response for the following:
- - Items are ordered by score in descending order
- - Ensure that the other fields match"
- [actual expected]
- (let [scores (map :score actual)
-       actual-scores-descending? (->> actual
-                                      (map :score)
-                                      (apply >=))
-       ; we don't need to actually compare scores
-       expected (map #(dissoc % :score) expected)
-       actual (map #(dissoc % :score) actual)]
-   (is (true? actual-scores-descending?))
-   (is (= expected actual))))
+  "Compare expected to actual response for the following:
+  - Items are ordered by score in descending order
+  - Ensure that the other fields match"
+  [actual expected]
+  (let [scores (map :score actual)
+        actual-scores-descending? (->> actual
+                                       (map :score)
+                                       (apply >=))
+                                        ; we don't need to actually compare scores
+        expected (map #(dissoc % :score) expected)
+        actual (map #(dissoc % :score) actual)]
+    (is (true? actual-scores-descending?))
+    (is (= expected actual))))
 
 (def sk1 (umm-spec-common/science-keyword {:Category "Earth science"
                                            :Topic "Topic1"

                            {:DataCenters [(data-umm-spec/data-center {:Roles ["ARCHIVER"] :ShortName "DOI/USGS/CMG/WHSC"})]
                             :ScienceKeywords [(:ScienceKeywords (fu/science-keywords sk1 sk2))]})
        coll3 (d/ingest-concept-with-metadata-file "CMR-6287/C1000000029-EDF_OPS.xml"
                                                         {:provider-id "PROV1"
                                                          :concept-type :collection
                                                          :format-key :echo10})
        _ (index/wait-until-indexed)]

    (index/reindex-suggestions)
    (index/wait-until-indexed)
    (testing "Ensure that response is in proper format and results are correct"
      (compare-autocomplete-results
        (get-in (search/get-autocomplete-json "q=level2") [:feed :entry])
        [{:score 0.25604635 :type "organization" :value "Langley DAAC User Services" :fields "Langley DAAC User Services"}
         {:score 0.041718055 :type "instrument" :value "lVIs" :fields "lVIs"}]))
    (testing "Ensure science keywords are being indexed properly"
        (compare-autocomplete-results
         (get-in (search/get-autocomplete-json "q=solar") [:feed :entry])
         [{:score 3.4995544, :type "science_keywords", :value "Solar Irradiance", :fields "Sun-Earth Interactions:Solar Activity:Solar Irradiance"}
          {:score 1.9641972, :type "science_keywords", :value "Solar Irradiance", :fields "Atmosphere:Atmospheric Radiation:Solar Irradiance"}
          {:score 0.20964509, :type "organization", :value "ACRIM SCF", :fields "ACRIM SCF"}
          {:score 0.16771607, :type "organization", :value "Langley DAAC User Services", :fields "Langley DAAC User Services"}])
        (compare-autocomplete-results
         (get-in (search/get-autocomplete-json "q=solar irradiation") [:feed :entry])
         [{:score 5.0869484, :type "science_keywords", :value "Solar Irradiance", :fields "Sun-Earth Interactions:Solar Activity:Solar Irradiance"}
          {:score 2.7943783, :type "science_keywords", :value "Solar Irradiance", :fields "Atmosphere:Atmospheric Radiation:Solar Irradiance"}
          {:score 0.061936468, :type "organization", :value "ACRIM SCF", :fields "ACRIM SCF"}
          {:score 0.049549174, :type "organization", :value "Langley DAAC User Services", :fields "Langley DAAC User Services"}]))))

  "This tests re-indexes autocomplete suggestions."
  (:require
   [clojure.test :refer :all]
   [cmr.common.util :as util :refer [are3]]
   [cmr.mock-echo.client.echo-util :as e]
   [cmr.system-int-test.data2.collection :as dc]
   [cmr.system-int-test.data2.core :as d]
