Return-Path: X-Original-To: apmail-ace-commits-archive@www.apache.org Delivered-To: apmail-ace-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 394F018BE3 for ; Fri, 26 Feb 2016 16:55:48 +0000 (UTC) Received: (qmail 77420 invoked by uid 500); 26 Feb 2016 16:55:26 -0000 Delivered-To: apmail-ace-commits-archive@ace.apache.org Received: (qmail 77395 invoked by uid 500); 26 Feb 2016 16:55:26 -0000 Mailing-List: contact commits-help@ace.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ace.apache.org Delivered-To: mailing list commits@ace.apache.org Received: (qmail 77384 invoked by uid 99); 26 Feb 2016 16:55:26 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 26 Feb 2016 16:55:26 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 89407C0FC8 for ; Fri, 26 Feb 2016 16:55:25 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.799 X-Spam-Level: * X-Spam-Status: No, score=1.799 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-0.001] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id 4Y4M9hQEOyh1 for ; Fri, 26 Feb 2016 16:55:20 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id CECA75F2C2 for ; Fri, 26 Feb 2016 16:55:19 +0000 (UTC) Received: from svn01-us-west.apache.org (svn.apache.org [10.41.0.6]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 29294E0425 for ; Fri, 26 Feb 2016 16:55:19 +0000 (UTC) Received: from svn01-us-west.apache.org (localhost [127.0.0.1]) by svn01-us-west.apache.org (ASF Mail Server at svn01-us-west.apache.org) with ESMTP id 0407E3A02E6 for ; Fri, 26 Feb 2016 16:55:19 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1732517 [2/4] - in /ace/trunk: cnf/ext/ org.apache.ace.agent.controller.itest/ org.apache.ace.agent.itest/ org.apache.ace.agent.update.itest/ org.apache.ace.agent/ org.apache.ace.authentication.itest/ org.apache.ace.authentication.itest/sr... Date: Fri, 26 Feb 2016 16:55:18 -0000 To: commits@ace.apache.org From: jawi@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20160226165519.0407E3A02E6@svn01-us-west.apache.org> Modified: ace/trunk/org.apache.ace.client.repository/test/org/apache/ace/client/repository/impl/ModelTest.java URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.client.repository/test/org/apache/ace/client/repository/impl/ModelTest.java?rev=1732517&r1=1732516&r2=1732517&view=diff ============================================================================== --- ace/trunk/org.apache.ace.client.repository/test/org/apache/ace/client/repository/impl/ModelTest.java (original) +++ ace/trunk/org.apache.ace.client.repository/test/org/apache/ace/client/repository/impl/ModelTest.java Fri Feb 26 16:55:17 2016 @@ -90,7 +90,7 @@ public class ModelTest { * * @throws InvalidSyntaxException */ - @Test(groups = { TestUtils.UNIT }) + @Test() public void testArtifactObjectAndRepository() throws InvalidSyntaxException { // Create a very simple artifact. ArtifactObject a = createBasicArtifactObject("myartifact", "1.0.0", "1"); @@ -188,7 +188,7 @@ public class ModelTest { /** * Tests that we can create artifacts which contain a certain size (estimate). See ACE-384. */ - @Test(groups = { TestUtils.UNIT }) + @Test() public void testArtifactObjectSize() { ArtifactObject artifactWithSize = createBasicArtifactObject("myartifact", "1.0.0", "10"); assert artifactWithSize.getSize() == 10 : "The artifact did not have a valid size?!"; @@ -203,7 +203,7 @@ public class ModelTest { /** * Tests the behavior when associating stuff, and removing associations. */ - @Test(groups = { TestUtils.UNIT }) + @Test() public void testAssociations() { initializeRepositoryAdmin(); // Create two, rather boring, artifacts. @@ -289,7 +289,7 @@ public class ModelTest { assert g3artifacts.containsAll(g3expectedArtifacts) && g3expectedArtifacts.containsAll(g3artifacts) : "g3 should be associated to exactly artifact 1."; } - @Test(groups = { TestUtils.UNIT }) + @Test() public void testAssociationsWithCardinality() { ArtifactObject a1 = createBasicArtifactObject("a1"); FeatureObject f1 = createBasicFeatureObject("f1"); @@ -322,7 +322,7 @@ public class ModelTest { assert (f3.getArtifacts().size() == 1) && f3.getArtifacts().contains(a1) : "g1 should be associated to only b1."; } - @Test(groups = { TestUtils.UNIT }) + @Test() public void testAssociationsWithLists() { ArtifactObject b1 = createBasicArtifactObject("b1"); ArtifactObject b2 = createBasicArtifactObject("b2"); @@ -366,7 +366,7 @@ public class ModelTest { assert !foundArtifacts.contains(b3) : "g1 should not be associated with b3"; } - @Test(groups = { TestUtils.UNIT }) + @Test() public void testDeploymentRepository() { DeploymentVersionObject version11 = createBasicDeploymentVersionObject("target1", "1", new String[] { "artifact1", "artifact2" }); DeploymentVersionObject version12 = createBasicDeploymentVersionObject("target1", "2", new String[] { "artifact3", "artifact4" }); @@ -392,7 +392,7 @@ public class ModelTest { assert m_deploymentVersionRepository.getMostRecentDeploymentVersion("target2") == version22 : "The most recent version for target2 should be version22"; } - @Test(groups = { TestUtils.UNIT }) + @Test() public void testDeploymentRepositoryFilter() { String gwId = "\\ ( * ) target1)"; @@ -403,7 +403,7 @@ public class ModelTest { assert for1.get(0) == version1 : "The only version for" + gwId + "should be version1"; } - @Test(groups = { TestUtils.UNIT }) + @Test() public void testDeploymentVersion() throws IOException { DeploymentVersionObject version = createBasicDeploymentVersionObject("target1", "1", new String[] { "artifact1", "artifact2" }); @@ -449,7 +449,7 @@ public class ModelTest { * targets and their associations. In essence, this test 'touches' all code which uses generic code which has been * tested by TestAssociations. */ - @Test(groups = { TestUtils.UNIT }) + @Test() public void testDistribution2TargetAssociations() { initializeRepositoryAdmin(); DistributionObject d1 = createBasicDistributionObject("distribution1"); @@ -465,7 +465,7 @@ public class ModelTest { /** * Tests the correctness of the equals() in RepositoryObject. */ - @Test(groups = { TestUtils.UNIT }) + @Test() public void testEquals() { List artifacts = new ArrayList<>(); artifacts.add(createBasicArtifactObject("artifact1")); @@ -488,7 +488,7 @@ public class ModelTest { * distributions and their associations. In essence, this test 'touches' all code which uses generic code which has * been tested by TestAssociations. */ - @Test(groups = { TestUtils.UNIT }) + @Test() public void TestFeature2DistributionAssociations() { initializeRepositoryAdmin(); FeatureObject f1 = createBasicFeatureObject("feature1"); @@ -505,7 +505,7 @@ public class ModelTest { assert d1.getTargets().size() == 0 : "Distribution 1 should not be associated with any targets; it is associated with " + d1.getTargets().size() + "."; } - @Test(groups = { TestUtils.UNIT }) + @Test() public void testGetAssociationsWith() { initializeRepositoryAdmin(); ArtifactObject a1 = createBasicArtifactObject("artifact1"); @@ -522,7 +522,7 @@ public class ModelTest { assert g1Associations.get(0) == a2f1 : "The feature's association should be the one we created."; } - @Test(groups = { TestUtils.UNIT }) + @Test() public void testLimitedNumberOfDeploymentVersions() throws IOException { RepositoryConfigurationImpl repoConfig = new RepositoryConfigurationImpl(); repoConfig.setDeploymentVersionLimit(3); // only keep the 3 most recent deployment versions... @@ -574,7 +574,7 @@ public class ModelTest { assertTrue(repo.contains(target2_v2)); } - @Test(groups = { TestUtils.UNIT }) + @Test() public void testModelFiltering() throws InvalidSyntaxException { initializeRepositoryAdmin(); // Create an empty artifact repository. @@ -611,7 +611,7 @@ public class ModelTest { assert m_featureRepository.get(createLocalFilter("(difficult=" + RepositoryUtil.escapeFilterValue(")diffi)c*ul\\t") + ")")).size() == 1 : "The 'difficult' string should be correctly escaped, and thus return exactly one match."; } - @Test(groups = { TestUtils.UNIT }) + @Test() public void testRepositorySerialization() throws IOException { createBasicArtifactObject("myartifact", "1"); createBasicArtifactObject("myartifact", "2"); @@ -627,7 +627,7 @@ public class ModelTest { assert m_artifactRepository.get().size() == 2 : "We expect to find 2 artifacts, but we find " + m_artifactRepository.get().size(); } - @Test(groups = { TestUtils.UNIT }) + @Test() public void testSerialization() throws IOException { ArtifactObject b1 = createBasicArtifactObject("artifact1"); ArtifactObject b2 = createBasicArtifactObject("artifact2"); @@ -658,7 +658,7 @@ public class ModelTest { assert b3.isAssociated(g2, FeatureObject.class) : "After serialization, b3 should still be associated with g2."; } - @Test(groups = { TestUtils.UNIT }) + @Test() public void testUnlimitedNumberOfDeploymentVersions() throws IOException { RepositoryConfiguration repoConfig = new RepositoryConfigurationImpl(); @@ -703,7 +703,7 @@ public class ModelTest { assertTrue(repo.contains(target2_v2)); } - @Test(groups = { TestUtils.UNIT }) + @Test() public void testConcurrentAccessToObjectRepository() throws Exception { initializeRepositoryAdmin(); // adds 10 features Modified: ace/trunk/org.apache.ace.client.repository/test/org/apache/ace/client/repository/impl/RepositoryAdminLoginContextImplTest.java URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.client.repository/test/org/apache/ace/client/repository/impl/RepositoryAdminLoginContextImplTest.java?rev=1732517&r1=1732516&r2=1732517&view=diff ============================================================================== --- ace/trunk/org.apache.ace.client.repository/test/org/apache/ace/client/repository/impl/RepositoryAdminLoginContextImplTest.java (original) +++ ace/trunk/org.apache.ace.client.repository/test/org/apache/ace/client/repository/impl/RepositoryAdminLoginContextImplTest.java Fri Feb 26 16:55:17 2016 @@ -25,7 +25,6 @@ import org.apache.ace.client.repository. import org.apache.ace.client.repository.repository.ArtifactRepository; import org.apache.ace.client.repository.repository.FeatureRepository; import org.apache.ace.test.constants.TestConstants; -import org.apache.ace.test.utils.TestUtils; import org.mockito.Mockito; import org.osgi.service.useradmin.User; import org.testng.annotations.BeforeMethod; @@ -38,21 +37,21 @@ import org.testng.annotations.Test; public class RepositoryAdminLoginContextImplTest { private static final String CUSTOMER = "apache"; - + private static final String NAME_SHOP = "shop"; private static final String NAME_DEPLOYMENT = "deployment"; - + private URL m_location; - + @BeforeMethod - public void setUp() throws Exception { + public void setUp() throws Exception { m_location = new URL("http://localhost:" + TestConstants.PORT); } - + /** * Test method for {@link RepositoryAdminLoginContextImpl#addDescriptor(RepositorySetDescriptor)}. */ - @Test( groups = { TestUtils.UNIT }, expectedExceptions = { IllegalArgumentException.class } ) + @Test(expectedExceptions = { IllegalArgumentException.class }) public void testAddDuplicateObjectRepositoryFail() throws Exception { RepositoryAdminLoginContextImpl context = new RepositoryAdminLoginContextImpl(Mockito.mock(User.class), "12345"); @@ -63,7 +62,7 @@ public class RepositoryAdminLoginContext /** * Test method for {@link RepositoryAdminLoginContextImpl#addDescriptor(RepositorySetDescriptor)}. */ - @Test( groups = { TestUtils.UNIT } ) + @Test() public void testAddDisjointObjectRepositoriesOk() throws Exception { RepositoryAdminLoginContextImpl context = new RepositoryAdminLoginContextImpl(Mockito.mock(User.class), "12345"); @@ -74,10 +73,10 @@ public class RepositoryAdminLoginContext /** * Test method for {@link RepositoryAdminLoginContextImpl#addDescriptor(RepositorySetDescriptor)}. */ - @Test( groups = { TestUtils.UNIT }, expectedExceptions = { IllegalArgumentException.class } ) + @Test(expectedExceptions = { IllegalArgumentException.class }) public void testDuplicateRepositoryNameFail() throws Exception { RepositoryAdminLoginContextImpl context = new RepositoryAdminLoginContextImpl(Mockito.mock(User.class), "12345"); - + context.addDescriptor(new RepositorySetDescriptor(m_location, CUSTOMER, NAME_SHOP, true, ArtifactRepository.class)); context.addDescriptor(new RepositorySetDescriptor(m_location, CUSTOMER, NAME_SHOP, true, FeatureRepository.class)); } Modified: ace/trunk/org.apache.ace.client.rest.itest/bnd.bnd URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.client.rest.itest/bnd.bnd?rev=1732517&r1=1732516&r2=1732517&view=diff ============================================================================== --- ace/trunk/org.apache.ace.client.rest.itest/bnd.bnd (original) +++ ace/trunk/org.apache.ace.client.rest.itest/bnd.bnd Fri Feb 26 16:55:17 2016 @@ -1,6 +1,7 @@ # Licensed to the Apache Software Foundation (ASF) under the terms of ASLv2 (http://www.apache.org/licenses/LICENSE-2.0). -buildpath: \ + ${^-buildpath},\ osgi.core;version=6.0.0,\ osgi.cmpn,\ junit.osgi,\ @@ -23,9 +24,8 @@ org.apache.ace.client.repository.helper.bundle;version=latest,\ org.apache.ace.client.repository.helper.configuration;version=latest,\ org.apache.ace.feedback.common;version=latest --runee: JavaSE-1.7 --runvm: -ea --runfw: org.apache.felix.framework;version='[5.2.0,6)' + +-runfw: org.apache.felix.framework;version='[5,6)' -runbundles: \ osgi.cmpn,\ org.apache.felix.dependencymanager,\ @@ -71,23 +71,20 @@ org.apache.ace.client.workspace;version=latest,\ org.apache.ace.feedback.common;version=latest,\ org.apache.ace.http.context;version=latest +-runvm: -ea +-runee: JavaSE-1.7 +-runsystempackages: sun.reflect +-runproperties: ${itestrunprops} +-baseline: --runproperties: \ - org.apache.felix.log.storeDebug=true,\ - org.apache.felix.eventadmin.Timeout=0,\ - org.apache.felix.log.maxSize=1000 +Test-Cases: ${classes;CONCRETE;EXTENDS;org.apache.ace.it.IntegrationTestBase} Private-Package: \ org.apache.ace.client.rest.itest,\ org.apache.ace.client.rest.util,\ com.google.gson* -Import-Package: \ - * + Bundle-Version: 1.0.0 Bundle-Name: Apache ACE Client REST itest Bundle-Description: Integration test bundle for Apache ACE Client REST Bundle-Category: itest - -Test-Cases: ${classes;CONCRETE;EXTENDS;org.apache.ace.it.IntegrationTestBase} - --baseline: Modified: ace/trunk/org.apache.ace.client.rest/test/org/apache/ace/client/rest/RESTClientTest.java URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.client.rest/test/org/apache/ace/client/rest/RESTClientTest.java?rev=1732517&r1=1732516&r2=1732517&view=diff ============================================================================== --- ace/trunk/org.apache.ace.client.rest/test/org/apache/ace/client/rest/RESTClientTest.java (original) +++ ace/trunk/org.apache.ace.client.rest/test/org/apache/ace/client/rest/RESTClientTest.java Fri Feb 26 16:55:17 2016 @@ -18,8 +18,6 @@ */ package org.apache.ace.client.rest; -import static org.apache.ace.test.utils.TestUtils.UNIT; - import javax.servlet.http.HttpServletRequest; import org.mockito.Mockito; @@ -27,7 +25,7 @@ import org.testng.Assert; import org.testng.annotations.Test; public class RESTClientTest { - @Test(groups = { UNIT }) + @Test public void testPathTransforms() { String path = "one/two/last%20path"; RESTClientServlet s = new RESTClientServlet(); Modified: ace/trunk/org.apache.ace.client.workspace/bnd.bnd URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.client.workspace/bnd.bnd?rev=1732517&r1=1732516&r2=1732517&view=diff ============================================================================== --- ace/trunk/org.apache.ace.client.workspace/bnd.bnd (original) +++ ace/trunk/org.apache.ace.client.workspace/bnd.bnd Fri Feb 26 16:55:17 2016 @@ -7,7 +7,6 @@ osgi.cmpn,\ org.apache.felix.dependencymanager,\ org.apache.ace.client.repository.api;version=latest,\ - org.apache.ace.test;version=latest,\ org.apache.felix.gogo.runtime,\ org.apache.ace.authentication.api;version=latest Modified: ace/trunk/org.apache.ace.client.workspace/test/org/apache/ace/client/workspace/impl/WorkspaceManagerImplTest.java URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.client.workspace/test/org/apache/ace/client/workspace/impl/WorkspaceManagerImplTest.java?rev=1732517&r1=1732516&r2=1732517&view=diff ============================================================================== --- ace/trunk/org.apache.ace.client.workspace/test/org/apache/ace/client/workspace/impl/WorkspaceManagerImplTest.java (original) +++ ace/trunk/org.apache.ace.client.workspace/test/org/apache/ace/client/workspace/impl/WorkspaceManagerImplTest.java Fri Feb 26 16:55:17 2016 @@ -18,8 +18,6 @@ */ package org.apache.ace.client.workspace.impl; -import static org.apache.ace.test.utils.TestUtils.UNIT; - import java.util.Properties; import org.apache.ace.client.workspace.impl.WorkspaceManagerImpl; @@ -28,7 +26,7 @@ import org.testng.annotations.Test; public class WorkspaceManagerImplTest { @SuppressWarnings("serial") - @Test(groups = { UNIT }) + @Test public void testPropertyGetter() { WorkspaceManagerImpl s = new WorkspaceManagerImpl(); Assert.assertEquals(s.getProperty(new Properties() {{ put("key", "value"); }}, "key", "notused"), "value"); Modified: ace/trunk/org.apache.ace.configurator/test/org/apache/ace/configurator/ConfiguratorTest.java URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.configurator/test/org/apache/ace/configurator/ConfiguratorTest.java?rev=1732517&r1=1732516&r2=1732517&view=diff ============================================================================== --- ace/trunk/org.apache.ace.configurator/test/org/apache/ace/configurator/ConfiguratorTest.java (original) +++ ace/trunk/org.apache.ace.configurator/test/org/apache/ace/configurator/ConfiguratorTest.java Fri Feb 26 16:55:17 2016 @@ -18,7 +18,6 @@ */ package org.apache.ace.configurator; -import static org.apache.ace.test.utils.TestUtils.UNIT; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNotNull; import static org.testng.Assert.assertTrue; @@ -49,7 +48,7 @@ public class ConfiguratorTest { private volatile CountDownLatch m_deleteLatch; private volatile CountDownLatch m_updateLatch; - @Test(groups = { UNIT }) + @Test() public void testAddConfiguration() throws Exception { String pid = "test-add"; @@ -61,7 +60,7 @@ public class ConfiguratorTest { assertEquals(createProperties(), configuration, "Configuration content is unexpected"); } - @Test(groups = { UNIT }) + @Test() public void testAddFactoryConfiguration() throws Exception { String pid = "test-add"; String factoryPID = "testFactory"; @@ -76,7 +75,7 @@ public class ConfiguratorTest { } // update a configuration, only adding a key (this is allowed in all cases) - @Test(groups = { UNIT }) + @Test() public void testChangeConfigurationUsingNewKey() throws Exception { String pid = "test-change"; @@ -97,7 +96,7 @@ public class ConfiguratorTest { } // update a configuration, changing an already existing key, not using reconfiguration - @Test(groups = { UNIT }) + @Test() public void testChangeConfigurationUsingSameKeyNoReconfigure() throws Exception { String pid = "test-change"; @@ -120,7 +119,7 @@ public class ConfiguratorTest { } // update a configuration, changing an already existing key, using reconfiguration - @Test(groups = { UNIT }) + @Test() public void testChangeConfigurationUsingSameKeyWithReconfigure() throws Exception { String pid = "test-change"; @@ -141,7 +140,7 @@ public class ConfiguratorTest { assertEquals(configurationValues, configuration); } - @Test(groups = { UNIT }) + @Test() public void testPropertySubstitution() throws Exception { String pid = "test-subst"; @@ -164,7 +163,7 @@ public class ConfiguratorTest { assertEquals(config.get("key3"), "${qux} ${quu.${bar}} ${baz.${bar}}", "Substitution failed!"); } - @Test(groups = { UNIT }) + @Test() public void testPropertySubstitutionFromContext() throws Exception { String pid = "test-subst"; @@ -178,7 +177,7 @@ public class ConfiguratorTest { } // remove a configuration - @Test(groups = { UNIT }) + @Test() public void testRemoveConfiguration() throws Exception { String pid = "test-remove"; @@ -198,7 +197,7 @@ public class ConfiguratorTest { } // remove a configuration - @Test(groups = { UNIT }) + @Test() public void testRemoveFactoryConfiguration() throws Exception { String pid = "test-remove"; String factoryPID = "testFactory"; Modified: ace/trunk/org.apache.ace.connectionfactory/bnd.bnd URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.connectionfactory/bnd.bnd?rev=1732517&r1=1732516&r2=1732517&view=diff ============================================================================== --- ace/trunk/org.apache.ace.connectionfactory/bnd.bnd (original) +++ ace/trunk/org.apache.ace.connectionfactory/bnd.bnd Fri Feb 26 16:55:17 2016 @@ -5,7 +5,6 @@ ${testng},\ osgi.core;version=6.0.0,\ osgi.cmpn,\ - org.apache.ace.test;version=latest,\ org.apache.commons.codec;version=1.4 Private-Package: org.apache.ace.connectionfactory.impl,\ Modified: ace/trunk/org.apache.ace.connectionfactory/test/org/apache/ace/connectionfactory/impl/ConnectionFactoryImplTest.java URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.connectionfactory/test/org/apache/ace/connectionfactory/impl/ConnectionFactoryImplTest.java?rev=1732517&r1=1732516&r2=1732517&view=diff ============================================================================== --- ace/trunk/org.apache.ace.connectionfactory/test/org/apache/ace/connectionfactory/impl/ConnectionFactoryImplTest.java (original) +++ ace/trunk/org.apache.ace.connectionfactory/test/org/apache/ace/connectionfactory/impl/ConnectionFactoryImplTest.java Fri Feb 26 16:55:17 2016 @@ -19,15 +19,12 @@ package org.apache.ace.connectionfactory.impl; -import static org.apache.ace.test.utils.TestUtils.UNIT; - import java.net.MalformedURLException; import java.net.URL; import java.net.URLConnection; import java.util.Dictionary; import java.util.Hashtable; -import org.apache.ace.test.constants.TestConstants; import org.testng.annotations.Test; /** @@ -39,7 +36,7 @@ public class ConnectionFactoryImplTest { static { try { - TEST_URL = new URL("http://localhost:" + TestConstants.PORT + "/"); + TEST_URL = new URL("http://localhost:8080/"); } catch (MalformedURLException e) { throw new RuntimeException(e); @@ -49,7 +46,7 @@ public class ConnectionFactoryImplTest { /** * Test method for {@link org.apache.ace.connectionfactory.impl.ConnectionFactoryImpl#createConnection(java.net.URL)}. */ - @Test(groups = { UNIT }, expectedExceptions = IllegalArgumentException.class) + @Test(expectedExceptions = IllegalArgumentException.class) public void testCreateConnectionNullUrlFail() throws Exception { new ConnectionFactoryImpl().createConnection(null); } @@ -57,7 +54,7 @@ public class ConnectionFactoryImplTest { /** * Test method for {@link org.apache.ace.connectionfactory.impl.ConnectionFactoryImpl#createConnection(java.net.URL, org.osgi.service.useradmin.User)}. */ - @Test(groups = { UNIT }, expectedExceptions = IllegalArgumentException.class) + @Test(expectedExceptions = IllegalArgumentException.class) public void testCreateConnectionNullUserFail() throws Exception { new ConnectionFactoryImpl().createConnection(new URL("file:///tmp/foo"), null); } @@ -65,7 +62,7 @@ public class ConnectionFactoryImplTest { /** * Test method for {@link org.apache.ace.connectionfactory.impl.ConnectionFactoryImpl#createConnection(java.net.URL, org.osgi.service.useradmin.User)}. */ - @Test(groups = { UNIT }) + @Test() public void testCreateConnectionOk() throws Exception { URLConnection conn = new ConnectionFactoryImpl().createConnection(new URL("file:///tmp/foo")); assert conn != null : "Expected valid connection to be created!"; @@ -74,7 +71,7 @@ public class ConnectionFactoryImplTest { /** * Test method for {@link org.apache.ace.connectionfactory.impl.ConnectionFactoryImpl#deleted(java.lang.String)}. */ - @Test(groups = { UNIT }) + @Test() public void testDeleted() throws Exception { ConnectionFactoryImpl connFactory = new ConnectionFactoryImpl(); @@ -94,7 +91,7 @@ public class ConnectionFactoryImplTest { /** * Test method for {@link org.apache.ace.connectionfactory.impl.ConnectionFactoryImpl#getBasicAuthCredentials(UrlCredentials)}. */ - @Test(groups = { UNIT }) + @Test() public void testGetBasicAuthCredentialsOk() throws Exception { ConnectionFactoryImpl connFactory = new ConnectionFactoryImpl(); @@ -114,7 +111,7 @@ public class ConnectionFactoryImplTest { /** * Test method for {@link org.apache.ace.connectionfactory.impl.ConnectionFactoryImpl#updated(java.lang.String, java.util.Dictionary)}. */ - @Test(groups = { UNIT }) + @Test() public void testUpdatedInsertsCredentialsOk() throws Exception { ConnectionFactoryImpl connFactory = new ConnectionFactoryImpl(); @@ -132,7 +129,7 @@ public class ConnectionFactoryImplTest { /** * Test method for {@link org.apache.ace.connectionfactory.impl.ConnectionFactoryImpl#updated(java.lang.String, java.util.Dictionary)}. */ - @Test(groups = { UNIT }) + @Test() public void testUpdatedUpdatesCredentialsOk() throws Exception { ConnectionFactoryImpl connFactory = new ConnectionFactoryImpl(); Modified: ace/trunk/org.apache.ace.connectionfactory/test/org/apache/ace/connectionfactory/impl/UrlCredentialsFactoryTest.java URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.connectionfactory/test/org/apache/ace/connectionfactory/impl/UrlCredentialsFactoryTest.java?rev=1732517&r1=1732516&r2=1732517&view=diff ============================================================================== --- ace/trunk/org.apache.ace.connectionfactory/test/org/apache/ace/connectionfactory/impl/UrlCredentialsFactoryTest.java (original) +++ ace/trunk/org.apache.ace.connectionfactory/test/org/apache/ace/connectionfactory/impl/UrlCredentialsFactoryTest.java Fri Feb 26 16:55:17 2016 @@ -19,8 +19,6 @@ package org.apache.ace.connectionfactory.impl; -import static org.apache.ace.test.utils.TestUtils.UNIT; - import java.util.Dictionary; import java.util.Hashtable; @@ -37,7 +35,7 @@ public class UrlCredentialsFactoryTest { /** * Test method for {@link org.apache.ace.connectionfactory.impl.UrlCredentialsFactory#getCredentials(java.util.Dictionary)}. */ - @Test(groups = { UNIT }, expectedExceptions = MissingValueException.class) + @Test(expectedExceptions = MissingValueException.class) public void testGetCredentialsWithDictionaryBasicTypeMissingPasswordFail() { Dictionary props = new Hashtable<>(); @@ -51,7 +49,7 @@ public class UrlCredentialsFactoryTest { /** * Test method for {@link org.apache.ace.connectionfactory.impl.UrlCredentialsFactory#getCredentials(java.util.Dictionary)}. */ - @Test(groups = { UNIT }, expectedExceptions = MissingValueException.class) + @Test(expectedExceptions = MissingValueException.class) public void testGetCredentialsWithDictionaryClientCertTypeMissingKeystorePasswordFail() { Dictionary props = new Hashtable<>(); @@ -67,7 +65,7 @@ public class UrlCredentialsFactoryTest { /** * Test method for {@link org.apache.ace.connectionfactory.impl.UrlCredentialsFactory#getCredentials(java.util.Dictionary)}. */ - @Test(groups = { UNIT }, expectedExceptions = MissingValueException.class) + @Test(expectedExceptions = MissingValueException.class) public void testGetCredentialsWithDictionaryClientCertTypeMissingKeystoreFileFail() { Dictionary props = new Hashtable<>(); @@ -83,7 +81,7 @@ public class UrlCredentialsFactoryTest { /** * Test method for {@link org.apache.ace.connectionfactory.impl.UrlCredentialsFactory#getCredentials(java.util.Dictionary)}. */ - @Test(groups = { UNIT }) + @Test() public void testGetCredentialsWithDictionaryClientCertTypeOk() { Dictionary props = new Hashtable<>(); @@ -105,7 +103,7 @@ public class UrlCredentialsFactoryTest { /** * Test method for {@link org.apache.ace.connectionfactory.impl.UrlCredentialsFactory#getCredentials(java.util.Dictionary)}. */ - @Test(groups = { UNIT }, expectedExceptions = MissingValueException.class) + @Test(expectedExceptions = MissingValueException.class) public void testGetCredentialsWithDictionaryClientCertTypeMissingTruststorePasswordFail() { Dictionary props = new Hashtable<>(); @@ -121,7 +119,7 @@ public class UrlCredentialsFactoryTest { /** * Test method for {@link org.apache.ace.connectionfactory.impl.UrlCredentialsFactory#getCredentials(java.util.Dictionary)}. */ - @Test(groups = { UNIT }, expectedExceptions = MissingValueException.class) + @Test(expectedExceptions = MissingValueException.class) public void testGetCredentialsWithDictionaryClientCertTypeMissingTruststoreFileFail() { Dictionary props = new Hashtable<>(); @@ -137,7 +135,7 @@ public class UrlCredentialsFactoryTest { /** * Test method for {@link org.apache.ace.connectionfactory.impl.UrlCredentialsFactory#getCredentials(java.util.Dictionary)}. */ - @Test(groups = { UNIT }, expectedExceptions = MissingValueException.class) + @Test(expectedExceptions = MissingValueException.class) public void testGetCredentialsWithDictionaryBasicTypeMissingUserNameFail() { Dictionary props = new Hashtable<>(); @@ -151,7 +149,7 @@ public class UrlCredentialsFactoryTest { /** * Test method for {@link org.apache.ace.connectionfactory.impl.UrlCredentialsFactory#getCredentials(java.util.Dictionary)}. */ - @Test(groups = { UNIT }) + @Test() public void testGetCredentialsWithDictionaryBasicTypeOk() { Dictionary props = new Hashtable<>(); @@ -166,7 +164,7 @@ public class UrlCredentialsFactoryTest { /** * Test method for {@link org.apache.ace.connectionfactory.impl.UrlCredentialsFactory#getCredentials(java.util.Dictionary)}. */ - @Test(groups = { UNIT }, expectedExceptions = IllegalArgumentException.class) + @Test(expectedExceptions = IllegalArgumentException.class) public void testGetCredentialsWithDictionaryInvalidAuthTypeFail() { Dictionary props = new Hashtable<>(); @@ -179,7 +177,7 @@ public class UrlCredentialsFactoryTest { /** * Test method for {@link org.apache.ace.connectionfactory.impl.UrlCredentialsFactory#getCredentials(java.util.Dictionary)}. */ - @Test(groups = { UNIT }, expectedExceptions = MissingValueException.class) + @Test(expectedExceptions = MissingValueException.class) public void testGetCredentialsWithDictionaryMissingBaseUrlFail() { Dictionary props = new Hashtable<>(); @@ -191,7 +189,7 @@ public class UrlCredentialsFactoryTest { /** * Test method for {@link org.apache.ace.connectionfactory.impl.UrlCredentialsFactory#getCredentials(java.util.Dictionary)}. */ - @Test(groups = { UNIT }, expectedExceptions = IllegalArgumentException.class) + @Test(expectedExceptions = IllegalArgumentException.class) public void testGetCredentialsWithNullDictionaryFail() { UrlCredentialsFactory.getCredentials(null); } @@ -199,7 +197,7 @@ public class UrlCredentialsFactoryTest { /** * Test method for {@link org.apache.ace.connectionfactory.impl.UrlCredentialsFactory#getCredentials(java.util.Dictionary, java.lang.String)}. */ - @Test(groups = { UNIT }, expectedExceptions = IllegalArgumentException.class) + @Test(expectedExceptions = IllegalArgumentException.class) public void testGetCredentialsWithNullPrefixFail() { UrlCredentialsFactory.getCredentials(new Hashtable(), null); } @@ -207,7 +205,7 @@ public class UrlCredentialsFactoryTest { /** * Test method for {@link org.apache.ace.connectionfactory.impl.UrlCredentialsFactory#getCredentials(java.util.Dictionary)}. */ - @Test(groups = { UNIT }) + @Test() public void testGetCredentialsWithValidDictionaryOk() { Dictionary props = new Hashtable<>(); Modified: ace/trunk/org.apache.ace.connectionfactory/test/org/apache/ace/connectionfactory/impl/UrlCredentialsTest.java URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.connectionfactory/test/org/apache/ace/connectionfactory/impl/UrlCredentialsTest.java?rev=1732517&r1=1732516&r2=1732517&view=diff ============================================================================== --- ace/trunk/org.apache.ace.connectionfactory/test/org/apache/ace/connectionfactory/impl/UrlCredentialsTest.java (original) +++ ace/trunk/org.apache.ace.connectionfactory/test/org/apache/ace/connectionfactory/impl/UrlCredentialsTest.java Fri Feb 26 16:55:17 2016 @@ -18,8 +18,6 @@ */ package org.apache.ace.connectionfactory.impl; -import static org.apache.ace.test.utils.TestUtils.UNIT; - import java.net.URL; import org.apache.ace.connectionfactory.impl.UrlCredentials.AuthType; @@ -33,7 +31,7 @@ public class UrlCredentialsTest { /** * Test method for {@link org.apache.ace.connectionfactory.impl.UrlCredentials#UrlCredentials(java.net.URL)}. */ - @Test(groups = { UNIT }, expectedExceptions = IllegalArgumentException.class) + @Test(expectedExceptions = IllegalArgumentException.class) public void testUrlCredentialsNullURLFail() throws Exception { new UrlCredentials(null); } @@ -41,7 +39,7 @@ public class UrlCredentialsTest { /** * Test method for {@link org.apache.ace.connectionfactory.impl.UrlCredentials#UrlCredentials(java.net.URL)}. */ - @Test(groups = { UNIT }) + @Test public void testUrlCredentialsURLOk() throws Exception { new UrlCredentials(new URL("http://localhost:8080/")); } @@ -49,7 +47,7 @@ public class UrlCredentialsTest { /** * Test method for {@link org.apache.ace.connectionfactory.impl.UrlCredentials#UrlCredentials(org.apache.ace.connectionfactory.impl.UrlCredentials.AuthType, java.net.URL, java.lang.Object[])}. */ - @Test(groups = { UNIT }, expectedExceptions = IllegalArgumentException.class) + @Test(expectedExceptions = IllegalArgumentException.class) public void testUrlCredentialsNullTypeFail() throws Exception { new UrlCredentials(null, new URL("http://localhost:8080/")); } @@ -57,7 +55,7 @@ public class UrlCredentialsTest { /** * Test method for {@link org.apache.ace.connectionfactory.impl.UrlCredentials#UrlCredentials(org.apache.ace.connectionfactory.impl.UrlCredentials.AuthType, java.net.URL, java.lang.Object[])}. */ - @Test(groups = { UNIT }) + @Test public void testUrlCredentialsTypeAndURLOk() throws Exception { new UrlCredentials(AuthType.NONE, new URL("http://localhost:8080/")); } @@ -65,7 +63,7 @@ public class UrlCredentialsTest { /** * Test method for {@link org.apache.ace.connectionfactory.impl.UrlCredentials#matches(java.net.URL)}. */ - @Test(groups = { UNIT }) + @Test public void testMatchesNullURLOk() throws Exception { UrlCredentials creds = new UrlCredentials(AuthType.NONE, new URL("http://localhost:8080/")); assert creds.matches(null) == false : "Null URL should never match any credentials!"; @@ -74,7 +72,7 @@ public class UrlCredentialsTest { /** * Test method for {@link org.apache.ace.connectionfactory.impl.UrlCredentials#matches(java.net.URL)}. */ - @Test(groups = { UNIT }) + @Test public void testMatchesValidURLOk() throws Exception { UrlCredentials creds = new UrlCredentials(AuthType.NONE, new URL("http://localhost:8080/")); assert creds.matches(new URL("http://localhost:8080/obr")) : "Base URL should match given URL!"; @@ -85,7 +83,7 @@ public class UrlCredentialsTest { /** * Test method for {@link org.apache.ace.connectionfactory.impl.UrlCredentials#getCredentials()}. */ - @Test(groups = { UNIT }) + @Test public void testGetCredentialsOk() throws Exception { UrlCredentials creds = new UrlCredentials(AuthType.NONE, new URL("http://localhost:8080/")); assertArrayEquals(new Object[0], creds.getCredentials()); Modified: ace/trunk/org.apache.ace.deployment.itest/bnd.bnd URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.deployment.itest/bnd.bnd?rev=1732517&r1=1732516&r2=1732517&view=diff ============================================================================== --- ace/trunk/org.apache.ace.deployment.itest/bnd.bnd (original) +++ ace/trunk/org.apache.ace.deployment.itest/bnd.bnd Fri Feb 26 16:55:17 2016 @@ -1,6 +1,5 @@ # 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},\ ${testng},\ @@ -22,8 +21,8 @@ Test-Cases: ${classes;CONCRETE;EXTENDS;o org.apache.ace.deployment.util.test;version=latest,\ org.apache.ace.feedback.common;version=latest,\ org.apache.ace.deployment.provider.base;version=latest --runfw: org.apache.felix.framework;version='[5.2.0,6)' --runvm: -ea + +-runfw: org.apache.felix.framework;version='[5,6)' -runbundles: osgi.cmpn,\ org.apache.felix.dependencymanager,\ org.apache.felix.configadmin,\ @@ -58,7 +57,14 @@ Test-Cases: ${classes;CONCRETE;EXTENDS;o org.apache.ace.test;version=latest,\ org.apache.ace.range.api;version=latest,\ 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.deployment,\ org.apache.ace.deployment.util.test,\ @@ -70,5 +76,3 @@ Bundle-Version: 1.0.0 Bundle-Name: Apache ACE Deployment itest Bundle-Description: Integration test bundle for Apache ACE Deployment Bundle-Category: itest - --baseline: Modified: ace/trunk/org.apache.ace.deployment.itest/test/org/apache/ace/it/deployment/provider/filebased/FileBasedProviderTest.java URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.deployment.itest/test/org/apache/ace/it/deployment/provider/filebased/FileBasedProviderTest.java?rev=1732517&r1=1732516&r2=1732517&view=diff ============================================================================== --- ace/trunk/org.apache.ace.deployment.itest/test/org/apache/ace/it/deployment/provider/filebased/FileBasedProviderTest.java (original) +++ ace/trunk/org.apache.ace.deployment.itest/test/org/apache/ace/it/deployment/provider/filebased/FileBasedProviderTest.java Fri Feb 26 16:55:17 2016 @@ -18,8 +18,6 @@ */ package org.apache.ace.it.deployment.provider.filebased; -import static org.apache.ace.test.utils.TestUtils.UNIT; - import java.io.File; import java.util.Collection; import java.util.Hashtable; @@ -37,9 +35,8 @@ import org.testng.annotations.BeforeTest import org.testng.annotations.Test; /** - * This test class tests the FileBasedProvider class. - * This class implements 2 backend interfaces, - * and both are tested here. + * This test class tests the FileBasedProvider class. This class implements 2 backend interfaces, and both are tested + * here. */ public class FileBasedProviderTest { @@ -76,7 +73,11 @@ public class FileBasedProviderTest { m_backend = new FileBasedProvider(); TestUtils.configureObject(m_backend, LogService.class); - m_backend.updated(new Hashtable() {{put("BaseDirectoryName", m_tempDirectory.getAbsolutePath());}}); + m_backend.updated(new Hashtable() { + { + put("BaseDirectoryName", m_tempDirectory.getAbsolutePath()); + } + }); } /** @@ -126,7 +127,7 @@ public class FileBasedProviderTest { /** * See if the getVersions() methods normal output works */ - @Test(groups = { UNIT }) + @Test() public void testGetVersion() { List versions = m_backend.getVersions(TARGET); assert versions.size() == 1 : "Expected one version to be found, but found " + versions.size(); @@ -136,7 +137,7 @@ public class FileBasedProviderTest { /** * Test the getVersions method with an illegal version (not in org.osgi.framework.Version format) */ - @Test(groups = { UNIT }) + @Test() public void testIllegalVersion() { // an illegal version should be silently ignored List versions = m_backend.getVersions(INVALIDVERSIONTARGET); @@ -146,7 +147,7 @@ public class FileBasedProviderTest { /** * Test with multiple versions. It expects all versions in an ascending order. */ - @Test(groups = { UNIT }) + @Test() public void testMultipleVersions() { List versions = m_backend.getVersions(MULTIPLEVERSIONTARGET); assert versions.size() == 4 : "Expected three version to be found, but found " + versions.size(); @@ -160,7 +161,7 @@ public class FileBasedProviderTest { /** * Test the getBundleData for a single version, returning a single bundle */ - @Test(groups = { UNIT }) + @Test() public void testSingleBundleSingleVersionBundleData() { Collection bundleData = m_backend.getBundleData(TARGET, VERSION1); assert bundleData.size() == 1 : "Expected one bundle to be found, but found " + bundleData.size(); @@ -170,7 +171,7 @@ public class FileBasedProviderTest { /** * Test the getBundleData for a single version, returning a multiple bundles */ - @Test(groups = { UNIT }) + @Test() public void testMultipleBundleSingleVersionBundleData() { Collection bundleData = m_backend.getBundleData(MULTIPLEVERSIONTARGET, VERSION1); assert bundleData.size() == 2 : "Expected two bundle to be found, but found " + bundleData.size(); @@ -181,12 +182,13 @@ public class FileBasedProviderTest { /** * Test the getBundleData with an illegal version (i.e. a version that doesn't exist) */ - @Test(groups = { UNIT }) + @Test() public void testInvalidVersionBundleData() { try { m_backend.getBundleData(INVALIDVERSIONTARGET, INVALIDVERSION); assert false : "Expected an error because version " + INVALIDVERSION + " doesn't exist for target" + INVALIDVERSIONTARGET; - } catch (IllegalArgumentException iae) { + } + catch (IllegalArgumentException iae) { // expected, because the version doesn't exist } } @@ -194,12 +196,12 @@ public class FileBasedProviderTest { /** * Test the getBundleData for a two versions, returning a single bundle that hasn't changed */ - @Test(groups = { UNIT }) + @Test() public void testSingleUnchangedBundleMultipleVersions() { Collection bundleData = m_backend.getBundleData(TARGET, VERSION1, VERSION1); assert bundleData.size() == 1 : "Expect one bundle, got " + bundleData.size(); Iterator it = bundleData.iterator(); - while(it.hasNext()) { + while (it.hasNext()) { ArtifactData data = it.next(); assert data.getSize() > 200 : "Bundle has no sensible size?!"; assert !data.hasChanged() : "The data should not have been changed."; @@ -209,12 +211,12 @@ public class FileBasedProviderTest { /** * Test the getBundleData for a two versions, returning multiple bundles that haven't changed */ - @Test(groups = { UNIT }) + @Test() public void testMultipleBundlesMultipleVersions() { Collection bundleData = m_backend.getBundleData(MULTIPLEVERSIONTARGET, VERSION1, VERSION1); assert bundleData.size() == 2 : "Expected two bundle to be found, but found " + bundleData.size(); Iterator it = bundleData.iterator(); - while(it.hasNext()) { + while (it.hasNext()) { ArtifactData data = it.next(); assert !data.hasChanged() : "The data should not have been changed."; } @@ -223,7 +225,7 @@ public class FileBasedProviderTest { /** * Test the getBundleData for a two versions, where in the second version a bundle is removed */ - @Test(groups = { UNIT }) + @Test() public void testRemovedBundleMultipleVersions() { Collection bundleData = m_backend.getBundleData(MULTIPLEVERSIONTARGET, VERSION1, VERSION3); assert bundleData.size() == 0 : "Expected zero bundle to be found, but found " + bundleData.size(); @@ -232,12 +234,12 @@ public class FileBasedProviderTest { /** * Test the getBundleData for a two versions, where in the second version a bundle is added */ - @Test(groups = { UNIT }) + @Test() public void testAddedBundleMultipleVersions() { Collection bundleData = m_backend.getBundleData(MULTIPLEVERSIONTARGET, VERSION3, VERSION1); assert bundleData.size() == 2 : "Expected two bundle to be found, but found " + bundleData.size(); Iterator it = bundleData.iterator(); - while(it.hasNext()) { + while (it.hasNext()) { ArtifactData data = it.next(); assert data.hasChanged() : "The data should have been changed."; } @@ -246,18 +248,20 @@ public class FileBasedProviderTest { /** * Test the getBundleData for a two versions, where in the second version one bundle has changed and another hasn't */ - @Test(groups = { UNIT }) + @Test() public void testSingleChangedBundleMultipleVersions() { Collection bundleData = m_backend.getBundleData(MULTIPLEVERSIONTARGET, VERSION1, VERSION4); assert bundleData.size() == 2 : "Expected one bundle to be found, but found " + bundleData.size(); Iterator it = bundleData.iterator(); - while(it.hasNext()) { + while (it.hasNext()) { ArtifactData data = it.next(); if (data.equals(BUNDLE3_2)) { assert !data.hasChanged() : "The data should not have been changed."; - } else if (data.equals(BUNDLE4_2)) { + } + else if (data.equals(BUNDLE4_2)) { assert data.hasChanged() : "The data should have been changed."; - } else { + } + else { assert false : "Unknown bundle found"; } } @@ -266,28 +270,28 @@ public class FileBasedProviderTest { /** * Test the getBundleData for a two versions, where two bundles have changed */ - @Test(groups = { UNIT }) + @Test() public void testMultipleChangedBundlesMultipleVersions() { Collection bundleData = m_backend.getBundleData(MULTIPLEVERSIONTARGET, VERSION1, VERSION2); assert bundleData.size() == 2 : "Expected one bundle to be found, but found " + bundleData.size(); Iterator it = bundleData.iterator(); - while(it.hasNext()) { + while (it.hasNext()) { ArtifactData data = it.next(); if (data.equals(BUNDLE4_1)) { assert data.hasChanged() : "The data should have been changed."; - } else if (data.equals(BUNDLE5)) { + } + else if (data.equals(BUNDLE5)) { assert data.hasChanged() : "The data should have been changed."; - } else { + } + else { assert false : "Unknown bundle found"; } } } - @AfterTest(alwaysRun = true) public void tearDown() throws Exception { FileUtils.removeDirectoryWithContent(m_tempDirectory); } - } Modified: ace/trunk/org.apache.ace.deployment/test/org/apache/ace/deployment/provider/repositorybased/BaseRepositoryHandlerTest.java URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.deployment/test/org/apache/ace/deployment/provider/repositorybased/BaseRepositoryHandlerTest.java?rev=1732517&r1=1732516&r2=1732517&view=diff ============================================================================== --- ace/trunk/org.apache.ace.deployment/test/org/apache/ace/deployment/provider/repositorybased/BaseRepositoryHandlerTest.java (original) +++ ace/trunk/org.apache.ace.deployment/test/org/apache/ace/deployment/provider/repositorybased/BaseRepositoryHandlerTest.java Fri Feb 26 16:55:17 2016 @@ -18,8 +18,6 @@ */ package org.apache.ace.deployment.provider.repositorybased; -import static org.apache.ace.test.utils.TestUtils.UNIT; - import java.io.ByteArrayInputStream; import java.io.InputStream; import java.io.StringWriter; @@ -84,7 +82,6 @@ public class BaseRepositoryHandlerTest { public static final String MIMETYPE = "application/vnd.osgi.bundle"; - private InputStream m_inputStream; private SAXParser m_parser; @@ -100,9 +97,10 @@ public class BaseRepositoryHandlerTest { /** * Tests that a deployment package with a single version can be parsed & found. * - * @throws Exception not part of this test case. + * @throws Exception + * not part of this test case. */ - @Test(groups = { UNIT }) + @Test() public void testGatherSingleVersionOk() throws Exception { DeploymentPackageVersionCollector handler = new DeploymentPackageVersionCollector(TARGET); @@ -117,9 +115,10 @@ public class BaseRepositoryHandlerTest { /** * Tests that the single artifact of a deployment package with a single version can be parsed & found. * - * @throws Exception not part of this test case. + * @throws Exception + * not part of this test case. */ - @Test(groups = { UNIT }) + @Test() public void testGatherSingleArtifactOk() throws Exception { DeploymentArtifactCollector handler = new DeploymentArtifactCollector(TARGET, VERSION1); @@ -139,9 +138,10 @@ public class BaseRepositoryHandlerTest { /** * Tests that a deployment package with multiple versions can be parsed & found. * - * @throws Exception not part of this test case. + * @throws Exception + * not part of this test case. */ - @Test(groups = { UNIT }) + @Test() public void testGatherMultipleVersionOk() throws Exception { DeploymentPackageVersionCollector handler = new DeploymentPackageVersionCollector(MULTIPLEVERSIONTARGET); @@ -159,9 +159,10 @@ public class BaseRepositoryHandlerTest { /** * Tests that multiple artifacts of a deployment package with a single version can be parsed & found. * - * @throws Exception not part of this test case. + * @throws Exception + * not part of this test case. */ - @Test(groups = { UNIT }) + @Test() public void testGatherMultipleArtifactsOfMultipleVersionTargetOk() throws Exception { DeploymentArtifactCollector handler = new DeploymentArtifactCollector(MULTIPLEVERSIONTARGET, VERSION2); @@ -187,9 +188,10 @@ public class BaseRepositoryHandlerTest { /** * Tests that single artifact of a deployment package with multiple versions can be parsed & found. * - * @throws Exception not part of this test case. + * @throws Exception + * not part of this test case. */ - @Test(groups = { UNIT }) + @Test() public void testGatherSingleArtifactsOfMultipleVersionTargetOk() throws Exception { DeploymentArtifactCollector handler = new DeploymentArtifactCollector(MULTIPLEVERSIONTARGET, VERSION3); @@ -209,9 +211,10 @@ public class BaseRepositoryHandlerTest { /** * Tests that non existing artifacts of a deployment package with multiple versions can be parsed. * - * @throws Exception not part of this test case. + * @throws Exception + * not part of this test case. */ - @Test(groups = { UNIT }) + @Test() public void testGatherNonExistingArtifactsOfMultipleVersionTargetOk() throws Exception { DeploymentArtifactCollector handler = new DeploymentArtifactCollector(EMPTYVERSIONTARGET, VERSION2); @@ -225,17 +228,18 @@ public class BaseRepositoryHandlerTest { /** * Tests that requesting the artifacts of a deployment package with an invalid version can be done. * - * @throws Exception not part of this test case. + * @throws Exception + * not part of this test case. */ - @Test(groups = { UNIT }) + @Test() public void testGatherArtifactsOfMultipleVersionTargetWithInvalidVersionOk() throws Exception { DeploymentArtifactCollector handler = new DeploymentArtifactCollector(EMPTYVERSIONTARGET, VERSION3); - + m_parser.parse(m_inputStream, handler); - + try { handler.getArtifacts(); - + assert false : "Expected no deployment artifacts to be found!"; } catch (IllegalArgumentException e) { @@ -318,12 +322,16 @@ public class BaseRepositoryHandlerTest { /** * Helper method to create the description of a deploymentpacakge with given data. * - * @param doc The document to add the version to. - * @param targetText The targetId in the deploymentversion. - * @param versionText The version in the deploymentversion. - * @param data An array of data for the deployment artifact. [0] is the url, and each following item is - * first a directive key, and a directive value. For example,
- * new String[] { "http://mybundle", "somedirective", "somevalue" } + * @param doc + * The document to add the version to. + * @param targetText + * The targetId in the deploymentversion. + * @param versionText + * The version in the deploymentversion. + * @param data + * An array of data for the deployment artifact. [0] is the url, and each following item is first a + * directive key, and a directive value. For example,
+ * new String[] { "http://mybundle", "somedirective", "somevalue" } * @return */ private Node generateDeploymentVersion(Document doc, String targetText, String versionText, String[]... data) { Modified: ace/trunk/org.apache.ace.deployment/test/org/apache/ace/deployment/provider/repositorybased/CacheTest.java URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.deployment/test/org/apache/ace/deployment/provider/repositorybased/CacheTest.java?rev=1732517&r1=1732516&r2=1732517&view=diff ============================================================================== --- ace/trunk/org.apache.ace.deployment/test/org/apache/ace/deployment/provider/repositorybased/CacheTest.java (original) +++ ace/trunk/org.apache.ace.deployment/test/org/apache/ace/deployment/provider/repositorybased/CacheTest.java Fri Feb 26 16:55:17 2016 @@ -18,13 +18,11 @@ */ package org.apache.ace.deployment.provider.repositorybased; -import static org.apache.ace.test.utils.TestUtils.UNIT; - import org.testng.Assert; import org.testng.annotations.Test; public class CacheTest { - @Test(groups = { UNIT }) + @Test() public void testFillCacheToLimitAndCheckIfEverythingFits() { LRUMap map = new LRUMap<>(); for (int i = 0; i < 1024; i++) { @@ -37,7 +35,7 @@ public class CacheTest { } } - @Test(groups = { UNIT }) + @Test() public void testOverflowCacheAndValidateOldestElementDisappears() { LRUMap map = new LRUMap<>(); // add one too many Modified: ace/trunk/org.apache.ace.deployment/test/org/apache/ace/deployment/provider/repositorybased/RepositoryBasedProviderConcurrencyTest.java URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.deployment/test/org/apache/ace/deployment/provider/repositorybased/RepositoryBasedProviderConcurrencyTest.java?rev=1732517&r1=1732516&r2=1732517&view=diff ============================================================================== --- ace/trunk/org.apache.ace.deployment/test/org/apache/ace/deployment/provider/repositorybased/RepositoryBasedProviderConcurrencyTest.java (original) +++ ace/trunk/org.apache.ace.deployment/test/org/apache/ace/deployment/provider/repositorybased/RepositoryBasedProviderConcurrencyTest.java Fri Feb 26 16:55:17 2016 @@ -18,8 +18,6 @@ */ package org.apache.ace.deployment.provider.repositorybased; -import static org.apache.ace.test.utils.TestUtils.UNIT; - import java.lang.reflect.Field; import java.util.concurrent.Semaphore; import java.util.concurrent.TimeUnit; @@ -34,7 +32,7 @@ import org.testng.annotations.Test; public class RepositoryBasedProviderConcurrencyTest { private final String TARGET = "target"; - + private RepositoryBasedProvider m_backend; private Semaphore m_semaphore; private Exception m_exception; @@ -48,69 +46,75 @@ public class RepositoryBasedProviderConc TestUtils.configureObject(m_backend, Repository.class, repository); TestUtils.configureObject(m_backend, LogService.class); } - - @Test(groups = { UNIT }) + + @Test() public void testNoConcurrentUsersAllowed() throws Exception { // -1 number of users makes sure nobody can use the repository setConfigurationForUsers(-1); try { m_backend.getVersions(TARGET); assert false : "Expected an overloaded exception"; - } catch (OverloadedException oe) { + } + catch (OverloadedException oe) { assert true; - } catch (Throwable t) { + } + catch (Throwable t) { assert false : "Unknown exception"; } } - @Test(groups = { UNIT }) + @Test() public void testConcurrentUsersWithLimit() throws Exception { setConfigurationForUsers(1); new Thread() { public void run() { try { m_backend.getVersions(TARGET); - } catch (Exception e) { + } + catch (Exception e) { m_exception = e; } } }.start(); - + try { boolean acquire = m_semaphore.tryAcquire(1, 1, TimeUnit.SECONDS); assert acquire : "Could not acquire semaphore, no concurrent threads ?"; m_backend.getVersions(TARGET); assert false : "Expected an overloaded exception"; - } catch (OverloadedException oe) { + } + catch (OverloadedException oe) { assert true; } - + assert m_exception == null : "No Exception expected"; } - - @Test(groups = { UNIT }) + + @Test() public void testConcurrentUsersWithoutLimit() throws Exception { - // Because it's hard to test for unlimited users we'll just try 2 concurrent threads. + // Because it's hard to test for unlimited users we'll just try 2 concurrent threads. setConfigurationForUsers(0); new Thread() { public void run() { try { m_backend.getVersions(TARGET); - } catch (Exception e) { + } + catch (Exception e) { m_exception = e; } } }.start(); - + m_semaphore.tryAcquire(1, 1, TimeUnit.SECONDS); m_backend.getVersions(TARGET); assert true; - + assert m_exception == null : "No Exception expected"; } - + private void setConfigurationForUsers(int numberOfConcurrentUsers) throws Exception { - // setting a new configuration on the repository also creates a cache repository etc. This way only the max users is changed. + // setting a new configuration on the repository also creates a cache repository etc. This way only the max + // users is changed. Field field = m_backend.getClass().getDeclaredField("m_maximumNumberOfUsers"); field.setAccessible(true); field.set(m_backend, new Integer(numberOfConcurrentUsers)); Modified: ace/trunk/org.apache.ace.deployment/test/org/apache/ace/deployment/provider/repositorybased/RepositoryBasedProviderPerformanceTest.java URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.deployment/test/org/apache/ace/deployment/provider/repositorybased/RepositoryBasedProviderPerformanceTest.java?rev=1732517&r1=1732516&r2=1732517&view=diff ============================================================================== --- ace/trunk/org.apache.ace.deployment/test/org/apache/ace/deployment/provider/repositorybased/RepositoryBasedProviderPerformanceTest.java (original) +++ ace/trunk/org.apache.ace.deployment/test/org/apache/ace/deployment/provider/repositorybased/RepositoryBasedProviderPerformanceTest.java Fri Feb 26 16:55:17 2016 @@ -18,8 +18,6 @@ */ package org.apache.ace.deployment.provider.repositorybased; -import static org.apache.ace.test.utils.TestUtils.*; - import java.io.StringWriter; import java.util.Collection; @@ -108,7 +106,7 @@ public class RepositoryBasedProviderPerf /** * Test the getBundleData for a single version, returning a single bundle, for a huge XML. */ - @Test(groups = { PERFORMANCE }, timeOut = 2000 /* millis */) + @Test(timeOut = 2000 /* millis */) public void testSingleBundleSingleVersionBundleDataFromHugeXml() throws Exception { // will parse the entire XML structure; // with XPath queries, it takes about 115 seconds of time; @@ -120,7 +118,7 @@ public class RepositoryBasedProviderPerf /** * Test the getBundleData for a single version, returning a single bundle, for a huge XML. */ - @Test(groups = { PERFORMANCE }, timeOut = 3000 /* millis */) + @Test(timeOut = 3000 /* millis */) public void testSingleBundleMultipleVersionBundleDataFromHugeXml() throws Exception { // will parse the entire XML structure; // with XPath queries, it takes about 115 seconds of time; Modified: ace/trunk/org.apache.ace.deployment/test/org/apache/ace/deployment/provider/repositorybased/RepositoryBasedProviderTest.java URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.deployment/test/org/apache/ace/deployment/provider/repositorybased/RepositoryBasedProviderTest.java?rev=1732517&r1=1732516&r2=1732517&view=diff ============================================================================== --- ace/trunk/org.apache.ace.deployment/test/org/apache/ace/deployment/provider/repositorybased/RepositoryBasedProviderTest.java (original) +++ ace/trunk/org.apache.ace.deployment/test/org/apache/ace/deployment/provider/repositorybased/RepositoryBasedProviderTest.java Fri Feb 26 16:55:17 2016 @@ -18,8 +18,6 @@ */ package org.apache.ace.deployment.provider.repositorybased; -import static org.apache.ace.test.utils.TestUtils.UNIT; - import java.io.File; import java.io.StringWriter; import java.util.Collection; @@ -56,9 +54,8 @@ import org.w3c.dom.Element; import org.w3c.dom.Node; /** - * This test class tests the Repositorybased Provider class. - * This class implements 2 backend interfaces, - * and both are tested here. + * This test class tests the Repositorybased Provider class. This class implements 2 backend interfaces, and both are + * tested here. */ public class RepositoryBasedProviderTest { @@ -78,30 +75,28 @@ public class RepositoryBasedProviderTest public static final String KEY_VENDOR = Constants.BUNDLE_VENDOR; public static final String KEY_RESOURCE_PROCESSOR_PID = "Deployment-ProvidesResourceProcessor"; /** - * Key, intended to be used for artifacts which are bundles and will publish - * a resource processor (see OSGi compendium section 114.10). + * Key, intended to be used for artifacts which are bundles and will publish a resource processor (see OSGi + * compendium section 114.10). */ public static final String DIRECTIVE_ISCUSTOMIZER = "DeploymentPackage-Customizer"; /** - * Key, intended to be used for resources which require a resource processor - * (see OSGi compendium section 114.10). + * Key, intended to be used for resources which require a resource processor (see OSGi compendium section 114.10). */ public static final String DIRECTIVE_KEY_PROCESSORID = "Resource-Processor"; /** - * Key, intended to be used for artifacts which have a resourceID that's different - * from their generated name (based on URL). + * Key, intended to be used for artifacts which have a resourceID that's different from their generated name (based + * on URL). */ public static final String DIRECTIVE_KEY_RESOURCE_ID = "Resource-ID"; /** - * Key, intended to be used for matching processed (see ArtifactPreprocessor) to their - * 'original' one. + * Key, intended to be used for matching processed (see ArtifactPreprocessor) to their 'original' one. */ public static final String DIRECTIVE_KEY_BASEURL = "Base-Url"; - public static final String REPOSITORY_PATH = "ACE-RepositoryPath"; + public static final String REPOSITORY_PATH = "ACE-RepositoryPath"; private RepositoryBasedProvider m_backend; @@ -265,8 +260,10 @@ public class RepositoryBasedProviderTest KEY_VERSION, BUNDLE1.getVersion() }, new String[] { RESOURCEPROCESSOR1.getUrl().toString(), DIRECTIVE_ISCUSTOMIZER, "true", KEY_SYMBOLICNAME, RESOURCEPROCESSOR1.getSymbolicName(), KEY_VERSION, - RESOURCEPROCESSOR1.getVersion() }, new String[] { ARTIFACT1.getUrl().toString(), - DIRECTIVE_KEY_PROCESSORID, "my.processor.pid" }, new String[] { + RESOURCEPROCESSOR1.getVersion() }, + new String[] { ARTIFACT1.getUrl().toString(), + DIRECTIVE_KEY_PROCESSORID, "my.processor.pid" }, + new String[] { ARTIFACT2.getUrl().toString(), DIRECTIVE_KEY_RESOURCE_ID, "Artifact2", DIRECTIVE_KEY_PROCESSORID, "my.processor.pid" })); @@ -298,12 +295,16 @@ public class RepositoryBasedProviderTest /** * Helper method to create the description of a deploymentpacakge with given data. * - * @param doc The document to add the version to. - * @param targetText The targetId in the deploymentversion. - * @param versionText The version in the deploymentversion. - * @param data An array of data for the deployment artifact. [0] is the url, and each following item is - * first a directive key, and a directive value. For example,
- * new String[] { "http://mybundle", "somedirective", "somevalue" } + * @param doc + * The document to add the version to. + * @param targetText + * The targetId in the deploymentversion. + * @param versionText + * The version in the deploymentversion. + * @param data + * An array of data for the deployment artifact. [0] is the url, and each following item is first a + * directive key, and a directive value. For example,
+ * new String[] { "http://mybundle", "somedirective", "somevalue" } * @return */ private Node generateDeploymentVersion(Document doc, String targetText, String versionText, String[]... data) { @@ -352,12 +353,11 @@ public class RepositoryBasedProviderTest } /** - * Without any checked in data, we should just get back no version, - * but the provider should not crash. + * Without any checked in data, we should just get back no version, but the provider should not crash. * * @throws java.io.IOException */ - @Test(groups = { UNIT }) + @Test() public void testEmptyRepository() throws Exception { Repository mock = new MockDeploymentRepository("", null, null); TestUtils.configureObject(m_backend, Repository.class, mock); @@ -370,7 +370,7 @@ public class RepositoryBasedProviderTest /** * See if the getVersions() methods normal output works */ - @Test(groups = { UNIT }) + @Test() public void testGetVersion() throws Exception { List versions = m_backend.getVersions(TARGET); assert versions.size() == 1 : "Expected one version to be found, but found " + versions.size(); @@ -380,7 +380,7 @@ public class RepositoryBasedProviderTest /** * Test the getVersions method with an illegal version (not in org.osgi.framework.Version format) */ - @Test(groups = { UNIT }) + @Test() public void testIllegalVersion() throws Exception { // an illegal version should be silently ignored List versions = m_backend.getVersions(INVALIDVERSIONTARGET); @@ -390,7 +390,7 @@ public class RepositoryBasedProviderTest /** * Test with multiple versions. It expects all versions in an ascending order. */ - @Test(groups = { UNIT }) + @Test() public void testMultipleVersions() throws Exception { List versions = m_backend.getVersions(MULTIPLEVERSIONTARGET); assert versions.size() == 4 : "Expected three version to be found, but found " + versions.size(); @@ -404,7 +404,7 @@ public class RepositoryBasedProviderTest /** * Test the getBundleData for a single version, returning a single bundle */ - @Test(groups = { UNIT }) + @Test() public void testSingleBundleSingleVersionBundleData() throws Exception { Collection bundleData = m_backend.getBundleData(TARGET, VERSION1); assert bundleData.size() == 1 : "Expected one bundle to be found, but found " + bundleData.size(); @@ -414,7 +414,7 @@ public class RepositoryBasedProviderTest /** * Test the getBundleData for a single version, returning a multiple bundles */ - @Test(groups = { UNIT }) + @Test() public void testMultipleBundleSingleVersionBundleData() throws Exception { Collection bundleData = m_backend.getBundleData(MULTIPLEVERSIONTARGET, VERSION1); assert bundleData.size() == 2 : "Expected two bundle to be found, but found " + bundleData.size(); @@ -425,7 +425,7 @@ public class RepositoryBasedProviderTest /** * Test the getBundleData with an illegal version (i.e. a version that doesn't exist) */ - @Test(groups = { UNIT }) + @Test() public void testInvalidVersionBundleData() throws Exception { try { m_backend.getBundleData(TARGET, INVALIDVERSION); @@ -440,7 +440,7 @@ public class RepositoryBasedProviderTest /** * Test the getBundleData with an illegal target (i.e. a target that doesn't exist) */ - @Test(groups = { UNIT }) + @Test() public void testInvalidTargetBundleData() throws Exception { try { m_backend.getBundleData(INVALIDVERSIONTARGET, VERSION1); @@ -455,7 +455,7 @@ public class RepositoryBasedProviderTest /** * Test the getBundleData for a two versions, returning a single bundle that hasn't changed */ - @Test(groups = { UNIT }) + @Test() public void testSingleUnchangedBundleMultipleVersions() throws Exception { Collection bundleData = m_backend.getBundleData(TARGET, VERSION1, VERSION1); assert bundleData.size() == 1 : "Expect one bundle, got " + bundleData.size(); @@ -470,7 +470,7 @@ public class RepositoryBasedProviderTest /** * Test the getBundleData for a two versions, returning multiple bundles that haven't changed */ - @Test(groups = { UNIT }) + @Test() public void testMultipleBundlesMultipleVersions() throws Exception { Collection bundleData = m_backend.getBundleData(MULTIPLEVERSIONTARGET, VERSION1, VERSION1); assert bundleData.size() == 2 : "Expected two bundle to be found, but found " + bundleData.size(); @@ -484,7 +484,7 @@ public class RepositoryBasedProviderTest /** * Test the getBundleData for a two versions, where in the second version a bundle is removed */ - @Test(groups = { UNIT }) + @Test() public void testRemovedBundleMultipleVersions() throws Exception { Collection bundleData = m_backend.getBundleData(MULTIPLEVERSIONTARGET, VERSION1, VERSION3); assert bundleData.size() == 1 : "Expected one bundle to be found, but found " + bundleData.size(); @@ -493,7 +493,7 @@ public class RepositoryBasedProviderTest /** * Test the getBundleData for a two versions, where in the second version a bundle is added */ - @Test(groups = { UNIT }) + @Test() public void testAddedBundleMultipleVersions() throws Exception { Collection bundleData = m_backend.getBundleData(MULTIPLEVERSIONTARGET, VERSION3, VERSION1); assert bundleData.size() == 2 : "Expected two bundle to be found, but found " + bundleData.size(); @@ -512,7 +512,7 @@ public class RepositoryBasedProviderTest /** * Test the getBundleData for a two versions, where in the second version one bundle has changed and another hasn't */ - @Test(groups = { UNIT }) + @Test() public void testSingleChangedBundleMultipleVersions() throws Exception { Collection bundleData = m_backend.getBundleData(MULTIPLEVERSIONTARGET, VERSION1, VERSION4); assert bundleData.size() == 2 : "Expected two bundles to be found, but found " + bundleData.size(); @@ -534,7 +534,7 @@ public class RepositoryBasedProviderTest /** * Test the getBundleData for a two versions, where two bundles have changed */ - @Test(groups = { UNIT }) + @Test() public void testMultipleChangedBundlesMultipleVersions() throws Exception { Collection bundleData = m_backend.getBundleData(MULTIPLEVERSIONTARGET, VERSION1, VERSION2); assert bundleData.size() == 2 : "Expected two bundles to be found, but found " + bundleData.size(); @@ -556,7 +556,7 @@ public class RepositoryBasedProviderTest /** * See if the getVersions() methods normal output works with literals ' and " */ - @Test(groups = { UNIT }) + @Test() public void testGetLiteralTargetVersion() throws Exception { List versions = m_backend.getVersions("'"); assert versions.size() == 1 : "Expected one version to be found, but found " + versions.size(); @@ -578,7 +578,7 @@ public class RepositoryBasedProviderTest /** * Test the getBundleData for an empty version (no bundle URLS are included) */ - @Test(groups = { UNIT }) + @Test() public void testEmptyDeploymentVersion() throws Exception { // get the version number List versions = m_backend.getVersions(EMPTYVERSIONTARGET); @@ -600,7 +600,7 @@ public class RepositoryBasedProviderTest /** * See if a version with a literal is parsed correct and ignored. */ - @Test(groups = { UNIT }) + @Test() public void testGetLiteralTargetIllegalVersion() throws Exception { List versions = m_backend.getVersions("myTarget"); assert versions.size() == 0 : "Expected no versions to be found, but found " + versions.size(); @@ -609,7 +609,7 @@ public class RepositoryBasedProviderTest /** * Test the getBundleData with some resources. */ - @Test(groups = { UNIT }) + @Test() public void testBundleDataWithResources() throws Exception { List versions = m_backend.getVersions(RESOURCETARGET); assert versions.size() == 1 : "Expected two version to be found, but found " + versions.size(); @@ -640,7 +640,7 @@ public class RepositoryBasedProviderTest } } - @Test(groups = { UNIT }) + @Test() public void testArtifactDataManifestGeneration() { Attributes B1NoFixpack = BUNDLE1.getManifestAttributes(false); assert B1NoFixpack.size() == 2; Modified: ace/trunk/org.apache.ace.deployment/test/org/apache/ace/deployment/servlet/DeploymentServletTest.java URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.deployment/test/org/apache/ace/deployment/servlet/DeploymentServletTest.java?rev=1732517&r1=1732516&r2=1732517&view=diff ============================================================================== --- ace/trunk/org.apache.ace.deployment/test/org/apache/ace/deployment/servlet/DeploymentServletTest.java (original) +++ ace/trunk/org.apache.ace.deployment/test/org/apache/ace/deployment/servlet/DeploymentServletTest.java Fri Feb 26 16:55:17 2016 @@ -18,7 +18,6 @@ */ package org.apache.ace.deployment.servlet; -import static org.apache.ace.test.utils.TestUtils.UNIT; import static org.apache.ace.test.utils.TestUtils.configureObject; import static org.apache.ace.test.utils.TestUtils.createMockObjectAdapter; import static org.easymock.EasyMock.createMock; @@ -110,7 +109,7 @@ public class DeploymentServletTest { assertResponseCode(HttpServletResponse.SC_NOT_FOUND); } - @Test(groups = { UNIT }) + @Test() public void getDowngradeFixPackageWithNonExistingToVersion() throws Exception { // try to request a version range with a non-existing from-version, should cause a complete (non-fix) package to // be returned... @@ -160,7 +159,7 @@ public class DeploymentServletTest { assertResponseOutput(2, 98); } - @Test(groups = { UNIT }) + @Test() public void getRangeDataForExistingTarget_firstOKlastOK() throws Exception { // valid range not starting at 0 m_requestPathInfo = "/existing/versions/2.0.0"; @@ -270,7 +269,7 @@ public class DeploymentServletTest { assertResponseHeaderNotPresent("X-ACE-DPSize"); } - @Test(groups = { UNIT }) + @Test() public void getUpgradeFixPackageWithExistingFromVersion() throws Exception { // try to request a version range with an existing from-version, should cause a fix package to be returned... m_requestPathInfo = "/existing/versions/2.0.0"; @@ -283,7 +282,7 @@ public class DeploymentServletTest { assertGeneratorFromVersion("2.0.0"); } - @Test(groups = { UNIT }) + @Test() public void getUpgradeFixPackageWithNonExistingFromVersion() throws Exception { // try to request a version range with a non-existing from-version, should cause a complete (non-fix) package to // be returned... @@ -297,7 +296,7 @@ public class DeploymentServletTest { assertGeneratorFromVersion(null); } - @Test(groups = { UNIT }) + @Test() public void getUpgradeFixPackageWithNonExistingToVersion() throws Exception { // try to request a version range with a non-existing from-version, should cause a complete (non-fix) package to // be returned... @@ -307,7 +306,7 @@ public class DeploymentServletTest { assertResponseCode(HttpServletResponse.SC_NOT_FOUND); } - @Test(groups = { UNIT }) + @Test() public void getUpgradeWithExistingToVersion() throws Exception { // try to request a version range with a non-existing from-version, should cause a complete (non-fix) package to // be returned... @@ -321,7 +320,7 @@ public class DeploymentServletTest { assertGeneratorFromVersion(null); } - @Test(groups = { UNIT }) + @Test() public void getUpgradeWithNonExistingToVersion() throws Exception { // try to request a version range with a non-existing from-version, should cause a complete (non-fix) package to // be returned...