Return-Path: Delivered-To: apmail-jackrabbit-commits-archive@www.apache.org Received: (qmail 22255 invoked from network); 25 May 2010 10:24:55 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 25 May 2010 10:24:55 -0000 Received: (qmail 55034 invoked by uid 500); 25 May 2010 10:24:55 -0000 Delivered-To: apmail-jackrabbit-commits-archive@jackrabbit.apache.org Received: (qmail 54938 invoked by uid 500); 25 May 2010 10:24:53 -0000 Mailing-List: contact commits-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jackrabbit.apache.org Delivered-To: mailing list commits@jackrabbit.apache.org Received: (qmail 54931 invoked by uid 99); 25 May 2010 10:24:53 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 May 2010 10:24:53 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 May 2010 10:24:51 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 6D9D3238896F; Tue, 25 May 2010 10:24:29 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r947996 - /jackrabbit/trunk/jackrabbit-jcr-server/src/test/java/org/apache/jackrabbit/webdav/simple/LitmusTest.java Date: Tue, 25 May 2010 10:24:29 -0000 To: commits@jackrabbit.apache.org From: jukka@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100525102429.6D9D3238896F@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: jukka Date: Tue May 25 10:24:29 2010 New Revision: 947996 URL: http://svn.apache.org/viewvc?rev=947996&view=rev Log: JCR-2614: Include the WebDAV litmus tests in the Jackrabbit integration tests Rearrange the test to improve performance while still running all Litmus parts separately Modified: jackrabbit/trunk/jackrabbit-jcr-server/src/test/java/org/apache/jackrabbit/webdav/simple/LitmusTest.java Modified: jackrabbit/trunk/jackrabbit-jcr-server/src/test/java/org/apache/jackrabbit/webdav/simple/LitmusTest.java URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-server/src/test/java/org/apache/jackrabbit/webdav/simple/LitmusTest.java?rev=947996&r1=947995&r2=947996&view=diff ============================================================================== --- jackrabbit/trunk/jackrabbit-jcr-server/src/test/java/org/apache/jackrabbit/webdav/simple/LitmusTest.java (original) +++ jackrabbit/trunk/jackrabbit-jcr-server/src/test/java/org/apache/jackrabbit/webdav/simple/LitmusTest.java Tue May 25 10:24:29 2010 @@ -40,37 +40,12 @@ public class LitmusTest extends TestCase */ private static final Logger log = LoggerFactory.getLogger(LitmusTest.class); - private static String litmus = System.getProperty("litmus", "litmus"); - - private static boolean litmusIsAvailable = isLitmusAvailable(litmus); - - public void testBasic() throws Exception { - assertLitmus("basic", 0); - } - - public void testHttp() throws Exception { - assertLitmus("http", 0); - } - - public void testProps() throws Exception { - assertLitmus("props", 0); - } - - public void testCopyMove() throws Exception { - // FIXME: JCR-2637: WebDAV shallow copy test failure - assertLitmus("copymove", 1); - } - - public void testLocks() throws Exception { - // FIXME: JCR-2638: Litmus locks test failures - assertLitmus("locks", 1); - } - - private void assertLitmus(String tests, int exit) throws Exception { + public void testLitmus() throws Exception { File dir = new File("target", "litmus"); + String litmus = System.getProperty("litmus", "litmus"); if (Boolean.getBoolean("jackrabbit.test.integration") - && litmusIsAvailable) { + && isLitmusAvailable(litmus)) { final Repository repository = JcrUtils.getRepository( "jcr-jackrabbit://" + dir.getCanonicalPath()); Session session = repository.login(); // for the TransientRepository @@ -103,13 +78,20 @@ public class LitmusTest extends TestCase ProcessBuilder builder = new ProcessBuilder(litmus, url, "admin", "admin"); - builder.environment().put("TESTS", tests); builder.directory(dir); builder.redirectErrorStream(); - Process process = builder.start(); - IOUtils.copy(process.getInputStream(), System.out); - assertEquals(exit, process.waitFor()); + assertLitmus(builder, "basic", 0); + + assertLitmus(builder, "http", 0); + + assertLitmus(builder, "props", 0); + + // FIXME: JCR-2637: WebDAV shallow copy test failure + assertLitmus(builder, "copymove", 1); + + // FIXME: JCR-2638: Litmus locks test failures + assertLitmus(builder, "locks", 1); } finally { server.stop(); } @@ -119,6 +101,14 @@ public class LitmusTest extends TestCase } } + private void assertLitmus( + ProcessBuilder builder, String tests, int exit) throws Exception { + builder.environment().put("TESTS", tests); + Process process = builder.start(); + IOUtils.copy(process.getInputStream(), System.out); + assertEquals(exit, process.waitFor()); + } + private static boolean isLitmusAvailable(String litmus) { try { ProcessBuilder builder = new ProcessBuilder(litmus, "--version");