This is an automated email from the ASF dual-hosted git repository. andy pushed a commit to branch jena5 in repository https://gitbox.apache.org/repos/asf/jena.git
commit de12b1654645a949f8a5a60b861bc0a6cf7275d0 Author: Andy Seaborne <a...@apache.org> AuthorDate: Mon Oct 23 22:39:07 2023 +0100 Move rdf_tabales tests. Fix for space in working directory name --- .../ext/io/github/galbiston/rdf_tables/file/FileConverter.java | 3 +-- .../io/github/galbiston/rdf_tables/cli/ArgsConfigTest.java | 3 +-- .../galbiston/rdf_tables/datatypes/DatatypeControllerTest.java | 3 +-- .../io/github/galbiston/rdf_tables/file/FileConverterTest.java | 10 +++++++--- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/jena-fuseki2/jena-fuseki-geosparql/src/main/java/org/apache/jena/ext/io/github/galbiston/rdf_tables/file/FileConverter.java b/jena-fuseki2/jena-fuseki-geosparql/src/main/java/org/apache/jena/ext/io/github/galbiston/rdf_tables/file/FileConverter.java index 6db8913f3b..fda4ff7594 100644 --- a/jena-fuseki2/jena-fuseki-geosparql/src/main/java/org/apache/jena/ext/io/github/galbiston/rdf_tables/file/FileConverter.java +++ b/jena-fuseki2/jena-fuseki-geosparql/src/main/java/org/apache/jena/ext/io/github/galbiston/rdf_tables/file/FileConverter.java @@ -99,9 +99,8 @@ public class FileConverter { model.setNsPrefixes(PrefixController.getPrefixes()); } catch (IOException | RuntimeException | CsvValidationException ex) { - LOGGER.error("FileConverter: Line - {}, File - {}, Exception - {}", lineNumber, inputFile.getAbsolutePath(), ex.getMessage()); - throw new AssertionError("Error loading file: " + inputFile.getAbsolutePath()); + throw new AssertionError("Error loading file: " + inputFile.getAbsolutePath(), ex); } LOGGER.info("File Conversion Completed: {}", inputFile.getPath()); diff --git a/jena-fuseki2/jena-fuseki-geosparql/src/test/java/io/github/galbiston/rdf_tables/cli/ArgsConfigTest.java b/jena-fuseki2/jena-fuseki-geosparql/src/test/java/org/apache/jena/ext/io/github/galbiston/rdf_tables/cli/ArgsConfigTest.java similarity index 98% rename from jena-fuseki2/jena-fuseki-geosparql/src/test/java/io/github/galbiston/rdf_tables/cli/ArgsConfigTest.java rename to jena-fuseki2/jena-fuseki-geosparql/src/test/java/org/apache/jena/ext/io/github/galbiston/rdf_tables/cli/ArgsConfigTest.java index bb694fb976..0d47750c64 100644 --- a/jena-fuseki2/jena-fuseki-geosparql/src/test/java/io/github/galbiston/rdf_tables/cli/ArgsConfigTest.java +++ b/jena-fuseki2/jena-fuseki-geosparql/src/test/java/org/apache/jena/ext/io/github/galbiston/rdf_tables/cli/ArgsConfigTest.java @@ -15,12 +15,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.github.galbiston.rdf_tables.cli; +package org.apache.jena.ext.io.github.galbiston.rdf_tables.cli; import com.beust.jcommander.JCommander; import com.beust.jcommander.ParameterException; -import org.apache.jena.ext.io.github.galbiston.rdf_tables.cli.ArgsConfig; import org.apache.jena.riot.RDFFormat; import org.junit.After; import org.junit.AfterClass; diff --git a/jena-fuseki2/jena-fuseki-geosparql/src/test/java/io/github/galbiston/rdf_tables/datatypes/DatatypeControllerTest.java b/jena-fuseki2/jena-fuseki-geosparql/src/test/java/org/apache/jena/ext/io/github/galbiston/rdf_tables/datatypes/DatatypeControllerTest.java similarity index 98% rename from jena-fuseki2/jena-fuseki-geosparql/src/test/java/io/github/galbiston/rdf_tables/datatypes/DatatypeControllerTest.java rename to jena-fuseki2/jena-fuseki-geosparql/src/test/java/org/apache/jena/ext/io/github/galbiston/rdf_tables/datatypes/DatatypeControllerTest.java index 4773c16817..5d9bf0d7a4 100644 --- a/jena-fuseki2/jena-fuseki-geosparql/src/test/java/io/github/galbiston/rdf_tables/datatypes/DatatypeControllerTest.java +++ b/jena-fuseki2/jena-fuseki-geosparql/src/test/java/org/apache/jena/ext/io/github/galbiston/rdf_tables/datatypes/DatatypeControllerTest.java @@ -15,12 +15,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.github.galbiston.rdf_tables.datatypes; +package org.apache.jena.ext.io.github.galbiston.rdf_tables.datatypes; import static org.junit.Assert.assertEquals; import org.apache.jena.datatypes.xsd.impl.XSDBaseNumericType; -import org.apache.jena.ext.io.github.galbiston.rdf_tables.datatypes.DatatypeController; import org.apache.jena.rdf.model.Literal; import org.apache.jena.rdf.model.ResourceFactory; import org.junit.*; diff --git a/jena-fuseki2/jena-fuseki-geosparql/src/test/java/io/github/galbiston/rdf_tables/file/FileConverterTest.java b/jena-fuseki2/jena-fuseki-geosparql/src/test/java/org/apache/jena/ext/io/github/galbiston/rdf_tables/file/FileConverterTest.java similarity index 98% rename from jena-fuseki2/jena-fuseki-geosparql/src/test/java/io/github/galbiston/rdf_tables/file/FileConverterTest.java rename to jena-fuseki2/jena-fuseki-geosparql/src/test/java/org/apache/jena/ext/io/github/galbiston/rdf_tables/file/FileConverterTest.java index d5a30c5f5f..178c73088e 100644 --- a/jena-fuseki2/jena-fuseki-geosparql/src/test/java/io/github/galbiston/rdf_tables/file/FileConverterTest.java +++ b/jena-fuseki2/jena-fuseki-geosparql/src/test/java/org/apache/jena/ext/io/github/galbiston/rdf_tables/file/FileConverterTest.java @@ -15,18 +15,19 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.github.galbiston.rdf_tables.file; +package org.apache.jena.ext.io.github.galbiston.rdf_tables.file; import static org.junit.Assert.assertEquals; import java.io.File; +import java.net.URL; +import org.apache.jena.atlas.lib.IRILib; import org.apache.jena.datatypes.BaseDatatype; import org.apache.jena.datatypes.xsd.XSDDatatype; import org.apache.jena.datatypes.xsd.impl.XSDBaseNumericType; import org.apache.jena.ext.io.github.galbiston.rdf_tables.datatypes.DatatypeController; import org.apache.jena.ext.io.github.galbiston.rdf_tables.datatypes.PrefixController; -import org.apache.jena.ext.io.github.galbiston.rdf_tables.file.FileConverter; import org.apache.jena.rdf.model.*; import org.apache.jena.vocabulary.RDF; import org.apache.jena.vocabulary.RDFS; @@ -45,7 +46,10 @@ public class FileConverterTest { @BeforeClass public static void setUpClass() { - File inputFile = new File(FileConverterTest.class.getClassLoader().getResource("TestData.csv").getFile()); + URL u = FileConverterTest.class.getClassLoader().getResource("TestData.csv"); + // These URLs have the file name as an encoded string. + String fn = IRILib.decodeHex(u.getFile()); + File inputFile = new File(fn); testModel = ModelFactory.createDefaultModel(); DatatypeController.addPrefixDatatypeURI("wkt", "http://www.opengis.net/ont/geosparql#wktLiteral"); PrefixController.addPrefix("other", "http://example.org/other#");