Return-Path: Delivered-To: apmail-jackrabbit-commits-archive@www.apache.org Received: (qmail 68863 invoked from network); 28 Oct 2008 12:53:29 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 28 Oct 2008 12:53:29 -0000 Received: (qmail 70895 invoked by uid 500); 28 Oct 2008 12:53:34 -0000 Delivered-To: apmail-jackrabbit-commits-archive@jackrabbit.apache.org Received: (qmail 70863 invoked by uid 500); 28 Oct 2008 12:53:33 -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 70853 invoked by uid 99); 28 Oct 2008 12:53:33 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Oct 2008 05:53:33 -0700 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, 28 Oct 2008 12:52:28 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 7ACFD2388986; Tue, 28 Oct 2008 05:52:38 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r708557 - /jackrabbit/sandbox/jackrabbit-test-harness/compatibility/verify/src/test/java/org/apache/jackrabbit/harness/compatibility/VerifyRepositoryTest.java Date: Tue, 28 Oct 2008 12:52:38 -0000 To: commits@jackrabbit.apache.org From: jukka@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20081028125238.7ACFD2388986@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: jukka Date: Tue Oct 28 05:52:38 2008 New Revision: 708557 URL: http://svn.apache.org/viewvc?rev=708557&view=rev Log: test-harness: Use a TestNG data provider to make the test results over multiple repositories easier to grasp Modified: jackrabbit/sandbox/jackrabbit-test-harness/compatibility/verify/src/test/java/org/apache/jackrabbit/harness/compatibility/VerifyRepositoryTest.java Modified: jackrabbit/sandbox/jackrabbit-test-harness/compatibility/verify/src/test/java/org/apache/jackrabbit/harness/compatibility/VerifyRepositoryTest.java URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-test-harness/compatibility/verify/src/test/java/org/apache/jackrabbit/harness/compatibility/VerifyRepositoryTest.java?rev=708557&r1=708556&r2=708557&view=diff ============================================================================== --- jackrabbit/sandbox/jackrabbit-test-harness/compatibility/verify/src/test/java/org/apache/jackrabbit/harness/compatibility/VerifyRepositoryTest.java (original) +++ jackrabbit/sandbox/jackrabbit-test-harness/compatibility/verify/src/test/java/org/apache/jackrabbit/harness/compatibility/VerifyRepositoryTest.java Tue Oct 28 05:52:38 2008 @@ -17,23 +17,36 @@ package org.apache.jackrabbit.harness.compatibility; import java.io.File; +import java.util.ArrayList; import java.util.Arrays; +import java.util.List; +import org.testng.annotations.DataProvider; import org.testng.annotations.Test; public class VerifyRepositoryTest extends AbstractRepositoryTest { - @Test - public void verifyRepositories() throws Exception { - File directory = new File("target", "dependency"); - File[] repositories = directory.listFiles(); + private static final File BASEDIR = new File("target", "dependency"); + + @DataProvider(name = "repository") + public Object[][] getRepositories() throws Exception { + List tests = new ArrayList(); + + File[] repositories = BASEDIR.listFiles(); Arrays.sort(repositories); for (File repository : repositories) { if (repository.isDirectory() && new File(repository, "repository.xml").exists()) { - doVerifyRepository(repository); + tests.add(new Object[] { repository.getName() }); } } + + return tests.toArray(new Object[tests.size()][]); + } + + @Test(dataProvider = "repository") + public void verifyRepository(String name) throws Exception { + doVerifyRepository(new File(BASEDIR, name)); } }