[Lada-commits] [PATCH 2 of 2] Apply database seeding only once and run all tests in sequence

Wald Commits scm-commit at wald.intevation.org
Thu Oct 13 21:27:01 CEST 2016


# HG changeset patch
# User Tom Gottfried <tom at intevation.de>
# Date 1476386751 -7200
# Node ID 8f2b1a8f2a73e5d5a66c87f8bd37e0bd60a66ada
# Parent  4f52e8bc357281d5e1d7d2c34b07f8ba03a2c19b
Apply database seeding only once and run all tests in sequence.

Before many tests were run before the database was filled and thus
failed on first run.

diff -r 4f52e8bc3572 -r 8f2b1a8f2a73 src/test/java/de/intevation/lada/StammdatenTest.java
--- a/src/test/java/de/intevation/lada/StammdatenTest.java	Thu Oct 13 21:24:20 2016 +0200
+++ b/src/test/java/de/intevation/lada/StammdatenTest.java	Thu Oct 13 21:25:51 2016 +0200
@@ -47,8 +47,6 @@
  * @author <a href="mailto:rrenkert at intevation.de">Raimund Renkert</a>
  */
 @RunWith(Arquillian.class)
- at FixMethodOrder(MethodSorters.NAME_ASCENDING)
- at ApplyScriptBefore("datasets/clean_and_seed.sql")
 public class StammdatenTest extends BaseTest {
 
     private static Logger logger = Logger.getLogger(StammdatenTest.class);
@@ -82,6 +80,7 @@
      */
     @Test
     @InSequence(1)
+    @ApplyScriptBefore("datasets/clean_and_seed.sql")
     @UsingDataSet("datasets/dbUnit_datensatzerzeuger.json")
     @DataSource("java:jboss/lada-stamm")
     @Cleanup(phase=TestExecutionPhase.NONE)
@@ -202,156 +201,182 @@
     }
 
     @Test
+    @InSequence(9)
     @RunAsClient
     public final void testDatenbasisAll(@ArquillianResource URL baseUrl) {
         stammdatenTest.getAll(baseUrl, "datenbasis", testProtocol);
     }
 
     @Test
+    @InSequence(10)
     @RunAsClient
     public final void testDatenbasisById(@ArquillianResource URL baseUrl) {
         stammdatenTest.getById(baseUrl, "datenbasis", 9, testProtocol);
     }
 
     @Test
+    @InSequence(11)
     @RunAsClient
     public final void testMesseinheitAll(@ArquillianResource URL baseUrl) {
         stammdatenTest.getAll(baseUrl, "messeinheit", testProtocol);
     }
 
     @Test
+    @InSequence(12)
     @RunAsClient
     public final void testMesseinheitById(@ArquillianResource URL baseUrl) {
         stammdatenTest.getById(baseUrl, "messeinheit", 207, testProtocol);
     }
 
     @Test
+    @InSequence(13)
     @RunAsClient
     public final void testMessgroesseAll(@ArquillianResource URL baseUrl) {
         stammdatenTest.getAll(baseUrl, "messgroesse", testProtocol);
     }
 
     @Test
+    @InSequence(14)
     @RunAsClient
     public final void testMessgroesseById(@ArquillianResource URL baseUrl) {
         stammdatenTest.getById(baseUrl, "messgroesse", 56, testProtocol);
     }
 
     @Test
+    @InSequence(15)
     @RunAsClient
     public final void testMessmethodeAll(@ArquillianResource URL baseUrl) {
         stammdatenTest.getAll(baseUrl, "messmethode", testProtocol);
     }
 
     @Test
+    @InSequence(16)
     @RunAsClient
     public final void testMessmethodeById(@ArquillianResource URL baseUrl) {
         stammdatenTest.getById(baseUrl, "messmethode", "GI", testProtocol);
     }
 
     @Test
+    @InSequence(17)
     @RunAsClient
     public final void testMessstelleAll(@ArquillianResource URL baseUrl) {
         stammdatenTest.getAll(baseUrl, "messstelle", testProtocol);
     }
 
     @Test
+    @InSequence(18)
     @RunAsClient
     public final void testMessstelleById(@ArquillianResource URL baseUrl) {
         stammdatenTest.getById(baseUrl, "messstelle", "06010", testProtocol);
     }
 
     @Test
+    @InSequence(19)
     @RunAsClient
     public final void testNetzbetreiberAll(@ArquillianResource URL baseUrl) {
         stammdatenTest.getAll(baseUrl, "netzbetreiber", testProtocol);
     }
 
     @Test
+    @InSequence(20)
     @RunAsClient
     public final void testNetzbetreiberById(@ArquillianResource URL baseUrl) {
         stammdatenTest.getById(baseUrl, "netzbetreiber", "06", testProtocol);
     }
 
     @Test
+    @InSequence(21)
     @RunAsClient
     public final void testPflichtmessgroesseAll(@ArquillianResource URL baseUrl) {
         stammdatenTest.getAll(baseUrl, "pflichtmessgroesse", testProtocol);
     }
 
     @Test
+    @InSequence(22)
     @RunAsClient
     public final void testPflichtmessgroesseById(@ArquillianResource URL baseUrl) {
         stammdatenTest.getById(baseUrl, "pflichtmessgroesse", 33, testProtocol);
     }
 
     @Test
+    @InSequence(23)
     @RunAsClient
     public final void testProbenartAll(@ArquillianResource URL baseUrl) {
         stammdatenTest.getAll(baseUrl, "probenart", testProtocol);
     }
 
     @Test
+    @InSequence(24)
     @RunAsClient
     public final void testProbenartById(@ArquillianResource URL baseUrl) {
         stammdatenTest.getById(baseUrl, "probenart", 1, testProtocol);
     }
 
     @Test
+    @InSequence(25)
     @RunAsClient
     public final void testProbenzusatzAll(@ArquillianResource URL baseUrl) {
         stammdatenTest.getAll(baseUrl, "probenzusatz", testProtocol);
     }
 
     @Test
+    @InSequence(26)
     @RunAsClient
     public final void testProbenzusatzById(@ArquillianResource URL baseUrl) {
         stammdatenTest.getById(baseUrl, "probenzusatz", "A74", testProtocol);
     }
 
     @Test
+    @InSequence(27)
     @RunAsClient
     public final void testKoordinatenartAll(@ArquillianResource URL baseUrl) {
         stammdatenTest.getAll(baseUrl, "koordinatenart", testProtocol);
     }
 
     @Test
+    @InSequence(28)
     @RunAsClient
     public final void testKoordinatenartById(@ArquillianResource URL baseUrl) {
         stammdatenTest.getById(baseUrl, "koordinatenart", 5, testProtocol);
     }
 
     @Test
+    @InSequence(29)
     @RunAsClient
     public final void testStaatAll(@ArquillianResource URL baseUrl) {
         stammdatenTest.getAll(baseUrl, "staat", testProtocol);
     }
 
     @Test
+    @InSequence(30)
     @RunAsClient
     public final void testStaatById(@ArquillianResource URL baseUrl) {
         stammdatenTest.getById(baseUrl, "staat", 0, testProtocol);
     }
 
     @Test
+    @InSequence(31)
     @RunAsClient
     public final void testUmweltAll(@ArquillianResource URL baseUrl) {
         stammdatenTest.getAll(baseUrl, "umwelt", testProtocol);
     }
 
     @Test
+    @InSequence(32)
     @RunAsClient
     public final void testUmweltById(@ArquillianResource URL baseUrl) {
         stammdatenTest.getById(baseUrl, "umwelt", "L6", testProtocol);
     }
 
     @Test
+    @InSequence(33)
     @RunAsClient
     public final void testVerwaltungseinheitAll(@ArquillianResource URL baseUrl) {
         stammdatenTest.getAll(baseUrl, "verwaltungseinheit", testProtocol);
     }
 
     @Test
+    @InSequence(34)
     @RunAsClient
     public final void testVerwaltungseinheitById(@ArquillianResource URL baseUrl) {
         stammdatenTest.getById(baseUrl, "verwaltungseinheit",


More information about the Lada-commits mailing list