How to use Pax Exam in server mode with multiple fuse instances starting in particular order ?

Solution Unverified - Updated -

Issue

  • While using Pax Exam in server mode and starting multiple fuse instances the order of invocation of each instance is not happening sequentially.
  • For example, for the below code
@ClassRule
    public static PaxExamServer exam1 = new PaxExamServer(AMQFuseTestSetupSupport.class);

    @ClassRule
    public static PaxExamServer exam2 = new PaxExamServer(AMQ2FuseTestSetupSupport.class);

    @ClassRule
    public static PaxExamServer exam3 = new PaxExamServer(FedMBFuseTestSetupSupport.class);

    @ClassRule
    public static PaxExamServer exam4 = new PaxExamServer(MB2FuseTestSetupSupport.class);

    @ClassRule
    public static PaxExamServer exam5 = new PaxExamServer(OMSFuseTestSetupSupport.class);

    @ClassRule
    public static PaxExamServer exam6 = new PaxExamServer(TMSFuseTestSetupSupport.class);

    @ClassRule
    public static PaxExamServer exam7 = new PaxExamServer(WMSFuseTestSetupSupport.class);
  • The fuse containers exam1, exam2 .. are not starting one after the other.
  • Also for the unpackDirectory method as mentioned below in
karafDistributionConfiguration() is not working as expected if there are mutiple fuse instances 
                        .frameworkUrl(maven().groupId(getFuseGroupId()).artifactId(getFuseArtifactId()).version(getFuseVersion()).type("zip"))
                        .karafVersion(getKarafVersion())
                        .useDeployFolder(false)
                        .name("JBoss Fuse")
                        .unpackDirectory(new File(PropertyHandler.getPropertyValue("target/PaxExam/AMQ"))),

frameworkUrl(maven().groupId(getFuseGroupId()).artifactId(getFuseArtifactId()).version(getFuseVersion()).type("zip"))
                        .karafVersion(getKarafVersion())
                        .useDeployFolder(false)
                        .name("JBoss Fuse")
                        .unpackDirectory(new File(PropertyHandler.getPropertyValue("target/PaxExam/MB"))),
  • The above code is not resulting in creating UUID named directory one in target/PaxExam/AMQ and other target/PaxExam/MB but once target/PaxExam/AMQ is created the second instance UUID named directory is also created target/PaxExam/AMQ but not in target/PaxExam/MB.

Environment

  • Red Hat JBoss Fuse
    • 6.1.0

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.