Modified: ace/trunk/org.apache.ace.repository/test/org/apache/ace/repository/impl/RepositoryImplTest.java URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.repository/test/org/apache/ace/repository/impl/RepositoryImplTest.java?rev=1732517&r1=1732516&r2=1732517&view=diff ============================================================================== --- ace/trunk/org.apache.ace.repository/test/org/apache/ace/repository/impl/RepositoryImplTest.java (original) +++ ace/trunk/org.apache.ace.repository/test/org/apache/ace/repository/impl/RepositoryImplTest.java Fri Feb 26 16:55:17 2016 @@ -18,7 +18,6 @@ */ package org.apache.ace.repository.impl; -import static org.apache.ace.test.utils.TestUtils.UNIT; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertFalse; import static org.testng.Assert.assertNotNull; @@ -45,7 +44,7 @@ public class RepositoryImplTest { * Tests that if we do change something in an {@link InputStream} while committing data, that the version is bumped * for a repository. */ - @Test(groups = { UNIT }) + @Test() public void testCheckoutAndCommitWithChangeDoesChangeVersion() throws Exception { SortedRangeSet range; RepositoryImpl repo = new RepositoryImpl(new File(m_baseDir, "data"), new File(m_baseDir, "tmp"), true); @@ -71,7 +70,7 @@ public class RepositoryImplTest { * Tests that if we do not change anything in an {@link InputStream} while committing data, that the version is not * bumped for a repository. */ - @Test(groups = { UNIT }) + @Test() public void testCheckoutAndCommitWithoutChangeDoesNotChangeVersion() throws Exception { SortedRangeSet range; RepositoryImpl repo = new RepositoryImpl(new File(m_baseDir, "data"), new File(m_baseDir, "tmp"), true); @@ -89,19 +88,19 @@ public class RepositoryImplTest { assertEquals(1, range.getHigh(), "Version 1 should still be the most recent one"); } - @Test(groups = { UNIT }, expectedExceptions = { IllegalArgumentException.class }) + @Test(expectedExceptions = { IllegalArgumentException.class }) public void testCheckoutNegativeVersionFail() throws Exception { RepositoryImpl repo = new RepositoryImpl(new File(m_baseDir, "data"), new File(m_baseDir, "tmp"), true); repo.checkout(-1); } - @Test(groups = { UNIT }, expectedExceptions = { IllegalArgumentException.class }) + @Test(expectedExceptions = { IllegalArgumentException.class }) public void testCheckoutVersionZeroOnEmptyRepositoryFail() throws Exception { RepositoryImpl repo = new RepositoryImpl(new File(m_baseDir, "data"), new File(m_baseDir, "tmp"), true); repo.checkout(0); } - @Test(groups = { UNIT }) + @Test() public void testCommitAndCheckout() throws Exception { String readLine; RepositoryImpl repo = new RepositoryImpl(new File(m_baseDir, "data"), new File(m_baseDir, "tmp"), true); @@ -118,7 +117,7 @@ public class RepositoryImplTest { assertNull(repo.get(2), "Checking out a non-existing version should return null"); } - @Test(groups = { UNIT }, expectedExceptions = { IOException.class }) + @Test(expectedExceptions = { IOException.class }) public void testCommitExistingVersionFail() throws Exception { RepositoryImpl repo = new RepositoryImpl(new File(m_baseDir, "data"), new File(m_baseDir, "tmp"), true); @@ -129,7 +128,7 @@ public class RepositoryImplTest { repo.commit(data, 0); // should fail, as we're at version 1! } - @Test(groups = { UNIT }, expectedExceptions = { IOException.class }) + @Test(expectedExceptions = { IOException.class }) public void testCommitIncorrectVersionFail() throws Exception { RepositoryImpl repo = new RepositoryImpl(new File(m_baseDir, "data"), new File(m_baseDir, "tmp"), true); InputStream data = new ByteArrayInputStream("abc".getBytes()); @@ -141,7 +140,7 @@ public class RepositoryImplTest { * Tests that if we do change something in an {@link InputStream} while committing data, that the version is bumped * for a repository. */ - @Test(groups = { UNIT }) + @Test() public void testCommitInitialVersionDoesChangeVersion() throws Exception { SortedRangeSet range; RepositoryImpl repo = new RepositoryImpl(new File(m_baseDir, "data"), new File(m_baseDir, "tmp"), true); @@ -156,7 +155,7 @@ public class RepositoryImplTest { assertEquals(1, range.getHigh()); } - @Test(groups = { UNIT }) + @Test() public void testCommitMultipleVersionsOk() throws Exception { RepositoryImpl repo = new RepositoryImpl(new File(m_baseDir, "data"), new File(m_baseDir, "tmp"), true); @@ -168,13 +167,13 @@ public class RepositoryImplTest { assertTrue(range.getHigh() == 3, "We should have 3 versions in the repository."); } - @Test(groups = { UNIT }, expectedExceptions = { IllegalArgumentException.class }) + @Test(expectedExceptions = { IllegalArgumentException.class }) public void testCommitNegativeVersionFail() throws Exception { RepositoryImpl repo = new RepositoryImpl(new File(m_baseDir, "data"), new File(m_baseDir, "tmp"), true); repo.commit(new ByteArrayInputStream("abc".getBytes()), -1); } - @Test(groups = { UNIT }, expectedExceptions = { IOException.class }) + @Test(expectedExceptions = { IOException.class }) public void testCommitNonExistingVersionFail() throws Exception { RepositoryImpl repo = new RepositoryImpl(new File(m_baseDir, "data"), new File(m_baseDir, "tmp"), true); @@ -185,7 +184,7 @@ public class RepositoryImplTest { repo.commit(data, 2); // should fail, as we're at version 1! } - @Test(groups = { UNIT }) + @Test() public void testCommitToLimitedRepository() throws Exception { RepositoryImpl repo = new RepositoryImpl(new File(m_baseDir, "data"), new File(m_baseDir, "tmp"), true, 2 /* limit */); @@ -209,7 +208,7 @@ public class RepositoryImplTest { assertNotNull(repo.checkout(4)); } - @Test(groups = { UNIT }) + @Test() public void testCustomFileExtensionOk() throws Exception { RepositoryImpl repo = new RepositoryImpl(new File(m_baseDir, "data"), new File(m_baseDir, "tmp"), ".gz", true); File file = new File(m_baseDir, "data" + File.separator + "1.gz"); @@ -221,7 +220,7 @@ public class RepositoryImplTest { assertEquals(readLine, "abc", "File " + file.getAbsolutePath() + " should have contained 'abc'."); } - @Test(groups = { UNIT }) + @Test() public void testGetAndPut() throws Exception { String readLine; RepositoryImpl repo = new RepositoryImpl(new File(m_baseDir, "data"), new File(m_baseDir, "tmp"), true); @@ -241,31 +240,31 @@ public class RepositoryImplTest { assertNull(repo.get(2), "'get'ting a non-existing version should return null"); } - @Test(groups = { UNIT }, expectedExceptions = { IllegalArgumentException.class }) + @Test(expectedExceptions = { IllegalArgumentException.class }) public void testGetNegativeVersionFail() throws Exception { RepositoryImpl repo = new RepositoryImpl(new File(m_baseDir, "data"), new File(m_baseDir, "tmp"), true); repo.get(-1); } - @Test(groups = { UNIT }, expectedExceptions = { IllegalArgumentException.class }) + @Test(expectedExceptions = { IllegalArgumentException.class }) public void testGetVersionZeroForEmptyRepositoryFail() throws Exception { RepositoryImpl repo = new RepositoryImpl(new File(m_baseDir, "data"), new File(m_baseDir, "tmp"), true); repo.get(0); } - @Test(groups = { UNIT }, expectedExceptions = { IllegalArgumentException.class }) + @Test(expectedExceptions = { IllegalArgumentException.class }) public void testPutNegativeVersionFail() throws Exception { RepositoryImpl repo = new RepositoryImpl(new File(m_baseDir, "data"), new File(m_baseDir, "tmp"), true); repo.put(new ByteArrayInputStream("abc".getBytes()), -1); } - @Test(groups = { UNIT }, expectedExceptions = { IllegalArgumentException.class }) + @Test(expectedExceptions = { IllegalArgumentException.class }) public void testPutVersionZeroFail() throws Exception { RepositoryImpl repo = new RepositoryImpl(new File(m_baseDir, "data"), new File(m_baseDir, "tmp"), true); repo.put(new ByteArrayInputStream("abc".getBytes()), 0); } - @Test(groups = { UNIT }, expectedExceptions = { IllegalStateException.class }) + @Test(expectedExceptions = { IllegalStateException.class }) public void testUpdatedConfigurationOk() throws Exception { RepositoryImpl repo = new RepositoryImpl(new File(m_baseDir, "data"), new File(m_baseDir, "tmp"), true); File file = new File(m_baseDir, "newLocation" + File.separator + "1");
Modified: ace/trunk/org.apache.ace.scheduler/test/org/apache/ace/scheduler/ExecuterTest.java URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.scheduler/test/org/apache/ace/scheduler/ExecuterTest.java?rev=1732517&r1=1732516&r2=1732517&view=diff ============================================================================== --- ace/trunk/org.apache.ace.scheduler/test/org/apache/ace/scheduler/ExecuterTest.java (original) +++ ace/trunk/org.apache.ace.scheduler/test/org/apache/ace/scheduler/ExecuterTest.java Fri Feb 26 16:55:17 2016 @@ -18,8 +18,6 @@ */ package org.apache.ace.scheduler; -import static org.apache.ace.test.utils.TestUtils.UNIT; - import java.util.concurrent.CountDownLatch; import java.util.concurrent.Semaphore; import java.util.concurrent.TimeUnit; @@ -31,12 +29,12 @@ public class ExecuterTest { private Semaphore m_sem; - @BeforeMethod(groups = { UNIT }) + @BeforeMethod() public void setup() { } /* start task, verify if it has run */ - @Test(groups = { UNIT }) + @Test() public void testExecute() throws Exception { m_sem = new Semaphore(1); Executer executer = new Executer(new Runnable() { @@ -50,7 +48,7 @@ public class ExecuterTest { } /* start task, stop it, verify if it executed only once */ - @Test(groups = { UNIT }) + @Test() public void testStop() throws Exception { m_sem = new Semaphore(2); Executer executer = new Executer(new Runnable() { @@ -69,11 +67,14 @@ public class ExecuterTest { assert m_sem.tryAcquire(1, TimeUnit.SECONDS); } - /* start task, which executes longer than the task interval specifies, causing multiple concurrent tasks to be started. */ - @Test(groups = { UNIT }) + /* + * start task, which executes longer than the task interval specifies, causing multiple concurrent tasks to be + * started. + */ + @Test() public void testTooLongTask() throws Exception { final CountDownLatch latch = new CountDownLatch(5); - + Executer executer = new Executer(new Runnable() { public void run() { try { Modified: ace/trunk/org.apache.ace.scheduler/test/org/apache/ace/scheduler/SchedulerTest.java URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.scheduler/test/org/apache/ace/scheduler/SchedulerTest.java?rev=1732517&r1=1732516&r2=1732517&view=diff ============================================================================== --- ace/trunk/org.apache.ace.scheduler/test/org/apache/ace/scheduler/SchedulerTest.java (original) +++ ace/trunk/org.apache.ace.scheduler/test/org/apache/ace/scheduler/SchedulerTest.java Fri Feb 26 16:55:17 2016 @@ -18,8 +18,6 @@ */ package org.apache.ace.scheduler; -import static org.apache.ace.test.utils.TestUtils.UNIT; - import java.util.Dictionary; import java.util.Hashtable; @@ -38,12 +36,12 @@ public class SchedulerTest { TestUtils.configureObject(m_scheduler, LogService.class); } - @Test(groups = { UNIT }, expectedExceptions = IllegalArgumentException.class) + @Test(expectedExceptions = IllegalArgumentException.class) public synchronized void testIllegalCreation() { new SchedulerTask(null); } - @Test(groups = { UNIT }) + @Test() public synchronized void testUpdate() throws Exception { Dictionary<String, Object> props = new Hashtable<>(); @@ -52,15 +50,17 @@ public class SchedulerTest { props.put("local.mock.task3", 3000l); m_scheduler.updated(props); assert m_scheduler.m_tasks.size() == props.size() : "Exactly three schedules should be known to the scheduler"; - assert ((SchedulerTask) m_scheduler.m_tasks.get("local.mock.task1")).getCurrentRecipe().equals(new Long(1000)) : "The schedule for mock task 1 should specify interval 1000, but it specifies " + ((SchedulerTask) m_scheduler.m_tasks.get("local.mock.task1")).getCurrentRecipe(); + assert ((SchedulerTask) m_scheduler.m_tasks.get("local.mock.task1")).getCurrentRecipe().equals(new Long(1000)) : "The schedule for mock task 1 should specify interval 1000, but it specifies " + + ((SchedulerTask) m_scheduler.m_tasks.get("local.mock.task1")).getCurrentRecipe(); props.put("local.mock.task1", 4000l); m_scheduler.updated(props); - assert ((SchedulerTask) m_scheduler.m_tasks.get("local.mock.task1")).getCurrentRecipe().equals(new Long(4000)) : "The schedule for mock task 1 should specify interval 4000, but it specifies " + ((SchedulerTask) m_scheduler.m_tasks.get("local.mock.task1")).getCurrentRecipe(); + assert ((SchedulerTask) m_scheduler.m_tasks.get("local.mock.task1")).getCurrentRecipe().equals(new Long(4000)) : "The schedule for mock task 1 should specify interval 4000, but it specifies " + + ((SchedulerTask) m_scheduler.m_tasks.get("local.mock.task1")).getCurrentRecipe(); assert !((SchedulerTask) m_scheduler.m_tasks.get("local.mock.task1")).isScheduled() : "Since we have not provided a runnable for the scheduler, the tasks should not be scheduled."; } - @Test( groups = { UNIT } ) + @Test() public synchronized void testAdditionalProperties() throws Exception { Dictionary<String, Object> props = new Hashtable<>(); @@ -68,33 +68,36 @@ public class SchedulerTest { m_scheduler.updated(props); m_scheduler.addRunnable("local.mock.task1", new Runnable() { public void run() { - }}, "Dummy testing task", null, false); + } + }, "Dummy testing task", null, false); // We should be able to get here, since unrecognized properties should be ignored. } - @Test(groups = { UNIT }) + @Test() public synchronized void testAddTask() throws Exception { assert m_scheduler.m_tasks.isEmpty(); m_scheduler.addRunnable("local.mock.task1", new Runnable() { public void run() { - }}, "Dummy testing task", null, false); + } + }, "Dummy testing task", null, false); assert m_scheduler.m_tasks.size() == 1 : "Exactly one task should be known to the scheduler"; SchedulerTask task = (SchedulerTask) m_scheduler.m_tasks.get("local.mock.task1"); assert "local.mock.task1".equals(task.getName()) : "Task that was just added has a different name than expected"; } - @Test(groups = { UNIT }) + @Test() public synchronized void testRemoveTask() throws Exception { m_scheduler.addRunnable("local.mock.task1", new Runnable() { public void run() { - }}, "Dummy testing task", null, false); + } + }, "Dummy testing task", null, false); m_scheduler.removeRunnable("nonExistent"); assert m_scheduler.m_tasks.size() == 1 : "Number of tasks known to the scheduler should still be one after removing a non-existing task"; m_scheduler.removeRunnable("local.mock.task1"); assert m_scheduler.m_tasks.isEmpty() : "Number of tasks known to the scheduler should be zero after removing the task we just added"; } - @Test(groups = { UNIT }) + @Test() public synchronized void testProcessTask() throws Exception { Dictionary<String, Object> props = new Hashtable<>(); @@ -103,39 +106,46 @@ public class SchedulerTest { m_scheduler.addRunnable("local.mock.task1", new Runnable() { public void run() { - }}, "Dummy testing task", null, false); + } + }, "Dummy testing task", null, false); assert ((SchedulerTask) m_scheduler.m_tasks.get("local.mock.task1")).isScheduled() : "An executer should exist after adding a matching task and scheduling-recipe"; } - @Test(groups = { UNIT }) + @Test() public synchronized void testSchedulePrevailanceAndRemoval() throws Exception { Dictionary<String, Object> props = new Hashtable<>(); props.put("local.mock.task1", 1000l); m_scheduler.updated(props); - assert ((SchedulerTask) m_scheduler.m_tasks.get("local.mock.task1")).getCurrentRecipe().equals(new Long(1000)) : "The schedule for mock task 1 should specify interval 1000, but it specifies " + ((SchedulerTask) m_scheduler.m_tasks.get("local.mock.task1")).getCurrentRecipe(); + assert ((SchedulerTask) m_scheduler.m_tasks.get("local.mock.task1")).getCurrentRecipe().equals(new Long(1000)) : "The schedule for mock task 1 should specify interval 1000, but it specifies " + + ((SchedulerTask) m_scheduler.m_tasks.get("local.mock.task1")).getCurrentRecipe(); assert !((SchedulerTask) m_scheduler.m_tasks.get("local.mock.task1")).isScheduled() : "Since we have not provided a runnable for the scheduler, the tasks should not be scheduled."; m_scheduler.addRunnable("local.mock.task1", new Runnable() { public void run() { - }}, "Dummy testing task", 2000l, true); + } + }, "Dummy testing task", 2000l, true); - assert ((SchedulerTask) m_scheduler.m_tasks.get("local.mock.task1")).getCurrentRecipe().equals(new Long(2000)) : "The schedule for mock task 1 should specify interval 2000, but it specifies " + ((SchedulerTask) m_scheduler.m_tasks.get("local.mock.task1")).getCurrentRecipe(); + assert ((SchedulerTask) m_scheduler.m_tasks.get("local.mock.task1")).getCurrentRecipe().equals(new Long(2000)) : "The schedule for mock task 1 should specify interval 2000, but it specifies " + + ((SchedulerTask) m_scheduler.m_tasks.get("local.mock.task1")).getCurrentRecipe(); assert ((SchedulerTask) m_scheduler.m_tasks.get("local.mock.task1")).isScheduled() : "Since we have now provided a runnable for the scheduler, the tasks should be scheduled."; m_scheduler.addRunnable("local.mock.task1", new Runnable() { public void run() { - }}, "Dummy testing task", 2000l, false); + } + }, "Dummy testing task", 2000l, false); - assert ((SchedulerTask) m_scheduler.m_tasks.get("local.mock.task1")).getCurrentRecipe().equals(new Long(1000)) : "The schedule for mock task 1 should specify interval 1000, but it specifies " + ((SchedulerTask) m_scheduler.m_tasks.get("local.mock.task1")).getCurrentRecipe(); + assert ((SchedulerTask) m_scheduler.m_tasks.get("local.mock.task1")).getCurrentRecipe().equals(new Long(1000)) : "The schedule for mock task 1 should specify interval 1000, but it specifies " + + ((SchedulerTask) m_scheduler.m_tasks.get("local.mock.task1")).getCurrentRecipe(); assert ((SchedulerTask) m_scheduler.m_tasks.get("local.mock.task1")).isScheduled() : "Since we have now provided a runnable for the scheduler, the tasks should be scheduled."; props = new Hashtable<>(); m_scheduler.updated(props); - assert ((SchedulerTask) m_scheduler.m_tasks.get("local.mock.task1")).getCurrentRecipe().equals(new Long(2000)) : "The schedule for mock task 1 should specify interval 2000, but it specifies " + ((SchedulerTask) m_scheduler.m_tasks.get("local.mock.task1")).getCurrentRecipe(); + assert ((SchedulerTask) m_scheduler.m_tasks.get("local.mock.task1")).getCurrentRecipe().equals(new Long(2000)) : "The schedule for mock task 1 should specify interval 2000, but it specifies " + + ((SchedulerTask) m_scheduler.m_tasks.get("local.mock.task1")).getCurrentRecipe(); assert ((SchedulerTask) m_scheduler.m_tasks.get("local.mock.task1")).isScheduled() : "Since we have now provided a runnable for the scheduler, the tasks should be scheduled."; m_scheduler.removeRunnable("local.mock.task1"); Modified: ace/trunk/org.apache.ace.test/bnd.bnd URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.test/bnd.bnd?rev=1732517&r1=1732516&r2=1732517&view=diff ============================================================================== --- ace/trunk/org.apache.ace.test/bnd.bnd (original) +++ ace/trunk/org.apache.ace.test/bnd.bnd Fri Feb 26 16:55:17 2016 @@ -7,16 +7,20 @@ junit.osgi,\ org.apache.felix.gogo.runtime,\ org.apache.felix.dependencymanager +-baseline: + Export-Package: org.apache.ace.it,\ org.apache.ace.test.constants,\ org.apache.ace.test.utils + Import-Package: \ junit.framework;resolution:=optional,\ org.apache.felix.service.command;resolution:=optional,\ * +Private-Package: org.apache.ace.it.gogo -Bundle-Version: 1.3.0 +Bundle-Activator: org.apache.ace.it.gogo.Activator +Bundle-Version: 2.0.0 Bundle-Name: Apache ACE Test Bundle-Description: Provides base classes and utils for integration tests -Private-Package: org.apache.ace.it.gogo -Bundle-Activator: org.apache.ace.it.gogo.Activator +Bundle-Category: itest Modified: ace/trunk/org.apache.ace.test/src/org/apache/ace/it/IntegrationTestBase.java URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.test/src/org/apache/ace/it/IntegrationTestBase.java?rev=1732517&r1=1732516&r2=1732517&view=diff ============================================================================== --- ace/trunk/org.apache.ace.test/src/org/apache/ace/it/IntegrationTestBase.java (original) +++ ace/trunk/org.apache.ace.test/src/org/apache/ace/it/IntegrationTestBase.java Fri Feb 26 16:55:17 2016 @@ -605,14 +605,6 @@ public class IntegrationTestBase extends m_dependencyManager.add(component); } - System.setProperty("org.apache.ace.server.port", Integer.toString(TestConstants.PORT)); - - // Ensure the HTTP service is running on the port we expect... - int port = Integer.getInteger("org.osgi.service.http.port", 8080); - if (port != TestConstants.PORT) { - configureHttpService(TestConstants.PORT); - } - // Call back the implementation... configureProvisionedServices(); @@ -624,7 +616,7 @@ public class IntegrationTestBase extends // XXX it appears we run into race conditions between the setup and configuration of our services, use a // little delay to get things settled seems to help here... - TimeUnit.MILLISECONDS.sleep(500); + TimeUnit.MILLISECONDS.sleep(300); configureAdditionalServices(); } Modified: ace/trunk/org.apache.ace.test/src/org/apache/ace/test/constants/TestConstants.java URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.test/src/org/apache/ace/test/constants/TestConstants.java?rev=1732517&r1=1732516&r2=1732517&view=diff ============================================================================== --- ace/trunk/org.apache.ace.test/src/org/apache/ace/test/constants/TestConstants.java (original) +++ ace/trunk/org.apache.ace.test/src/org/apache/ace/test/constants/TestConstants.java Fri Feb 26 16:55:17 2016 @@ -28,5 +28,5 @@ import aQute.bnd.annotation.ProviderType @ProviderType public interface TestConstants { /** The port the webserver is running on for testing. */ - public static final int PORT = 18080; + public static final int PORT = Integer.getInteger("org.osgi.service.http.port", 8080); } Modified: ace/trunk/org.apache.ace.test/src/org/apache/ace/test/constants/packageinfo URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.test/src/org/apache/ace/test/constants/packageinfo?rev=1732517&r1=1732516&r2=1732517&view=diff ============================================================================== --- ace/trunk/org.apache.ace.test/src/org/apache/ace/test/constants/packageinfo (original) +++ ace/trunk/org.apache.ace.test/src/org/apache/ace/test/constants/packageinfo Fri Feb 26 16:55:17 2016 @@ -1 +1 @@ -version 1.0.1 \ No newline at end of file +version 1.0.2 \ No newline at end of file Modified: ace/trunk/org.apache.ace.test/src/org/apache/ace/test/utils/TestUtils.java URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.test/src/org/apache/ace/test/utils/TestUtils.java?rev=1732517&r1=1732516&r2=1732517&view=diff ============================================================================== --- ace/trunk/org.apache.ace.test/src/org/apache/ace/test/utils/TestUtils.java (original) +++ ace/trunk/org.apache.ace.test/src/org/apache/ace/test/utils/TestUtils.java Fri Feb 26 16:55:17 2016 @@ -29,17 +29,14 @@ import java.lang.reflect.Proxy; * Utility class that injects dependencies. Can be used to unit test service implementations. */ public class TestUtils { - public static final String UNIT = "unit"; - public static final String INTEGRATION = "integration"; - public static final String SMOKE = "smoke"; - public static final String PERFORMANCE = "performance"; - public static final String UI = "ui"; - public static final String BROKEN = "broken"; + /** * Configures an object to use a null object for the specified service interface. * - * @param object the object - * @param iface the service interface + * @param object + * the object + * @param iface + * the service interface */ public static <T> void configureObject(Object object, Class<T> iface) { configureObject(object, iface, createNullObject(iface)); @@ -48,7 +45,8 @@ public class TestUtils { /** * Creates a null object for a service interface. * - * @param iface the service interface + * @param iface + * the service interface * @return a null object */ @SuppressWarnings("unchecked") @@ -57,11 +55,13 @@ public class TestUtils { } /** - * Wraps the given handler in an adapter that will try to pass on received invocations to the hander if that has - * an applicable methods else it defaults to a NullObject. + * Wraps the given handler in an adapter that will try to pass on received invocations to the hander if that has an + * applicable methods else it defaults to a NullObject. * - * @param iface the service interface - * @param handler the handler to pass invocations to. + * @param iface + * the service interface + * @param handler + * the handler to pass invocations to. * @return an adapter that will try to pass on received invocations to the given handler */ @SuppressWarnings("unchecked") @@ -88,9 +88,12 @@ public class TestUtils { /** * Configures an object to use a specific implementation for the specified service interface. * - * @param object the object - * @param iface the service interface - * @param instance the implementation + * @param object + * the object + * @param iface + * the service interface + * @param instance + * the implementation */ public static void configureObject(Object object, @SuppressWarnings("rawtypes") Class iface, Object instance) { Class<?> serviceClazz = object.getClass(); Modified: ace/trunk/org.apache.ace.test/src/org/apache/ace/test/utils/packageinfo URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.test/src/org/apache/ace/test/utils/packageinfo?rev=1732517&r1=1732516&r2=1732517&view=diff ============================================================================== --- ace/trunk/org.apache.ace.test/src/org/apache/ace/test/utils/packageinfo (original) +++ ace/trunk/org.apache.ace.test/src/org/apache/ace/test/utils/packageinfo Fri Feb 26 16:55:17 2016 @@ -1 +1 @@ -version 1.3.0 \ No newline at end of file +version 2.0.0 \ No newline at end of file Modified: ace/trunk/org.apache.ace.useradmin.itest/bnd.bnd URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.useradmin.itest/bnd.bnd?rev=1732517&r1=1732516&r2=1732517&view=diff ============================================================================== --- ace/trunk/org.apache.ace.useradmin.itest/bnd.bnd (original) +++ ace/trunk/org.apache.ace.useradmin.itest/bnd.bnd Fri Feb 26 16:55:17 2016 @@ -1,7 +1,7 @@ # Licensed to the Apache Software Foundation (ASF) under the terms of ASLv2 (http://www.apache.org/licenses/LICENSE-2.0). -Test-Cases: ${classes;CONCRETE;EXTENDS;org.apache.ace.it.IntegrationTestBase} -buildpath: \ + ${^-buildpath},\ junit.osgi,\ osgi.core;version=6.0.0,\ osgi.cmpn,\ @@ -11,9 +11,10 @@ Test-Cases: ${classes;CONCRETE;EXTENDS;o org.apache.ace.repository.api;version=latest,\ org.apache.felix.http.api,\ org.apache.felix.dependencymanager --runfw: org.apache.felix.framework;version='[5.2.0,6)' --runvm: -ea --runbundles: osgi.cmpn,\ + +-runfw: org.apache.felix.framework;version='[5,6)' +-runbundles: \ + osgi.cmpn,\ org.apache.felix.log,\ org.apache.felix.dependencymanager,\ org.apache.felix.configadmin,\ @@ -31,9 +32,17 @@ Test-Cases: ${classes;CONCRETE;EXTENDS;o org.apache.ace.repository.servlets;version=latest,\ org.apache.ace.useradmin.repository,\ org.apache.ace.http.context;version=latest +-runvm: -ea +-runee: JavaSE-1.7 +-runsystempackages: sun.reflect +-runproperties: ${itestrunprops} +-baseline: +Test-Cases: ${classes;CONCRETE;EXTENDS;org.apache.ace.it.IntegrationTestBase} + Private-Package: org.apache.ace.it.useradmin + Bundle-Version: 1.0.0 Bundle-Name: Apache ACE Repository itest Bundle-Description: Integration test bundle for Apache ACE Repository backed UserAdmin -Bundle-Category: itest \ No newline at end of file +Bundle-Category: itest Modified: ace/trunk/org.apache.ace.useradmin.ui.itest/bnd.bnd URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.useradmin.ui.itest/bnd.bnd?rev=1732517&r1=1732516&r2=1732517&view=diff ============================================================================== --- ace/trunk/org.apache.ace.useradmin.ui.itest/bnd.bnd (original) +++ ace/trunk/org.apache.ace.useradmin.ui.itest/bnd.bnd Fri Feb 26 16:55:17 2016 @@ -1,10 +1,20 @@ # Licensed to the Apache Software Foundation (ASF) under the terms of ASLv2 (http://www.apache.org/licenses/LICENSE-2.0). -Test-Cases: ${classes;CONCRETE;EXTENDS;org.apache.ace.it.IntegrationTestBase} -Private-Package: org.apache.ace.useradmin.ui.test --runvm: -ea --runfw: org.apache.felix.framework;version='[5.2.0,6)' --runbundles: osgi.cmpn,\ +-buildpath: \ + ${^-buildpath},\ + osgi.core;version=6.0.0,\ + osgi.cmpn,\ + junit.osgi,\ + org.mockito.mockito-all,\ + org.apache.felix.dependencymanager,\ + org.apache.ace.test;version=latest,\ + org.apache.ace.useradmin.ui;version=latest,\ + org.apache.ace.repository.api;version=latest,\ + org.apache.ace.range.api;version=latest + +-runfw: org.apache.felix.framework;version='[5,6)' +-runbundles: \ + osgi.cmpn,\ com.vaadin,\ org.apache.felix.configadmin,\ org.apache.felix.dependencymanager,\ @@ -37,25 +47,17 @@ Private-Package: org.apache.ace.useradmi org.apache.ace.authentication.api;version=latest,\ org.apache.ace.log.server.store.api;version=latest,\ org.apache.ace.feedback.common;version=latest --buildpath: \ - osgi.core;version=6.0.0,\ - osgi.cmpn,\ - junit.osgi,\ - org.mockito.mockito-all,\ - org.apache.felix.dependencymanager,\ - org.apache.ace.test;version=latest,\ - org.apache.ace.useradmin.ui;version=latest,\ - org.apache.ace.repository.api;version=latest,\ - org.apache.ace.range.api;version=latest +-runvm: -ea +-runee: JavaSE-1.7 -runsystempackages: sun.reflect --runproperties: org.apache.felix.log.storeDebug=true,\ - org.apache.felix.eventadmin.Timeout=0,\ - org.apache.ace.server.port=8080,\ - org.osgi.service.http.port=8080,\ - org.apache.felix.log.maxSize=1000 --runee: JavaSE-1.6 +-runproperties: ${itestrunprops} +-baseline: + +Test-Cases: ${classes;CONCRETE;EXTENDS;org.apache.ace.it.IntegrationTestBase} + +Private-Package: org.apache.ace.useradmin.ui.test + Bundle-Version: 1.0.0 Bundle-Name: Apache ACE UserAdminUI itest Bundle-Description: Integration test bundle for Apache ACE UserAdminUI Bundle-Category: itest --baseline: Modified: ace/trunk/org.apache.ace.verifier/test/org/apache/ace/deployment/verifier/impl/VerifierTest.java URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.verifier/test/org/apache/ace/deployment/verifier/impl/VerifierTest.java?rev=1732517&r1=1732516&r2=1732517&view=diff ============================================================================== --- ace/trunk/org.apache.ace.verifier/test/org/apache/ace/deployment/verifier/impl/VerifierTest.java (original) +++ ace/trunk/org.apache.ace.verifier/test/org/apache/ace/deployment/verifier/impl/VerifierTest.java Fri Feb 26 16:55:17 2016 @@ -18,8 +18,6 @@ */ package org.apache.ace.deployment.verifier.impl; -import static org.apache.ace.test.utils.TestUtils.UNIT; - import java.util.HashMap; import java.util.HashSet; import java.util.Set; @@ -39,7 +37,7 @@ import org.testng.annotations.Test; @SuppressWarnings({ "deprecation" }) public class VerifierTest { - @Test(groups = { UNIT }) + @Test() public void testResolve() throws BundleException { VerifierService verifier = new VerifierServiceImpl(); VerifyEnvironment env = verifier.createEnvironment(new HashMap<String, String>() { @@ -93,7 +91,7 @@ public class VerifierTest { AssertJUnit.assertTrue(" Unable to resolve resolvable state.", env.verifyResolve(bundles, null, null)); } - @Test(groups = { UNIT }) + @Test() public void testResolveFail() throws BundleException { VerifierService verifier = new VerifierServiceImpl(); VerifyEnvironment env = verifier.createEnvironment(new HashMap<String, String>() {
