You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by Paolo Castagna <ca...@googlemail.com> on 2011/08/31 18:55:46 UTC
Re: svn commit: r1163694 - in /incubator/jena/Jena2/ARQ/trunk/src-test/com/hp/hpl/jena/sparql:
TS_RDQL.java syntax/TS_Serialization.java
castagna@apache.org wrote:
> Author: castagna
> Date: Wed Aug 31 16:54:16 2011
> New Revision: 1163694
>
> URL: http://svn.apache.org/viewvc?rev=1163694&view=rev
> Log:
> This is to get rid of the warnings while running the ARQ tests via mvn test.
>
> Modified:
> incubator/jena/Jena2/ARQ/trunk/src-test/com/hp/hpl/jena/sparql/TS_RDQL.java
> incubator/jena/Jena2/ARQ/trunk/src-test/com/hp/hpl/jena/sparql/syntax/TS_Serialization.java
>
> Modified: incubator/jena/Jena2/ARQ/trunk/src-test/com/hp/hpl/jena/sparql/TS_RDQL.java
> URL: http://svn.apache.org/viewvc/incubator/jena/Jena2/ARQ/trunk/src-test/com/hp/hpl/jena/sparql/TS_RDQL.java?rev=1163694&r1=1163693&r2=1163694&view=diff
> ==============================================================================
> --- incubator/jena/Jena2/ARQ/trunk/src-test/com/hp/hpl/jena/sparql/TS_RDQL.java (original)
> +++ incubator/jena/Jena2/ARQ/trunk/src-test/com/hp/hpl/jena/sparql/TS_RDQL.java Wed Aug 31 16:54:16 2011
> @@ -8,6 +8,7 @@ package com.hp.hpl.jena.sparql;
>
> import junit.framework.TestSuite ;
>
> +import com.hp.hpl.jena.sparql.expr.NodeValue;
> import com.hp.hpl.jena.sparql.expr.TS_ExprRDQL ;
> import com.hp.hpl.jena.sparql.junit.ScriptTestSuiteFactory ;
>
> @@ -26,6 +27,7 @@ public class TS_RDQL extends TestSuite
>
> addTest(TS_ExprRDQL.suite()) ;
>
> + NodeValue.VerboseWarnings = false ;
> addTest(ScriptTestSuiteFactory.make(controlFilenameRDQL)) ;
> }
> }
>
> Modified: incubator/jena/Jena2/ARQ/trunk/src-test/com/hp/hpl/jena/sparql/syntax/TS_Serialization.java
> URL: http://svn.apache.org/viewvc/incubator/jena/Jena2/ARQ/trunk/src-test/com/hp/hpl/jena/sparql/syntax/TS_Serialization.java?rev=1163694&r1=1163693&r2=1163694&view=diff
> ==============================================================================
> --- incubator/jena/Jena2/ARQ/trunk/src-test/com/hp/hpl/jena/sparql/syntax/TS_Serialization.java (original)
> +++ incubator/jena/Jena2/ARQ/trunk/src-test/com/hp/hpl/jena/sparql/syntax/TS_Serialization.java Wed Aug 31 16:54:16 2011
> @@ -9,6 +9,7 @@ package com.hp.hpl.jena.sparql.syntax;
> import junit.framework.TestSuite ;
>
> import com.hp.hpl.jena.sparql.ARQTestSuite ;
> +import com.hp.hpl.jena.sparql.expr.E_Function;
> import com.hp.hpl.jena.sparql.junit.ScriptTestSuiteFactory ;
>
>
> @@ -17,6 +18,7 @@ public class TS_Serialization extends Te
> // See also TestSerialization for some low level tests (not scripted)
> static public TestSuite suite()
> {
> + E_Function.WarnOnUnknownFunction = false ;
> return ScriptTestSuiteFactory.make(ARQTestSuite.testDirARQ+"/Serialization/manifest.ttl") ;
> }
> }
>
>
Hi,
recently I've put an explicit version (i.e. 2.9) for the maven-surefire-plugin.
Previously, without specifying a version, we were using a plugin version which
depended on the Maven version.
With version 2.9 we see these warning:
Running com.hp.hpl.jena.sparql.syntax.TS_Serialization
WARN [main] (E_Function.java:77) - URI <http://example.org/ns#myFunc> has no
registered function factory
WARN [main] (E_Function.java:77) - URI <http://example.org/name> has no
registered function factory
WARN [main] (E_Function.java:77) - URI <http://example.org/name> has no
registered function factory
WARN [main] (E_Function.java:77) - URI <http://example.org/name> has no
registered function factory
WARN [main] (E_Function.java:77) - URI <http://example.org/name> has no
registered function factory
WARN [main] (E_Function.java:77) - URI <http://example.org/name> has no
registered function factory
WARN [main] (E_Function.java:77) - URI <http://example.org/name> has no
registered function factory
Running com.hp.hpl.jena.sparql.TS_RDQL
WARN [main] (Log.java:136) - Datatype format exception: "<value/>"^^rdf:XMLLiteral
WARN [main] (Log.java:136) - Datatype format exception: "<value/>"^^rdf:XMLLiteral
WARN [main] (Log.java:136) - Datatype format exception: "<value/>"^^rdf:XMLLiteral
WARN [main] (Log.java:136) - Datatype format exception: "<value/>"^^rdf:XMLLiteral
If we set the version back to 2.4.3, for example, the warnings go away. I
suspect this depends on the order JUnit adds tests to the list of tests to execute.
ARQTestSuite.java sets a couple of flags to make those warnings disappear, but
this does not happen when we execute tests from Maven.
While I was looking into this, I noticed that when we execute tests with Maven
the total number of tests executed is 3913. However, running ARQTestSuite from
Eclipse gives a total of 4360 tests. Of course, running ARQTestSuite from Maven
(i.e. mvn test -Dtest=ARQTestSuite) gives the same result, but we lose the
benefit of seeing which tests are running and their failures.
We should probably make sure we run all tests from Maven as well by creating an
appropriate TS_*.java test suite. Isn't it?
Paolo
Re: svn commit: r1163694 - in /incubator/jena/Jena2/ARQ/trunk/src-test/com/hp/hpl/jena/sparql:
TS_RDQL.java syntax/TS_Serialization.java
Posted by Andy Seaborne <an...@epimorphics.com>.
>
> If we set the version back to 2.4.3, for example, the warnings go away.
> I suspect this depends on the order JUnit adds tests to the list of
> tests to execute.
>
> ARQTestSuite.java sets a couple of flags to make those warnings
> disappear, but this does not happen when we execute tests from Maven.
makes sense - the suites should set the flags themselves.
> While I was looking into this, I noticed that when we execute tests with
> Maven the total number of tests executed is 3913. However, running
> ARQTestSuite from Eclipse gives a total of 4360 tests. Of course,
> running ARQTestSuite from Maven (i.e. mvn test -Dtest=ARQTestSuite)
> gives the same result, but we lose the benefit of seeing which tests are
> running and their failures.
This has always been a mystery to me - at various times the counts has
differed, and also some tests get counted and not run under Junit/Eclipse.
My suspicion is that it is something to do with the scripted tests but I
haven't looked recently.
>
> We should probably make sure we run all tests from Maven as well by
> creating an appropriate TS_*.java test suite. Isn't it?
As long as everything is Junit4 we can use @RunWith.
Junit4 does not have a way to create tests programmatically that I've
found. The scripted tests are built by reading a manifest (in RDF) and
constructing tests.
As long as this feature can be wrapped into JUnit4, as can TS_* ize the
suite properly. It's never made it to the top of the
priority/annoyances to fix list for long enough.
Or split in two - java tests and scripted tests.
Andy
> Paolo