← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 7454: Made Task Id header work properly with camel route. Re-enabled failing unit tests.

 

------------------------------------------------------------
revno: 7454
committer: Bob Jolliffe <bobjolliffe@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2012-06-29 11:51:48 +0100
message:
  Made Task Id header work properly with camel route.  Re-enabled failing unit tests.
modified:
  dhis-2/dhis-services/dhis-service-integration/src/main/java/org/hisp/dhis/integration/components/Dxf2DataProducer.java
  dhis-2/dhis-services/dhis-service-integration/src/main/java/org/hisp/dhis/integration/routes/SDMXDataIn.java
  dhis-2/dhis-services/dhis-service-integration/src/test/java/org/hisp/dhis/integration/RoutesTest.java


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-services/dhis-service-integration/src/main/java/org/hisp/dhis/integration/components/Dxf2DataProducer.java'
--- dhis-2/dhis-services/dhis-service-integration/src/main/java/org/hisp/dhis/integration/components/Dxf2DataProducer.java	2012-06-27 15:16:51 +0000
+++ dhis-2/dhis-services/dhis-service-integration/src/main/java/org/hisp/dhis/integration/components/Dxf2DataProducer.java	2012-06-29 10:51:48 +0000
@@ -59,8 +59,7 @@
         ImportOptions options = (ImportOptions) exchange.getIn().
             getHeader( IntegrationService.IMPORT_OPTIONS_HDR, endpoint.getImportOptions() );
         
-        TaskId taskId = (TaskId) exchange.getIn().
-            getHeader( IntegrationService.TASK_ID_HDR, null );
+        TaskId taskId = (TaskId) exchange.getIn().getHeader( IntegrationService.TASK_ID_HDR );
         
         ImportSummary summary = endpoint.getDataValueSetService().saveDataValueSet( (InputStream)exchange.getIn().getBody(), 
              options, taskId );

=== modified file 'dhis-2/dhis-services/dhis-service-integration/src/main/java/org/hisp/dhis/integration/routes/SDMXDataIn.java'
--- dhis-2/dhis-services/dhis-service-integration/src/main/java/org/hisp/dhis/integration/routes/SDMXDataIn.java	2012-06-22 16:46:42 +0000
+++ dhis-2/dhis-services/dhis-service-integration/src/main/java/org/hisp/dhis/integration/routes/SDMXDataIn.java	2012-06-29 10:51:48 +0000
@@ -57,7 +57,7 @@
         from(SDMXDATA_IN).
             convertBodyTo( java.lang.String.class, "UTF-8" ).to( "log:org.hisp.dhis.integration?level=INFO").
             to("xslt:transform/cross2dxf2.xsl").convertBodyTo( java.io.InputStream.class).
-            to("dhis2:data?orgUnitIdScheme=CODE&dataElementIdScheme=CODE&importStrategy=NEW_AND_UPDATES").
+            inOut("dhis2:data?orgUnitIdScheme=CODE&dataElementIdScheme=CODE&importStrategy=NEW_AND_UPDATES").
             setDescription( desc );
     }    
-}
\ No newline at end of file
+}

=== modified file 'dhis-2/dhis-services/dhis-service-integration/src/test/java/org/hisp/dhis/integration/RoutesTest.java'
--- dhis-2/dhis-services/dhis-service-integration/src/test/java/org/hisp/dhis/integration/RoutesTest.java	2012-06-27 15:46:57 +0000
+++ dhis-2/dhis-services/dhis-service-integration/src/test/java/org/hisp/dhis/integration/RoutesTest.java	2012-06-29 10:51:48 +0000
@@ -133,7 +133,6 @@
         periodService.addPeriod( peB );
     }
     
-    @Ignore
     @Test
     public void testImportDataValueSetSDMX()
         throws Exception
@@ -146,7 +145,6 @@
         
     }
 
-    @Ignore
     @Test
     public void testImportDataValueSetXML()
         throws Exception