Package org.apache.felix.deploymentadmin.itest.util

Examples of org.apache.felix.deploymentadmin.itest.util.DeploymentPackageBuilder.createBundleResource()


        assertEquals("Expected two deployment packages?!", 2, countDeploymentPackages());

        // add bundle2 through fix package...
        dpBuilder = createDeploymentPackageBuilder(dpBuilder.getSymbolicName(), "1.0.1");
        dpBuilder.setFixPackage("[1.0,2.0)").add(dpBuilder.createBundleResource().setUrl(getTestBundle("bundle3"))).add(dpBuilder.createBundleResource().setUrl(getTestBundle("bundle2")).setMissing());

        DeploymentPackage dp3 = installDeploymentPackage(dpBuilder);
        assertNotNull("No deployment package returned?!", dp3);

        awaitRefreshPackagesEvent();
View Full Code Here


        String value = System.getProperty("org.apache.felix.deploymentadmin.stopunaffectedbundle");
        System.setProperty("org.apache.felix.deploymentadmin.stopunaffectedbundle", "false");
        // first, install a deployment package with implementation and api bundles in version 1.0.0

        DeploymentPackageBuilder dpBuilder = createDeploymentPackageBuilder("a", "1.0.0");
        dpBuilder.add(dpBuilder.createBundleResource().setUrl(getTestBundle("bundleimpl1", "bundleimpl1", "1.0.0")));
        dpBuilder.add(dpBuilder.createBundleResource().setUrl(getTestBundle("bundleapi1", "bundleapi1", "1.0.0")));

        DeploymentPackage dp1 = installDeploymentPackage(dpBuilder);
        assertNotNull("No deployment package returned?!", dp1);
View Full Code Here

        System.setProperty("org.apache.felix.deploymentadmin.stopunaffectedbundle", "false");
        // first, install a deployment package with implementation and api bundles in version 1.0.0

        DeploymentPackageBuilder dpBuilder = createDeploymentPackageBuilder("a", "1.0.0");
        dpBuilder.add(dpBuilder.createBundleResource().setUrl(getTestBundle("bundleimpl1", "bundleimpl1", "1.0.0")));
        dpBuilder.add(dpBuilder.createBundleResource().setUrl(getTestBundle("bundleapi1", "bundleapi1", "1.0.0")));

        DeploymentPackage dp1 = installDeploymentPackage(dpBuilder);
        assertNotNull("No deployment package returned?!", dp1);

        assertEquals("Expected a single deployment package?!", 1, countDeploymentPackages());
View Full Code Here

        assertEquals("Expected a single deployment package?!", 1, countDeploymentPackages());

        // then, install a fix package with implementation and api bundles in version 2.0.0
        dpBuilder = createDeploymentPackageBuilder("a", "2.0.0").setFixPackage("[1.0.0,2.0.0]");
        dpBuilder.add(dpBuilder.createBundleResource().setUrl(getTestBundle("bundleimpl2", "bundleimpl2", "2.0.0")));
        dpBuilder.add(dpBuilder.createBundleResource().setUrl(getTestBundle("bundleapi2", "bundleapi2", "2.0.0")));

        DeploymentPackage dp2 = installDeploymentPackage(dpBuilder);
        assertNotNull("No deployment package returned?!", dp2);
View Full Code Here

        assertEquals("Expected a single deployment package?!", 1, countDeploymentPackages());

        // then, install a fix package with implementation and api bundles in version 2.0.0
        dpBuilder = createDeploymentPackageBuilder("a", "2.0.0").setFixPackage("[1.0.0,2.0.0]");
        dpBuilder.add(dpBuilder.createBundleResource().setUrl(getTestBundle("bundleimpl2", "bundleimpl2", "2.0.0")));
        dpBuilder.add(dpBuilder.createBundleResource().setUrl(getTestBundle("bundleapi2", "bundleapi2", "2.0.0")));

        DeploymentPackage dp2 = installDeploymentPackage(dpBuilder);
        assertNotNull("No deployment package returned?!", dp2);

        awaitRefreshPackagesEvent();
View Full Code Here

     */
    @Test
    public void testUpdateWithDuplicateBundleFail() throws Exception
    {
        DeploymentPackageBuilder dpBuilder = createDeploymentPackageBuilder("c", "1.0.0");
        dpBuilder.add(dpBuilder.createBundleResource().setUrl(getTestBundle("bundleimpl1", "bundleimpl1", "1.0.0")));
        dpBuilder.add(dpBuilder.createBundleResource().setUrl(getTestBundle("bundleapi1", "bundleapi1", "1.0.0")));

        // Should succeed, as the DP is correct...
        DeploymentPackage dp1 = installDeploymentPackage(dpBuilder);
        assertNotNull("No deployment package returned?!", dp1);
View Full Code Here

    @Test
    public void testUpdateWithDuplicateBundleFail() throws Exception
    {
        DeploymentPackageBuilder dpBuilder = createDeploymentPackageBuilder("c", "1.0.0");
        dpBuilder.add(dpBuilder.createBundleResource().setUrl(getTestBundle("bundleimpl1", "bundleimpl1", "1.0.0")));
        dpBuilder.add(dpBuilder.createBundleResource().setUrl(getTestBundle("bundleapi1", "bundleapi1", "1.0.0")));

        // Should succeed, as the DP is correct...
        DeploymentPackage dp1 = installDeploymentPackage(dpBuilder);
        assertNotNull("No deployment package returned?!", dp1);
View Full Code Here

        assertNotNull("No deployment package returned?!", dp1);

        // then, install a fix package with implementation and api bundles in version 2.0.0, but *also* containing the original implementation
        // bundle, which is incorrect (no bundles with the same BSN may exist in a DP)...
        dpBuilder = createDeploymentPackageBuilder("c", "2.0.0").setFixPackage("[1.0.0,2.0.0]");
        dpBuilder.add(dpBuilder.createBundleResource().setUrl(getTestBundle("bundleapi1", "bundleapi1", "1.0.0")));
        dpBuilder.add(dpBuilder.createBundleResource().setUrl(getTestBundle("bundleimpl2", "bundleimpl2", "2.0.0")));
        dpBuilder.add(dpBuilder.createBundleResource().setUrl(getTestBundle("bundleimpl1", "bundleimpl1", "1.0.0")));

        try
        {
View Full Code Here

        // then, install a fix package with implementation and api bundles in version 2.0.0, but *also* containing the original implementation
        // bundle, which is incorrect (no bundles with the same BSN may exist in a DP)...
        dpBuilder = createDeploymentPackageBuilder("c", "2.0.0").setFixPackage("[1.0.0,2.0.0]");
        dpBuilder.add(dpBuilder.createBundleResource().setUrl(getTestBundle("bundleapi1", "bundleapi1", "1.0.0")));
        dpBuilder.add(dpBuilder.createBundleResource().setUrl(getTestBundle("bundleimpl2", "bundleimpl2", "2.0.0")));
        dpBuilder.add(dpBuilder.createBundleResource().setUrl(getTestBundle("bundleimpl1", "bundleimpl1", "1.0.0")));

        try
        {
            installDeploymentPackage(dpBuilder);
View Full Code Here

        // then, install a fix package with implementation and api bundles in version 2.0.0, but *also* containing the original implementation
        // bundle, which is incorrect (no bundles with the same BSN may exist in a DP)...
        dpBuilder = createDeploymentPackageBuilder("c", "2.0.0").setFixPackage("[1.0.0,2.0.0]");
        dpBuilder.add(dpBuilder.createBundleResource().setUrl(getTestBundle("bundleapi1", "bundleapi1", "1.0.0")));
        dpBuilder.add(dpBuilder.createBundleResource().setUrl(getTestBundle("bundleimpl2", "bundleimpl2", "2.0.0")));
        dpBuilder.add(dpBuilder.createBundleResource().setUrl(getTestBundle("bundleimpl1", "bundleimpl1", "1.0.0")));

        try
        {
            installDeploymentPackage(dpBuilder);
            fail("DeploymentException expected!");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.