← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 12319: Changed from DhisTest to DhisSpringTest, faster

 

------------------------------------------------------------
revno: 12319
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2013-09-30 13:42:51 +0200
message:
  Changed from DhisTest to DhisSpringTest, faster
modified:
  dhis-2/dhis-services/dhis-service-integration/src/test/java/org/hisp/dhis/integration/RoutesTest.java
  dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/completeness/DataSetCompletenessServiceExportTest.java
  dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/completeness/DataSetCompletenessServiceTest.java
  dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/reporttable/ReportTableGridTest.java
  dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/reporttable/ReportTableTest.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/test/java/org/hisp/dhis/integration/RoutesTest.java'
--- dhis-2/dhis-services/dhis-service-integration/src/test/java/org/hisp/dhis/integration/RoutesTest.java	2013-08-23 16:05:01 +0000
+++ dhis-2/dhis-services/dhis-service-integration/src/test/java/org/hisp/dhis/integration/RoutesTest.java	2013-09-30 11:42:51 +0000
@@ -32,7 +32,7 @@
 import static org.hisp.dhis.importexport.ImportStrategy.NEW_AND_UPDATES;
 import static org.junit.Assert.assertNotNull;
 
-import org.hisp.dhis.DhisTest;
+import org.hisp.dhis.DhisSpringTest;
 import org.hisp.dhis.dataelement.DataElement;
 import org.hisp.dhis.dataelement.DataElementCategoryService;
 import org.hisp.dhis.dataelement.DataElementService;
@@ -52,7 +52,7 @@
 import org.springframework.core.io.ClassPathResource;
 
 public class RoutesTest
-    extends DhisTest
+    extends DhisSpringTest
 {
     @Autowired
     private DataElementService dataElementService;
@@ -88,12 +88,6 @@
     private Period peB;
 
     @Override
-    public boolean emptyDatabaseAfterTest()
-    {
-        return true;
-    }
-
-    @Override
     public void setUpTest()
     {
         deA = createDataElement( 'A' );

=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/completeness/DataSetCompletenessServiceExportTest.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/completeness/DataSetCompletenessServiceExportTest.java	2013-09-16 11:22:02 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/completeness/DataSetCompletenessServiceExportTest.java	2013-09-30 11:42:51 +0000
@@ -28,13 +28,13 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+import static org.hisp.dhis.system.util.ConversionUtils.getIdentifiers;
 import static org.junit.Assert.assertEquals;
-import static org.hisp.dhis.system.util.ConversionUtils.getIdentifiers;
 
 import java.util.ArrayList;
 import java.util.Collection;
 
-import org.hisp.dhis.DhisTest;
+import org.hisp.dhis.DhisSpringTest;
 import org.hisp.dhis.dataset.CompleteDataSetRegistration;
 import org.hisp.dhis.dataset.CompleteDataSetRegistrationService;
 import org.hisp.dhis.dataset.DataSet;
@@ -53,9 +53,9 @@
  * @author Lars Helge Overland
  * @version $Id$
  */
-@Ignore //TODO this test takes too long to run, reimplement
+@Ignore //TODO rewrite this test, takes too long
 public class DataSetCompletenessServiceExportTest
-    extends DhisTest
+    extends DhisSpringTest
 {
     private DataSetCompletenessEngine completenessEngine;
     
@@ -147,12 +147,6 @@
         dataSets.add( dataSetA );
     }
     
-    @Override
-    public boolean emptyDatabaseAfterTest()
-    {
-        return true;
-    }
-
     @Test
     public void testExportDataSetCompleteness()
     {

=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/completeness/DataSetCompletenessServiceTest.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/completeness/DataSetCompletenessServiceTest.java	2013-09-13 13:00:37 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/completeness/DataSetCompletenessServiceTest.java	2013-09-30 11:42:51 +0000
@@ -37,7 +37,7 @@
 import java.util.HashSet;
 import java.util.Set;
 
-import org.hisp.dhis.DhisTest;
+import org.hisp.dhis.DhisSpringTest;
 import org.hisp.dhis.dataelement.DataElement;
 import org.hisp.dhis.dataelement.DataElementCategoryOptionCombo;
 import org.hisp.dhis.dataelement.DataElementCategoryService;
@@ -65,9 +65,9 @@
  * @author Lars Helge Overland
  * @version $Id$
  */
-@Ignore //TODO this test takes too long to run, reimplement
+@Ignore //TODO rewrite this test, takes too long
 public class DataSetCompletenessServiceTest
-    extends DhisTest
+    extends DhisSpringTest
 {
     private LocationManager locationManager;
     
@@ -237,12 +237,6 @@
     //   B       C
     // E   F   G   H
     // -------------------------------------------------------------------------
-
-    @Override
-    public boolean emptyDatabaseAfterTest()
-    {
-        return true;
-    }
     
     // -------------------------------------------------------------------------
     // Tests

=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/reporttable/ReportTableGridTest.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/reporttable/ReportTableGridTest.java	2013-08-23 16:05:01 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/reporttable/ReportTableGridTest.java	2013-09-30 11:42:51 +0000
@@ -43,7 +43,7 @@
 
 import org.amplecode.quick.BatchHandler;
 import org.amplecode.quick.BatchHandlerFactory;
-import org.hisp.dhis.DhisTest;
+import org.hisp.dhis.DhisSpringTest;
 import org.hisp.dhis.aggregation.AggregatedDataValue;
 import org.hisp.dhis.aggregation.AggregatedIndicatorValue;
 import org.hisp.dhis.analytics.AnalyticsService;
@@ -80,7 +80,7 @@
  * @author Lars Helge Overland
  */
 public class ReportTableGridTest
-    extends DhisTest
+    extends DhisSpringTest
 {
     private ReportTableService reportTableService;
     
@@ -338,12 +338,6 @@
         completenessBatchHandler.flush();
     }
     
-    @Override
-    public boolean emptyDatabaseAfterTest()
-    {
-        return true;
-    }
-    
     private Set<DataElementCategoryOptionCombo> getSet( DataElementCategoryOptionCombo c )
     {
         return new HashSet<DataElementCategoryOptionCombo>( Arrays.asList( c ) );

=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/reporttable/ReportTableTest.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/reporttable/ReportTableTest.java	2013-08-23 16:05:01 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/reporttable/ReportTableTest.java	2013-09-30 11:42:51 +0000
@@ -38,7 +38,7 @@
 import java.util.HashSet;
 import java.util.List;
 
-import org.hisp.dhis.DhisTest;
+import org.hisp.dhis.DhisSpringTest;
 import org.hisp.dhis.common.DimensionalObject;
 import org.hisp.dhis.common.NameableObject;
 import org.hisp.dhis.dataelement.DataElement;
@@ -62,7 +62,7 @@
  * @author Lars Helge Overland
  */
 public class ReportTableTest
-    extends DhisTest
+    extends DhisSpringTest
 {
     private List<DataElement> dataElements;
     private List<DataElementCategoryOptionCombo> categoryOptionCombos;