jvm parameters not visible with in arquillian test

2019-07-19 23:04发布

问题:

I am running arquillian in the jboss managed container mode. I am setting the following jvm parameters while starting arquillian testcases in arquillian.xml file:

<property name="javaVmArguments">-Xmx2048m -XX:MaxPermSize=256m -Djboss.socket.binding.port-offset=629 -Djboss.bind.address.unsecure=127.0.0.1 

However, in my testcode, I am unable to see these jvm parameters. When the following code executes in the testcase, it returns "Not set".

System.getProperty("jboss.bind.address.unsecure", "Not set"));

My testcase looks like this:

@Test
    @InSequence(2)
    @OperateOnDeployment("PIB")
    public void testDeployCamelEngineService() throws Exception {
        this.deployer.deploy("CamelEngine");
        changeConfigParameters("med_service_protocol_info", "CM");
    }

I am using some JVM parameters in the changeConfigParameters method .

Any idea what I am doing wrong ?

回答1:

I think this property sets the arguments for the jvm that the container is deployed on, not for the vm that is running the tests.