HIIT / dime-server

Your humble Digital Work Me (DiMe) server.
http://hiit.github.io/dime-server/
Other
13 stars 7 forks source link

Trouble installing dime-server #28

Closed JAHugawa closed 8 years ago

JAHugawa commented 9 years ago

Hi all,

I was assigned to work on visualizations for the dime email logger, so I thought I'd install the server to get some data to play with. However, it appears I'm unable to install the dime-server to my machine. The problem comes when I try to ./gradlew build, the process fails because some automatic tests fail ( the failing tests are ApiControllerTest.testSearch, DataControllerTest.testEventGet, DataControllerTest.testEventUpload, DataControllerTest.testMessageEvent). Have I misconfigured something, or do you think the problem is somewhere else?

Thank you all in advance for your help! -Jesper Hjorth

MarcoFiletti commented 9 years ago

I got similar errors after forgetting to start MongoDB (mongod) in the background, are you sure it's running?

mvsjober commented 9 years ago

Yes, some of the automated tests actually spin up a temporary DiMe server for testing. For this you need to have a working mongodb. Not ideal perhaps.

mvsjober commented 9 years ago

You can also run: ./gradlew assemble to compile without running the tests.

Did you manage to get it running? Can I close this issue?

JAHugawa commented 9 years ago

It appears there were some issues with my mongo configuration that prevented it from being started. However, fixing this did not correct all the problems, there are still two failing tests (testEventGet and testSearch I recall).

However, compiling without tests works, so I'll use it for now. Feel free to close the issue. Thanks everyone for your help!

mvsjober commented 9 years ago

OK, thanks for the update! It would be nice to know why the tests fail. It might be a sign of some other problem. You can run the tests by themselves like: ./gradlew test. It should create a report web page in build/reports/tests/index.htmlin your dime-server directory - you can open this with a web browser and take a look. Maybe you can copy & paste the error log here?

JAHugawa commented 9 years ago

ApiControllerTest.testSearch: java.lang.AssertionError: expected:<4> but was:<0> at fi.hiit.dime.ApiControllerTest.testSearch(ApiControllerTest.java:129)

DataControllerTest.testEventGet: org.springframework.http.converter.HttpMessageNotReadableException: Could not read JSON: Can not deserialize instance of fi.hiit.dime.data.InformationElement[] out of START_OBJECT token at fi.hiit.dime.DataControllerTest.testEventGet(DataControllerTest.java:327)

Does this say anything to you?

mvsjober commented 9 years ago

Not much except there's something strange with your mongodb. For example the testSearch uploads four items and then tries to search for them, and expects 4 results back, but gets 0.

Are you working in OIH? I'm going to be in OIH on Monday between 11-16, if you happen to be around at that time I could come take a look.

JAHugawa commented 9 years ago

Yeah, I work in OIH. I'll be around from 12.30 onwards so if you possibly can, please come take a look. I'm probably in the DCC room (A201).

mvsjober commented 9 years ago

OK, change of plan: I won't be in OIH tomorrow after all. Sorry :-(

mvsjober commented 8 years ago

Since we have switched to SQL now I'm closing this bug. If there are further problems, please open a new issue :-)