Skip to content

Commit 52d6b43

Browse files
committed
Set cr-funder-registry on start
Set cr-funder-registry at the first available opportunity, port fix to enable starting the core only once per process, rather than once per test fixture.
1 parent 06bd6b9 commit 52d6b43

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

dev/user.clj

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,14 @@
4545
(println "Waiting for elasticsearch to be ready..")
4646
(Thread/sleep 500))
4747
(create-elastic-indexes)
48-
(start-core! :default :api :feed-api)))))
48+
(when-not @core-started?
49+
(when (start-core! :default :api :feed-api)
50+
(with-core :default
51+
(set-param! [:location :cr-titles-csv] (.getPath (resource "titles.csv")))
52+
(->> (.getPath (resource "registry.rdf"))
53+
(str "file://")
54+
(set-param! [:location :cr-funder-registry])))
55+
(reset! core-started? true)))))))
4956

5057
(defn stop []
5158
(sh "docker-compose" "down"))
@@ -55,10 +62,6 @@
5562
(start-core! :default :api :feed-api))
5663

5764
(defn load-test-funders []
58-
(with-core :default
59-
(->> (.getPath (resource "registry.rdf"))
60-
(str "file://")
61-
(set-param! [:location :cr-funder-registry])))
6265
(println "Loading test funders from" (get-param [:location :cr-funder-registry]))
6366
(with-redefs
6467
[cayenne.tasks.funder/get-country-literal-name

0 commit comments

Comments
 (0)