Unit Tests Fail

25 views
Skip to first unread message

Mohamed Morsey

unread,
Sep 4, 2019, 11:08:16 AM9/4/19
to semanticturkey-user
Hi all,

I checked out the code Semantic Turkey v6.0 and tried to run it locally via Maven.
However, some unit test look failing. These are the tests in class "OntologyManagerTest".

Can you please let me know how I can fix these tests, e.g. a some setting is missing or something?

Thank you!.

Kind regards,
Mohamed

Manuel Fiorelli

unread,
Sep 6, 2019, 10:48:41 AM9/6/19
to semanticturkey-user
Hi Mohamed

we usually build ST on Windows 10 with either AdoptOpenJDK or OracleJDK 8 without any issue.

Unfortunately, without further details (e.g. the output of the build process), we can't even figure out what could be the problem. Please, provide us with more details.

However, if you are not truly interested in executing the tests, you can skip them (https://maven.apache.org/plugins-archives/maven-surefire-plugin-2.12.4/examples/skipping-test.html):
mvn install -DskipTests

Regards,
Manuel Fiorelli

Manuel Fiorelli

unread,
Sep 6, 2019, 10:48:41 AM9/6/19
to semantict...@googlegroups.com
Hi Mohamed

we usually build ST on Windows 10 with either AdoptOpenJDK or OracleJDK 8 without any issue.

Unfortunately, without further details (e.g. the output of the build process), we can't even figure out what could be the problem. Please, provide us with more details.

However, if you are not truly interested in executing the tests, you can skip them (https://maven.apache.org/plugins-archives/maven-surefire-plugin-2.12.4/examples/skipping-test.html):
mvn install -DskipTests

Regards,
Manuel Fiorelli



--
You received this message because you are subscribed to the Google Groups "semanticturkey-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to semanticturkey-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/semanticturkey-user/65b3112b-0bb2-49ce-8e11-508cc4017f50%40googlegroups.com.


--
Manuel Fiorelli

Manuel Fiorelli

unread,
Sep 6, 2019, 10:48:41 AM9/6/19
to semantict...@googlegroups.com
Hi all

It seems that my original reply was not delivered to the ML. I hope that message will be delivered.

Mohamed Morsey

unread,
Sep 12, 2019, 3:01:09 PM9/12/19
to semantict...@googlegroups.com
Hi Manuel,

thank you for your reply.

I'm getting the following exception for all unit tests:

org.eclipse.rdf4j.repository.config.RepositoryConfigException: Could not create directory: test-installation/../SemanticTurkeyData/projects/Test/repositories/support

at org.eclipse.rdf4j.repository.manager.LocalRepositoryManager.addRepositoryConfig(LocalRepositoryManager.java:427)
at org.eclipse.rdf4j.repository.manager.LocalRepositoryManager.addRepositoryConfig(LocalRepositoryManager.java:418)
at it.uniroma2.art.semanticturkey.ontology.STEnviroment.tearUp(STEnviroment.java:144)
at it.uniroma2.art.semanticturkey.ontology.STEnviroment.access$000(STEnviroment.java:46)
at it.uniroma2.art.semanticturkey.ontology.STEnviroment$1.evaluate(STEnviroment.java:99)
at org.junit.rules.RunRules.evaluate(RunRules.java:20)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)


Thank you,
Mohamed

--
You received this message because you are subscribed to the Google Groups "semanticturkey-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to semanticturkey-...@googlegroups.com.

Manuel Fiorelli

unread,
Sep 16, 2019, 9:38:26 AM9/16/19
to semantict...@googlegroups.com
Dear Mohamed

thank you for the details. can you tells us which operating systems and which version of Java are you using?

Regards
Manuel



--
Manuel Fiorelli

Mohamed Morsey

unread,
Sep 16, 2019, 10:37:59 AM9/16/19
to semantict...@googlegroups.com
Hi Manuel,

thank you for your reply.

I'm running it under Ubuntu 18.04.3 LTS and with Java 8.

Is there anything incorrect with that configuration?

Kind regards,
Mohamed Morsey

Manuel Fiorelli

unread,
Sep 16, 2019, 11:52:16 AM9/16/19
to semantict...@googlegroups.com
Hi Mohamed

Your configuration is fine, both for compiling and running ST. Unfortunately, since we routinely build on Windows 10, it may be the case that there is something (probably in how we create the test files) that does not work under Linux.

I'll log this problem in our issue tracker, so it will be eventually fixed.

In the meantime, does my workaround (i.e. disabling tests) work for you?

Regards
Manuel



--
Manuel Fiorelli

Mohamed Morsey

unread,
Sep 16, 2019, 11:56:26 AM9/16/19
to semantict...@googlegroups.com
Hi Manuel,

thanks a lot for prompt reply and for planning to fix it.

Yes, that's what I did. I disabled the tests for now.
Will check the mailing list for the fix.

Kind regards,
Mohamed Morsey

Manuel Fiorelli

unread,
Sep 26, 2019, 12:47:31 PM9/26/19
to semantict...@googlegroups.com
Dear Mohamed

I fixed the bug in the development version of Semantic Turkey, and it will be part of the next release. In the meantime, you may want to checkout the sources and try to build them in Ubuntu (without disabling tests).

Best regards,
Manuel Fiorelli



--
Manuel Fiorelli

Silvio Domingos

unread,
Feb 3, 2020, 8:25:23 AM2/3/20
to semanticturkey-user

Dear Fiorelli,

I tried to install it yesterday and the test still failing.

I'm using as setup:
Openjdk 8
Ubuntu 18,04
MAVEN_VERSION=3.6.3

Moreover, when i try to build a docker image with  the same tools, i don't get the instance running.

See the step to lunch it:
Step 12/12 : ENTRYPOINT ["/bin/bash", "-c", "/app/semanticturkey-6.0/bin/start && /app/semanticturkey-6.0/bin/instance list  && /app/semanticturkey-6.0/bin/client"]

Output:
docker run semantic-turkey-6.0
SSH Port │ SSH Host │ RMI Registry │ RMI Registry Host │ RMI Server │ RMI Server Host │ State │ PID │ Name
─────────┼──────────┼──────────────┼───────────────────┼────────────┼─────────────────┼───────┼─────┼─────
Failed to get the session.

Is this flow correct?
Do you have any idea, why it is not initializing the instance?

Best Regards,
Silvio
To unsubscribe from this group and stop receiving emails from it, send an email to semanticturkey-user+unsub...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "semanticturkey-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to semanticturkey-user+unsub...@googlegroups.com.


--
Manuel Fiorelli

--
You received this message because you are subscribed to the Google Groups "semanticturkey-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to semanticturkey-user+unsub...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "semanticturkey-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to semanticturkey-user+unsub...@googlegroups.com.


--
Manuel Fiorelli

--
You received this message because you are subscribed to the Google Groups "semanticturkey-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to semanticturkey-user+unsub...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "semanticturkey-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to semanticturkey-user+unsub...@googlegroups.com.


--
Manuel Fiorelli

Silvio Domingos

unread,
Feb 3, 2020, 8:25:23 AM2/3/20
to semanticturkey-user
Hi Fiorelli,

I have tried it today, and the tests still failing.

I'm using:
openjdk:8-jdk
MAVEN_VERSION=3.6.3
Linux Kernel 5.3.0-28-generic  18.04.1-Ubuntu SMP Fri Jan 17 06:14:09 UTC 2020 x86_64 GNU/Linux

Moreover, when i try to run in a docker container:
I get the following error:

Step 12/12 : ENTRYPOINT ["/bin/bash", "-c", "/app/semanticturkey-6.0/bin/start && /app/semanticturkey-6.0/bin/instance list  && /app/semanticturkey-6.0/bin/client"]

silvio@silvio:~/semantic-turkey$ docker run semantic-turkey-6.0

SSH Port │ SSH Host │ RMI Registry │ RMI Registry Host │ RMI Server │ RMI Server Host │ State │ PID │ Name
─────────┼──────────┼──────────────┼───────────────────┼────────────┼─────────────────┼───────┼─────┼─────
Failed to get the session.

Any idea, why it is not starting?

Is this flow correct??

Best Regards,
Silvio

Em quinta-feira, 26 de setembro de 2019 18:47:31 UTC+2, Manuel Fiorelli escreveu:
To unsubscribe from this group and stop receiving emails from it, send an email to semanticturkey-user+unsub...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "semanticturkey-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to semanticturkey-user+unsub...@googlegroups.com.


--
Manuel Fiorelli

--
You received this message because you are subscribed to the Google Groups "semanticturkey-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to semanticturkey-user+unsub...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "semanticturkey-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to semanticturkey-user+unsub...@googlegroups.com.


--
Manuel Fiorelli

--
You received this message because you are subscribed to the Google Groups "semanticturkey-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to semanticturkey-user+unsub...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "semanticturkey-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to semanticturkey-user+unsub...@googlegroups.com.


--
Manuel Fiorelli

Manuel Fiorelli

unread,
Feb 6, 2020, 11:36:29 AM2/6/20
to semantict...@googlegroups.com
Hi Silvio

unfortunately, I develop on Linux occasionally, so it is possible that something broke after my previous fix. Currently, I don't have time to investigate this problem. However, as workaround, try to compile ST without the tests.

mvn clean install -DskipTests

Concerning the problem with Docker, we don't officially support this deployment option, yet. However, it seems to me that your entrypoint is strange: it should be sufficient to use start of even karaf but disabling the interactive console (the so-called server mode).
I found this docker file on the web (https://github.com/datlowe/docker-vocbench3/blob/master/vocbench3/Dockerfile), which uses the server mode. Unfortunately, the docker files uses version 5.0, but it should be straightforward to update it. However, I you plan to use the full distribution (including the WAR of the UI), I remember that there was a known issue: semantic turkey may not start at the first launch. This might affect the launch of you docker container. As a workaround, you could remover the war, and then serve the UI with a separate web container: this should be supported by docker-compose.



To unsubscribe from this group and stop receiving emails from it, send an email to semanticturkey-...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "semanticturkey-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to semanticturkey-...@googlegroups.com.


--
Manuel Fiorelli

--
You received this message because you are subscribed to the Google Groups "semanticturkey-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to semanticturkey-...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "semanticturkey-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to semanticturkey-...@googlegroups.com.


--
Manuel Fiorelli

--
You received this message because you are subscribed to the Google Groups "semanticturkey-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to semanticturkey-...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "semanticturkey-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to semanticturkey-...@googlegroups.com.


--
Manuel Fiorelli

--
You received this message because you are subscribed to the Google Groups "semanticturkey-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to semanticturkey-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/semanticturkey-user/6dcf4ffd-5be7-497f-bef2-2674c5ed5543%40googlegroups.com.


--
Manuel Fiorelli
Reply all
Reply to author
Forward
0 new messages