Fork me on GitHub
#datahike
<
2021-02-07
>
coby20:02:08

Hey folks, trying to run the datahike tests locally with clj -A:test -m kaocha.runner --watch and getting:

[(.....)(......)([watch] Fatal error in test run #error {                                                                                                                                                          
 :cause FATAL: role "alice" does not exist                                                                                                                                                                         
 :via                                                                                                                                                                                                              
 [{:type org.postgresql.util.PSQLException                                                                                                                                                                         
   :message FATAL: role "alice" does not exist                                                                                                                                                                     
   :at [org.postgresql.core.v3.QueryExecutorImpl receiveErrorResponse QueryExecutorImpl.java 2468]}]                                                                                                               
 :trace                                                                                                                                                                                                            
 [ (... BIG OL STACKTRACE ...) ]}
It seems to be complaining about a Postgres backend that I assume doesn't exist, as I definitely did not do anything manually to set up a Postgres db. Was going to try to start on the PR I mentioned on Wednesday...thoughts? The https://github.com/replikativ/datahike/blob/development/doc/contributing.md doesn't mention anything about how to run tests.

timo09:02:39

easiest way is ./bin/run-unittests

timo09:02:49

so this seems to work for me TIMBRE_LEVEL=':fatal' ./bin/kaocha --focus :clj --watch

timo09:02:34

you might want to avoid the exception messages that we are testing on with a higher TIMBRE_LEVEL

timo11:02:31

I just add the tests to the contribution page :thumbsup: thanks for pointing that out. Also I changed the script so that you can run a watch with it as well

timo11:02:43

./bin/run-unittests --watch works now

timo11:02:24

Looking forward to your contribution!

1
coby00:02:24

sweet, I will pull the latest and have another crack at it this weekend! Thanks!

coby20:02:15

OK, digging into the test suite now and I see that the integration tests are expected to run inside a docker container. So it makes sense why that error would happen without some manual setup. I pulled the latest on development and ran ./bin/tun-unittests which gave me this error:

Execution error (FileNotFoundException) at clojure.main/main (main.java:40).
Could not locate kaocha/runner__init.class, kaocha/runner.clj or kaocha/runner.cljc on classpath.

Full report at:
/tmp/clojure-16371792498407115921.edn
Same if I run clojure -M:test -m kaocha.runner --focus :clj directly. Weird. Changing -M:test to -A:test fixes it for me. I'm a little fuzzy on the distinction (will follow up in #tools-deps) but it doesn't seem relevant to the production code so I'll carry on with running tests this way.

coby21:02:17

Just an issue with my clj being out of date, sorry for the spam!

👍 1
coby20:02:15
replied to a thread:Hey folks, trying to run the datahike tests locally with `clj -A:test -m kaocha.runner --watch` and getting: [(.....)(......)([watch] Fatal error in test run #error { :cause FATAL: role "alice" does not exist :via [{:type org.postgresql.util.PSQLException :message FATAL: role "alice" does not exist :at [org.postgresql.core.v3.QueryExecutorImpl receiveErrorResponse QueryExecutorImpl.java 2468]}] :trace [ (... BIG OL STACKTRACE ...) ]} It seems to be complaining about a Postgres backend that I assume doesn't exist, as I definitely did not do anything manually to set up a Postgres db. Was going to try to start on the PR I mentioned on Wednesday...thoughts? The https://github.com/replikativ/datahike/blob/development/doc/contributing.md doesn't mention anything about how to run tests.

OK, digging into the test suite now and I see that the integration tests are expected to run inside a docker container. So it makes sense why that error would happen without some manual setup. I pulled the latest on development and ran ./bin/tun-unittests which gave me this error:

Execution error (FileNotFoundException) at clojure.main/main (main.java:40).
Could not locate kaocha/runner__init.class, kaocha/runner.clj or kaocha/runner.cljc on classpath.

Full report at:
/tmp/clojure-16371792498407115921.edn
Same if I run clojure -M:test -m kaocha.runner --focus :clj directly. Weird. Changing -M:test to -A:test fixes it for me. I'm a little fuzzy on the distinction (will follow up in #tools-deps) but it doesn't seem relevant to the production code so I'll carry on with running tests this way.