incubator-ace-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ange...@apache.org
Subject svn commit: r1066183 - /incubator/ace/trunk/ace-integrationtests/src/test/java/org/apache/ace/it/repositoryadmin/RepositoryAdminTest.java
Date Tue, 01 Feb 2011 20:06:43 GMT
Author: angelos
Date: Tue Feb  1 20:06:43 2011
New Revision: 1066183

URL: http://svn.apache.org/viewvc?rev=1066183&view=rev
Log:
ACE-79 added the necessary cleanup method.

Modified:
    incubator/ace/trunk/ace-integrationtests/src/test/java/org/apache/ace/it/repositoryadmin/RepositoryAdminTest.java

Modified: incubator/ace/trunk/ace-integrationtests/src/test/java/org/apache/ace/it/repositoryadmin/RepositoryAdminTest.java
URL: http://svn.apache.org/viewvc/incubator/ace/trunk/ace-integrationtests/src/test/java/org/apache/ace/it/repositoryadmin/RepositoryAdminTest.java?rev=1066183&r1=1066182&r2=1066183&view=diff
==============================================================================
--- incubator/ace/trunk/ace-integrationtests/src/test/java/org/apache/ace/it/repositoryadmin/RepositoryAdminTest.java
(original)
+++ incubator/ace/trunk/ace-integrationtests/src/test/java/org/apache/ace/it/repositoryadmin/RepositoryAdminTest.java
Tue Feb  1 20:06:43 2011
@@ -160,6 +160,25 @@ public class RepositoryAdminTest extends
     private volatile StatefulGatewayRepository m_statefulGatewayRepository; /* Injected by
dependency manager */
     private volatile LogStore m_auditLogStore; /* Injected by dependency manager */
 
+    public void cleanUp() throws IOException, InvalidSyntaxException, InterruptedException
{
+        // Simply remove all objects in the repository.
+        clearRepository(m_artifactRepository);
+        clearRepository(m_artifact2groupRepository);
+        clearRepository(m_group2licenseRepository);
+        clearRepository(m_license2gatewayRepository);
+        clearRepository(m_artifactRepository);
+        clearRepository(m_groupRepository);
+        clearRepository(m_licenseRepository);
+        clearRepository(m_gatewayRepository);
+        clearRepository(m_deploymentVersionRepository);
+        m_statefulGatewayRepository.refresh();
+        try {
+            m_repositoryAdmin.logout(true);
+        }
+        catch (Exception ioe) {
+            //ioe.printStackTrace(System.out);
+        }
+    }
 
     public <T extends RepositoryObject> void clearRepository (ObjectRepository<T>
rep) {
         for (T entity : rep.get()) {



Mime
View raw message