incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bdelacre...@apache.org
Subject svn commit: r806568 - /sling/trunk/installer/osgi/installer/src/test/java/org/apache/sling/osgi/installer/impl/TaskOrderingTest.java
Date Fri, 21 Aug 2009 14:27:08 GMT
Author: bdelacretaz
Date: Fri Aug 21 14:27:08 2009
New Revision: 806568

URL: http://svn.apache.org/viewvc?rev=806568&view=rev
Log:
SLING-1078 - Config tasks ordering test

Modified:
    sling/trunk/installer/osgi/installer/src/test/java/org/apache/sling/osgi/installer/impl/TaskOrderingTest.java

Modified: sling/trunk/installer/osgi/installer/src/test/java/org/apache/sling/osgi/installer/impl/TaskOrderingTest.java
URL: http://svn.apache.org/viewvc/sling/trunk/installer/osgi/installer/src/test/java/org/apache/sling/osgi/installer/impl/TaskOrderingTest.java?rev=806568&r1=806567&r2=806568&view=diff
==============================================================================
--- sling/trunk/installer/osgi/installer/src/test/java/org/apache/sling/osgi/installer/impl/TaskOrderingTest.java
(original)
+++ sling/trunk/installer/osgi/installer/src/test/java/org/apache/sling/osgi/installer/impl/TaskOrderingTest.java
Fri Aug 21 14:27:08 2009
@@ -31,12 +31,13 @@
 import org.apache.sling.osgi.installer.impl.tasks.BundleRemoveTask;
 import org.apache.sling.osgi.installer.impl.tasks.BundleStartTask;
 import org.apache.sling.osgi.installer.impl.tasks.BundleUpdateTask;
+import org.apache.sling.osgi.installer.impl.tasks.ConfigInstallTask;
+import org.apache.sling.osgi.installer.impl.tasks.ConfigRemoveTask;
 import org.apache.sling.osgi.installer.impl.tasks.SynchronousRefreshPackagesTask;
 
 /** Test the ordering and duplicates elimination of
  * 	OsgiControllerTasks
  */
-// TODO add config-related tasks
 public class TaskOrderingTest {
 
 	private Set<OsgiInstallerTask> taskSet;
@@ -65,6 +66,8 @@
 	public void testBasicOrdering() throws Exception {
 		int testIndex = 1;
 		final OsgiInstallerTask [] tasksInOrder = {
+		    new ConfigRemoveTask(getRegisteredResource("test:a")),    
+            new ConfigInstallTask(getRegisteredResource("test:a")),    
 		    new BundleRemoveTask(getRegisteredResource("test:url")),
 		    new BundleUpdateTask(getRegisteredResource("test:url")),
 		    new BundleInstallTask(getRegisteredResource("test:url")),
@@ -73,38 +76,46 @@
 		};
 	
 		taskSet.clear();
-        taskSet.add(tasksInOrder[4]);
+        taskSet.add(tasksInOrder[6]);
+		taskSet.add(tasksInOrder[5]);
+		taskSet.add(tasksInOrder[4]);
 		taskSet.add(tasksInOrder[3]);
 		taskSet.add(tasksInOrder[2]);
-		taskSet.add(tasksInOrder[1]);
-		taskSet.add(tasksInOrder[0]);
+        taskSet.add(tasksInOrder[1]);
+        taskSet.add(tasksInOrder[0]);
 		
 		assertOrder(testIndex++, taskSet, tasksInOrder);
 		
 		taskSet.clear();
-		taskSet.add(tasksInOrder[0]);
-		taskSet.add(tasksInOrder[1]);
+        taskSet.add(tasksInOrder[0]);
+        taskSet.add(tasksInOrder[1]);
 		taskSet.add(tasksInOrder[2]);
 		taskSet.add(tasksInOrder[3]);
 		taskSet.add(tasksInOrder[4]);
+		taskSet.add(tasksInOrder[5]);
+		taskSet.add(tasksInOrder[6]);
 		
 		assertOrder(testIndex++, taskSet, tasksInOrder);
 		
 		taskSet.clear();
-		taskSet.add(tasksInOrder[1]);
-		taskSet.add(tasksInOrder[0]);
 		taskSet.add(tasksInOrder[3]);
 		taskSet.add(tasksInOrder[2]);
+        taskSet.add(tasksInOrder[0]);
+		taskSet.add(tasksInOrder[5]);
 		taskSet.add(tasksInOrder[4]);
+        taskSet.add(tasksInOrder[1]);
+		taskSet.add(tasksInOrder[6]);
 		
 		assertOrder(testIndex++, taskSet, tasksInOrder);
 		
 		taskSet.clear();
+		taskSet.add(tasksInOrder[4]);
+		taskSet.add(tasksInOrder[5]);
+		taskSet.add(tasksInOrder[6]);
+        taskSet.add(tasksInOrder[0]);
 		taskSet.add(tasksInOrder[2]);
 		taskSet.add(tasksInOrder[3]);
-		taskSet.add(tasksInOrder[4]);
-		taskSet.add(tasksInOrder[0]);
-		taskSet.add(tasksInOrder[1]);
+        taskSet.add(tasksInOrder[1]);
 		
 		assertOrder(testIndex++, taskSet, tasksInOrder);
 	}



Mime
View raw message