[Lada-commits] [PATCH 3 of 8] Enable deserialization of geometries with DBUnit

Wald Commits scm-commit at wald.intevation.org
Tue Dec 13 20:36:28 CET 2016


# HG changeset patch
# User Tom Gottfried <tom at intevation.de>
# Date 1481646246 -3600
# Node ID 28a39466e4eb8985e4e8e8a8bb7417ab05b62973
# Parent  6ef05e62e3b3d7ff3748f9ebb326fee5ffee5a32
Enable deserialization of geometries with DBUnit.

diff -r 6ef05e62e3b3 -r 28a39466e4eb Dockerfile
--- a/Dockerfile	Tue Dec 13 16:42:41 2016 +0100
+++ b/Dockerfile	Tue Dec 13 17:24:06 2016 +0100
@@ -64,6 +64,9 @@
        $JBOSS_HOME/modules/org/postgres/main/module.xml
 RUN ln -fs $PWD/wildfly/hibernate-module.xml \
        $JBOSS_HOME/modules/system/layers/base/org/hibernate/main/module.xml
+# The jdbcadapters need to know the postgres module to cope with PGeometry
+RUN sed -i '/<\/dependencies>/i         <module name="org.postgres"/>' \
+    $JBOSS_HOME/modules/system/layers/base/org/jboss/ironjacamar/jdbcadapters/main/module.xml
 RUN ln -fs $PWD/wildfly/standalone.conf $JBOSS_HOME/bin/
 
 RUN wildfly/execute.sh
diff -r 6ef05e62e3b3 -r 28a39466e4eb src/test/resources/arquillian.xml
--- a/src/test/resources/arquillian.xml	Tue Dec 13 16:42:41 2016 +0100
+++ b/src/test/resources/arquillian.xml	Tue Dec 13 17:24:06 2016 +0100
@@ -41,6 +41,7 @@
     </extension>
     <extension qualifier="persistence-dbunit">
       <property name="qualifiedTableNames">true</property>
+      <property name="datatypeFactory">org.dbunit.ext.postgresql.PostgresqlDataTypeFactory</property>
     </extension>
     <extension qualifier="persistence-script">
       <property name="showSql">true</property>
diff -r 6ef05e62e3b3 -r 28a39466e4eb src/test/resources/datasets/dbUnit_ort.json
--- a/src/test/resources/datasets/dbUnit_ort.json	Tue Dec 13 16:42:41 2016 +0100
+++ b/src/test/resources/datasets/dbUnit_ort.json	Tue Dec 13 17:24:06 2016 +0100
@@ -12,8 +12,7 @@
         "koord_x_extern": "32487017",
         "koord_y_extern": "5519769",
         "letzte_aenderung": "2015-03-01 12:00:00",
-        "latitude": 49.83021,
-        "longitude": 8.81948,
+        "geom": "SRID=4326;POINT(49.83021 8.81948)",
         "ort_typ": 1,
         "kurztext": "kurz",
         "berichtstext": "bericht"


More information about the Lada-commits mailing list