Package org.ops4j.pax.exam

Examples of org.ops4j.pax.exam.TestContainerException


            remoteFramework.invokeMethodOnService(references[0], "call",
                (Object) address.arguments());
        }
        // CHECKSTYLE:SKIP
        catch (Exception exc) {
            throw new TestContainerException(exc);
        }
    }
View Full Code Here


    public long install(String location, InputStream stream) {
        try {
            return remoteFramework.installBundle(location);
        }
        catch (RemoteException | BundleException exc) {
            throw new TestContainerException(exc);
        }
    }
View Full Code Here

            long bundleId = remoteFramework.installBundle("local", pack(stream));
            remoteFramework.startBundle(bundleId);
            return bundleId;
        }
        catch (RemoteException | BundleException exc) {
            throw new TestContainerException(exc);
        }
    }
View Full Code Here

                beforeFrameworkClasspath, afterFrameworkClasspath);
            remoteFramework.init();
            installAndStartBundles();
        }
        catch (BundleException | IOException exc) {
            throw new TestContainerException(exc);
        }
        return this;
    }
View Full Code Here

        try {
            remoteFramework.stop();
            system.clear();
        }
        catch (RemoteException | BundleException exc) {
            throw new TestContainerException(exc);
        }
        frameworkFactory.join();
        system.clear();
        return this;
    }
View Full Code Here

        boolean startLevelReached = remoteFramework.setFrameworkStartLevel(startLevel, timeout);

        if (!startLevelReached) {
            String msg = String.format("start level %d has not been reached within %d ms",
                startLevel, timeout);
            throw new TestContainerException(msg);
        }
    }
View Full Code Here

                    LOG.error("Bundle [{}] is not resolved", bundleId);
                    hasUnresolvedBundles = true;
                }
            }
            catch (BundleException exc) {
                throw new TestContainerException(exc);
            }
        }
        ConfigurationManager cm = new ConfigurationManager();
        boolean failOnUnresolved = Boolean.parseBoolean(cm.getProperty(EXAM_FAIL_ON_UNRESOLVED_KEY,
            "false"));
        if (hasUnresolvedBundles && failOnUnresolved) {
            throw new TestContainerException(
                "There are unresolved bundles. See previous ERROR log messages for details.");
        }
    }
View Full Code Here

            File localBundle = platform.download(system.getTempFolder(), realUrl, url, false, true,
                true, false);
            return localBundle.toURI().toURL().toString();
        }
        catch (MalformedURLException exc) {
            throw new TestContainerException(exc);
        }
    }
View Full Code Here

            File artifact = platform.download(system.getTempFolder(), realUrl, url, false, false,
                false, false);
            return artifact.getCanonicalPath();
        }
        catch (MalformedURLException exc) {
            throw new TestContainerException(exc);
        }
        catch (IOException exc) {
            throw new TestContainerException(exc);
        }
    }
View Full Code Here

    public JaxRs2ProbeInvoker(String encodedInstruction) {
        try {
            // parse class and method out of expression:
            String[] parts = encodedInstruction.split(";");
            if (parts.length != 3) {
                throw new TestContainerException("invalid test instruction: " + encodedInstruction);
            }
            clazz = parts[0];
            method = parts[1];
            URI contextRoot = new URI(parts[2]);
            this.testRunner = getTestRunner(contextRoot);
        }
        catch (URISyntaxException exc) {
            throw new TestContainerException(exc);
        }
    }
View Full Code Here

TOP

Related Classes of org.ops4j.pax.exam.TestContainerException

Copyright © 2018 www.massapicom. 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.