Changeset 1942 for trunk


Ignore:
Timestamp:
2011-09-01 08:46:53 (9 months ago)
Author:
mpo
Message:

refactoring common test code and bumping the debug level on jpa-tests in dbresources

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/core/kauri-runtime-testfw/src/main/java/org/kauriproject/runtime/testfw/AbstractRuntimeTest.java

    r1938 r1942  
    4141import org.restlet.Response; 
    4242import org.restlet.data.Method; 
     43import org.restlet.data.Protocol; 
     44import org.restlet.data.Reference; 
    4345import org.apache.log4j.ConsoleAppender; 
    4446import org.apache.log4j.PatternLayout; 
     
    333335    protected Response assertedResponseFor(final String path, final int statusCode, final String responseText) throws IOException { 
    334336        Client client = runtime.getRestserviceManager().getComponent().getContext().getClientDispatcher(); 
    335         Request request = new Request(Method.GET, "http://localhost:" + HTTP_TEST_PORT + path); 
     337        Reference ref = makeTestReference(path); 
     338        Request request = new Request(Method.GET, ref); 
    336339        Response response = client.handle(request); 
    337340 
     
    350353        return response; 
    351354    } 
     355     
     356    protected Reference makeTestReference(final String path) { 
     357        return new Reference(Protocol.HTTP.getSchemeName(), "localhost", HTTP_TEST_PORT, path, null, null); 
     358    } 
    352359} 
  • trunk/modules/kauri-dbresources/kauri-dbresources-impl/pom.xml

    r1795 r1942  
    185185  </dependencies> 
    186186 
     187  <build> 
     188    <plugins> 
     189      <plugin> 
     190        <!-- 
     191        Executes tests at the integration test phase, since we need the jar to load 
     192        it as module in the Kauri Runtime during testing. 
     193        --> 
     194        <groupId>org.apache.maven.plugins</groupId> 
     195        <artifactId>maven-surefire-plugin</artifactId> 
     196        <configuration> 
     197          <skip>true</skip> 
     198          <systemProperties> 
     199            <property><name>project.version</name><value>${project.version}</value></property> 
     200          </systemProperties> 
     201        </configuration> 
     202        <executions> 
     203          <execution> 
     204            <id>surefire-it</id> 
     205            <phase>integration-test</phase> 
     206            <goals> 
     207              <goal>test</goal> 
     208            </goals> 
     209            <configuration> 
     210              <skip>${maven.test.skip}</skip> 
     211              <systemProperties> 
     212                <property><name>project.version</name><value>${project.version}</value></property> 
     213                <property><name>console-logging</name><value>trace</value></property> 
     214                <!--  
     215                <property><name>console-log-category</name><value>org.restlet</value></property> 
     216                --> 
     217              </systemProperties> 
     218            </configuration> 
     219          </execution> 
     220        </executions> 
     221      </plugin>     
     222    </plugins> 
     223  </build> 
     224   
    187225</project> 
  • trunk/modules/kauri-dbresources/kauri-dbresources-impl/src/test/java/org/kauriproject/dbresources/test/JpaTest.java

    r1886 r1942  
    357357    } 
    358358 
    359     private Reference makeTestReference(final String dirPath) { 
    360         return new Reference(Protocol.HTTP.getSchemeName(), "localhost", HTTP_TEST_PORT, dirPath, null, null); 
    361     } 
    362  
    363359    private void loadStuff() throws IOException { 
    364360        Dummy dummy1 = new Dummy(12, "My Dummy", new Date(), new Date()); 
Note: See TracChangeset for help on using the changeset viewer.