Fork me on GitHub
#datalevin
<
2022-08-04
>
cgrand08:08:43

👋 I’m trying to run lein test and here is the first failure I get:

lein test datalevin.client-test
2022-08-04T08:26:46.119Z UnknownHost INFO [datalevin.server:514] - Datalevin server started on port 8898
2022-08-04T08:26:46.795Z UnknownHost INFO [datalevin.server:549] - Added client  6f44f947-e3dd-4f21-93bd-205c3fcd8f8f from: /127.0.0.1 for user: datalevin with roles: [:datalevin.role/datalevin]
2022-08-04T08:26:46.805Z UnknownHost INFO [datalevin.server:577] - Opened database: clientdb
2022-08-04T08:26:46.817Z UnknownHost ERROR [datalevin.server:?] -
               java.util.concurrent.ForkJoinWorkerThread.run  ForkJoinWorkerThread.java:  183
                 java.util.concurrent.ForkJoinPool.runWorker          ForkJoinPool.java: 1594
                      java.util.concurrent.ForkJoinPool.scan          ForkJoinPool.java: 1656
    java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec          ForkJoinPool.java: 1020
                    java.util.concurrent.ForkJoinTask.doExec          ForkJoinTask.java:  290
java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec          ForkJoinTask.java: 1426
                                                         ...
                          datalevin.server/handle-read/fn/fn                 server.clj: 1827
                             datalevin.server/handle-message                 server.clj: 1799
                                datalevin.server/assign-role                 server.clj: 1193
clojure.lang.ExceptionInfo: Role does not exist.

Huahai17:08:56

These exceptions are expected. The tests are precisely to see if the exception would be thrown. The server logger logs all exceptions, so they show up in logs, as expected. As long as all the tests pass, i.e. it says “0 failures, 0 errors.” in the end, it is fine. Don’t be alarmed by the exceptions.

Huahai17:08:38

When you run lein test and see a bunch of exceptions, don’t be alarmed. As long as the tests end with 0 failures, 0 errors. , it is fine. Datalevin server logs all exceptions, so the exceptions intended to be thrown in the tests show up in the logs, as they should.