From: <tho...@us...> - 2014-05-18 13:35:44
|
Revision: 8353 http://sourceforge.net/p/bigdata/code/8353 Author: thompsonbry Date: 2014-05-18 13:35:40 +0000 (Sun, 18 May 2014) Log Message: ----------- Added test for #887 - ticket is closed. Problem can not be demonstrated against the current code base. Suspect was fixed for the 1.3.0 release (heisenbug). Javadoc update for jetty.resourceBase for the NSS. Modified Paths: -------------- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestAll.java branches/BIGDATA_RELEASE_1_3_0/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/NanoSparqlServer.java Added Paths: ----------- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestTicket887.java branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_887_bind.rq branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_887_bind.srx branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_887_bind.trig Modified: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestAll.java =================================================================== --- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestAll.java 2014-05-17 17:16:32 UTC (rev 8352) +++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestAll.java 2014-05-18 13:35:40 UTC (rev 8353) @@ -128,6 +128,7 @@ // Test suite for SPARQL 1.1 BINDINGS clause suite.addTestSuite(TestBindings.class); suite.addTestSuite(TestBindHeisenbug708.class); + suite.addTestSuite(TestTicket887.class); // Complex queries. suite.addTestSuite(TestComplexQuery.class); Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestTicket887.java =================================================================== --- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestTicket887.java (rev 0) +++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestTicket887.java 2014-05-18 13:35:40 UTC (rev 8353) @@ -0,0 +1,78 @@ +/** + +Copyright (C) SYSTAP, LLC 2013. All rights reserved. + +Contact: + SYSTAP, LLC + 4501 Tower Road + Greensboro, NC 27410 + lic...@bi... + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; version 2 of the License. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ +package com.bigdata.rdf.sparql.ast.eval; + + +/** + * Test suite for a hesienbug involving BIND. Unlike the other issues this + * sometimes happens, and is sometimes OK, so we run the test in a loop 20 + * times. + * + * @see <a href="https://sourceforge.net/apps/trac/bigdata/ticket/708"> + * Heisenbug </a> + * + * @version $Id$ + */ +public class TestTicket887 extends AbstractDataDrivenSPARQLTestCase { + + public TestTicket887() { + } + + public TestTicket887(String name) { + super(name); + } + + /** + * <pre> + * SELECT * + * WHERE { + * + * GRAPH ?g { + * + * BIND( "hello" as ?hello ) . + * BIND( CONCAT(?hello, " world") as ?helloWorld ) . + * + * ?member a ?class . + * + * } + * + * } + * LIMIT 1 + * </pre> + * + * @see <a href="http://trac.bigdata.com/ticket/887" > BIND is leaving a + * variable unbound </a> + */ + public void test_ticket_887_bind() throws Exception { + + new TestHelper( + "ticket_887_bind", // testURI, + "ticket_887_bind.rq",// queryFileURL + "ticket_887_bind.trig",// dataFileURL + "ticket_887_bind.srx"// resultFileURL + ).runTest(); + + } + +} Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_887_bind.rq =================================================================== --- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_887_bind.rq (rev 0) +++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_887_bind.rq 2014-05-18 13:35:40 UTC (rev 8353) @@ -0,0 +1,14 @@ +SELECT * +WHERE { + + GRAPH ?g { + + BIND( "hello" as ?hello ) . + BIND( CONCAT(?hello, " world") as ?helloWorld ) . + + ?member a ?class . + + } + +} +LIMIT 1 \ No newline at end of file Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_887_bind.srx =================================================================== --- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_887_bind.srx (rev 0) +++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_887_bind.srx 2014-05-18 13:35:40 UTC (rev 8353) @@ -0,0 +1,32 @@ +<?xml version="1.0"?> +<sparql + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:xs="http://www.w3.org/2001/XMLSchema#" + xmlns="http://www.w3.org/2005/sparql-results#" > + <head> + <variable name="?hello"/> + <variable name="?helloWorld"/> + <variable name="?member"/> + <variable name="?class"/> + <variable name="?g"/> + </head> + <results> + <result> + <binding name="hello"> + <literal>hello</literal> + </binding> + <binding name="helloWorld"> + <literal>hello world</literal> + </binding> + <binding name="member"> + <uri>http://www.bigdata.com/member</uri> + </binding> + <binding name="class"> + <uri>http://www.bigdata.com/cls</uri> + </binding> + <binding name="g"> + <uri>http://www.bigdata.com/</uri> + </binding> + </result> + </results> +</sparql> \ No newline at end of file Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_887_bind.trig =================================================================== --- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_887_bind.trig (rev 0) +++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_887_bind.trig 2014-05-18 13:35:40 UTC (rev 8353) @@ -0,0 +1,6 @@ +@prefix : <http://www.bigdata.com/> . +@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . + +: { + :member a :cls +} Modified: branches/BIGDATA_RELEASE_1_3_0/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/NanoSparqlServer.java =================================================================== --- branches/BIGDATA_RELEASE_1_3_0/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/NanoSparqlServer.java 2014-05-17 17:16:32 UTC (rev 8352) +++ branches/BIGDATA_RELEASE_1_3_0/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/NanoSparqlServer.java 2014-05-18 13:35:40 UTC (rev 8353) @@ -152,25 +152,39 @@ * environment variable will be used to locate the web application.</li> * <li> * <code>jetty.resourceBase</code> is not specified (either - * <code>null</code> or whitespace). An attempt is made to locate the - * <code>bigdata-war/src</code> resource in the file system (relative to - * the current working directory). If found, the - * <code>jetty.resourceBase</code> environment variable is set to this - * resource using a <code>file:</code> style URL. This will cause jetty - * to use the web application directory in the file system. - * <p> - * If the resource is not found in the file system, then an attempt is - * made to locate that resource using the classpath. If found, the the - * <code>jetty.resourceBase</code> is set to the URL for the located - * resource. This will cause jetty to use the web application resource - * on the classpath. If there are multiple such resources on the - * classpath, the first such resource will be discovered and used.</li> + * <code>null</code> or whitespace). + * <ol> + * <li>An attempt is made to locate the <code>bigdata-war/src</code> + * resource in the file system (relative to the current working + * directory). If found, the <code>jetty.resourceBase</code> environment + * variable is set to this resource using a <code>file:</code> style + * URL. This will cause jetty to use the web application directory in + * the file system.</li> * <li> + * An attempt is made to locate the resource + * <code>/WEB-INF/web.xml</code> using the classpath (this handles the + * case when running under the eclipse IDE). If found, the the + * <code>jetty.resourceBase</code> is set to the URL formed by removing + * the trailing <code>WEB-INF/web.xml</code> for the located resource. + * This will cause jetty to use the web application resource on the + * classpath. If there are multiple such resources on the classpath, the + * first such resource will be discovered and used.</li> + * <li>An attempt is made to locate the resource + * <code>bigdata-war/src/WEB-INF/web.xml</code> using the classpath + * (this handles the case when running from the command line using a + * bigdata JAR). If found, the the <code>jetty.resourceBase</code> is + * set to the URL formed by the trailing <code>WEB-INF/web.xml</code> + * for the located resource. This will cause jetty to use the web + * application resource on the classpath. If there are multiple such + * resources on the classpath, the first such resource will be + * discovered and used.</li> + * <li> * Otherwise, the <code>jetty.resourceBase</code> environment variable * is not modified and the default location specified in the * <code>jetty.xml</code> file will be used. If jetty is unable to * resolve that resource, then the web application will not start.</li> * </ol> + * </ol> * * @see <a href="http://trac.bigdata.com/ticket/939" > NSS does not * start from command line: bigdata-war/src not found </a> @@ -825,7 +839,7 @@ } if (tmp != null) { if (src != null) { - if (log.isInfoEnabled()) + if(log.isInfoEnabled()) log.info("Found: src=" + src + ", url=" + tmp); } final String s = tmp.toExternalForm(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |