Skip to content

Commit b3dab3b

Browse files
committed
Update pom and fixed unit tests
1 parent c6e4140 commit b3dab3b

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

contrib/format-daffodil/pom.xml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@
3131
<artifactId>drill-format-daffodil</artifactId>
3232
<name>Drill : Contrib : Format : Daffodil</name>
3333

34+
<properties>
35+
<daffodil.version>3.10.0</daffodil.version>
36+
</properties>
37+
3438
<dependencies>
3539
<dependency>
3640
<groupId>org.apache.drill.exec</groupId>
@@ -40,12 +44,12 @@
4044
<dependency>
4145
<groupId>org.apache.daffodil</groupId>
4246
<artifactId>daffodil-japi_2.12</artifactId>
43-
<version>3.8.0</version>
47+
<version>${daffodil.version}</version>
4448
</dependency>
4549
<dependency>
4650
<groupId>org.apache.daffodil</groupId>
4751
<artifactId>daffodil-runtime1_2.12</artifactId>
48-
<version>3.8.0</version>
52+
<version>${daffodil.version}</version>
4953
</dependency>
5054
<!-- Test dependencies -->
5155
<dependency>

contrib/format-daffodil/src/test/java/org/apache/drill/exec/store/daffodil/TestDaffodilReader.java

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
import org.junit.Test;
3333
import org.junit.experimental.categories.Category;
3434

35+
import java.net.URISyntaxException;
3536
import java.nio.file.Paths;
3637

3738
import static org.junit.Assert.assertEquals;
@@ -40,7 +41,14 @@
4041
@Category(RowSetTest.class)
4142
public class TestDaffodilReader extends ClusterTest {
4243

43-
String schemaURIRoot = "file:///opt/drill/contrib/format-daffodil/src/test/resources/";
44+
final String SCHEMA_URI_ROOT = getClass()
45+
.getClassLoader()
46+
.getResource("schema/")
47+
.toURI()
48+
.toString();
49+
50+
public TestDaffodilReader() throws URISyntaxException {
51+
}
4452

4553
@BeforeClass
4654
public static void setup() throws Exception {
@@ -59,7 +67,7 @@ public static void setup() throws Exception {
5967

6068
private String selectRow(String schema, String file) {
6169
return "SELECT * FROM table(dfs.`data/" + file + "` " + " (type => 'daffodil'," + " " +
62-
"validationMode => 'true', " + " schemaURI => '" + schemaURIRoot + "schema/" + schema +
70+
"validationMode => 'true', " + " schemaURI => '" + SCHEMA_URI_ROOT + schema +
6371
".dfdl.xsd'," + " rootName => 'row'," + " rootNamespace => null " + "))";
6472
}
6573

0 commit comments

Comments
 (0)