Git Product home page Git Product logo

arquillian-extension-byteman's People

Contributors

alesj avatar aslakknutsen avatar bartoszmajsak avatar dependabot-preview[bot] avatar dependabot[bot] avatar dipak-pawar avatar kpiwko avatar matousjobanek avatar ochaloup avatar rachmatowicz avatar tbarath avatar tolis-e avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

arquillian-extension-byteman's Issues

Could not uninstall script from file

Hi,
I am using arquillian-extension-byteman in version 1.0.0.Alpha3.
I am getting org.jboss.arquillian.extension.byteman.impl.common.SubmitException: Could not uninstall script from file.
Even specifying exec = ExecType.CONTAINER didn't help. I had to downgrade to 1.0.0.Alpha2.

Martin Choma

13:22:57,797 INFO  [stdout] (Attach Listener) Setting org.jboss.byteman.verbose=true
13:22:57,809 INFO  [stdout] (Attach Listener) TransformListener() : accepting requests on localhost:9091
13:22:57,879 INFO  [stdout] (Thread-81) TransformListener() : handling connection on port 9091
13:22:57,902 INFO  [stdout] (Thread-81) retransforming org.picketbox.datasource.security.SecureIdentityLoginModule
13:22:57,946 INFO  [stdout] (Thread-81) org.jboss.byteman.agent.Transformer : possible trigger for rule bmrule in class org.picketbox.datasource.security.SecureIdentityLoginModule
13:22:57,963 INFO  [stdout] (Thread-81) RuleTriggerMethodAdapter.injectTriggerPoint : inserting trigger into org.picketbox.datasource.security.SecureIdentityLoginModule.login() boolean for rule bmrule
13:22:57,968 INFO  [stdout] (Thread-81) org.jboss.byteman.agent.Transformer : inserted trigger for bmrule in class org.picketbox.datasource.security.SecureIdentityLoginModule
13:22:57,999 INFO  [stdout] (Thread-81) TransformListener() : handling connection on port 9091
13:22:58,031 INFO  [stdout] (Thread-81) retransforming org.picketbox.datasource.security.SecureIdentityLoginModule
13:22:58,033 INFO  [stdout] (Thread-81) org.jboss.byteman.agent.Transformer : possible trigger for rule bmrule in class org.picketbox.datasource.security.SecureIdentityLoginModule
13:22:58,034 INFO  [stdout] (Thread-81) RuleTriggerMethodAdapter.injectTriggerPoint : inserting trigger into org.picketbox.datasource.security.SecureIdentityLoginModule.login() boolean for rule bmrule
13:22:58,036 INFO  [stdout] (Thread-81) org.jboss.byteman.agent.Transformer : inserted trigger for bmrule in class org.picketbox.datasource.security.SecureIdentityLoginModule
13:22:58,347 INFO  [stdout] (Thread-81) TransformListener() : handling connection on port 9091
13:22:58,351 INFO  [stdout] (Thread-81) retransforming org.picketbox.datasource.security.SecureIdentityLoginModule
13:22:58,360 INFO  [stdout] (Thread-81) TransformListener() : handling connection on port 9091
13:22:58,361 SEVERE [org.jboss.arquillian.extension.byteman.impl.common.AbstractRuleInstaller] (pool-1-thread-1) Error uninstalling 'Method:' script to  localhost:9091, exec [ALL, CONTAINER], msg: Could not uninstall script from file
13:22:58,365 ERROR [org.jboss.arquillian.protocol.jmx.JMXTestRunner] (pool-1-thread-1) Failed: org.jboss.as.test.integration.security.jaas.cache.JAASCacheNullTestCase.test: org.jboss.arquillian.extension.byteman.impl.common.SubmitException: Could not uninstall script from file
    at org.jboss.arquillian.extension.byteman.impl.common.SubmitUtil.uninstall(SubmitUtil.java:46) [arquillian-service:]
    at org.jboss.arquillian.extension.byteman.impl.common.AbstractRuleInstaller.uninstall(AbstractRuleInstaller.java:40) [arquillian-service:]
    at org.jboss.arquillian.extension.byteman.impl.common.AbstractRuleInstaller.uninstallMethod(AbstractRuleInstaller.java:82) [arquillian-service:]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_25]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_25]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_25]
    at java.lang.reflect.Method.invoke(Method.java:483) [rt.jar:1.8.0_25]
    at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90) [arquillian-service:]
    at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99) [arquillian-service:]
    at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81) [arquillian-service:]
    at org.jboss.arquillian.testenricher.cdi.CreationalContextDestroyer.destory(CreationalContextDestroyer.java:44) [arquillian-service:]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_25]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_25]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_25]
    at java.lang.reflect.Method.invoke(Method.java:483) [rt.jar:1.8.0_25]
    at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90) [arquillian-service:]
    at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) [arquillian-service:]
    at org.jboss.arquillian.test.impl.TestContextHandler.createTestContext(TestContextHandler.java:89) [arquillian-service:]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_25]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_25]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_25]
    at java.lang.reflect.Method.invoke(Method.java:483) [rt.jar:1.8.0_25]
    at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90) [arquillian-service:]
    at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) [arquillian-service:]
    at org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:75) [arquillian-service:]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_25]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_25]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_25]
    at java.lang.reflect.Method.invoke(Method.java:483) [rt.jar:1.8.0_25]
    at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90) [arquillian-service:]
    at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) [arquillian-service:]
    at org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:60) [arquillian-service:]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_25]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_25]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_25]
    at java.lang.reflect.Method.invoke(Method.java:483) [rt.jar:1.8.0_25]
    at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90) [arquillian-service:]
    at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) [arquillian-service:]
    at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135) [arquillian-service:]
    at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:115) [arquillian-service:]
    at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.after(EventTestRunnerAdaptor.java:103) [arquillian-service:]
    at org.jboss.arquillian.junit.Arquillian$5$1.evaluate(Arquillian.java:245) [arquillian-service:]
    at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:314) [arquillian-service:]
    at org.jboss.arquillian.junit.Arquillian.access$100(Arquillian.java:46) [arquillian-service:]
    at org.jboss.arquillian.junit.Arquillian$5.evaluate(Arquillian.java:240) [arquillian-service:]
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271) [arquillian-service:]
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70) [arquillian-service:]
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) [arquillian-service:]
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) [arquillian-service:]
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) [arquillian-service:]
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) [arquillian-service:]
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) [arquillian-service:]
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) [arquillian-service:]
    at org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:185) [arquillian-service:]
    at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:314) [arquillian-service:]
    at org.jboss.arquillian.junit.Arquillian.access$100(Arquillian.java:46) [arquillian-service:]
    at org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:199) [arquillian-service:]
    at org.junit.runners.ParentRunner.run(ParentRunner.java:309) [arquillian-service:]
    at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:147) [arquillian-service:]
    at org.junit.runner.JUnitCore.run(JUnitCore.java:160) [arquillian-service:]
    at org.junit.runner.JUnitCore.run(JUnitCore.java:138) [arquillian-service:]
    at org.jboss.arquillian.junit.container.JUnitTestRunner.execute(JUnitTestRunner.java:65) [arquillian-service:]
    at org.jboss.arquillian.protocol.jmx.JMXTestRunner.runTestMethodInternal(JMXTestRunner.java:128) [arquillian-service:]
    at org.jboss.arquillian.protocol.jmx.JMXTestRunner.runTestMethod(JMXTestRunner.java:107) [arquillian-service:]
    at org.jboss.as.arquillian.service.ArquillianService$ExtendedJMXTestRunner.runTestMethod(ArquillianService.java:214) [arquillian-service:]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_25]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_25]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_25]
    at java.lang.reflect.Method.invoke(Method.java:483) [rt.jar:1.8.0_25]
    at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:71) [rt.jar:1.8.0_25]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_25]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_25]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_25]
    at java.lang.reflect.Method.invoke(Method.java:483) [rt.jar:1.8.0_25]
    at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:275) [rt.jar:1.8.0_25]
    at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:112) [rt.jar:1.8.0_25]
    at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:46) [rt.jar:1.8.0_25]
    at com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:237) [rt.jar:1.8.0_25]
    at com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:138) [rt.jar:1.8.0_25]
    at com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:252) [rt.jar:1.8.0_25]
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819) [rt.jar:1.8.0_25]
    at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801) [rt.jar:1.8.0_25]
    at org.jboss.as.jmx.PluggableMBeanServerImpl$TcclMBeanServer.invoke(PluggableMBeanServerImpl.java:1468)
    at org.jboss.as.jmx.PluggableMBeanServerImpl.invoke(PluggableMBeanServerImpl.java:740)
    at org.jboss.as.jmx.BlockingNotificationMBeanServer.invoke(BlockingNotificationMBeanServer.java:168)
    at org.jboss.remotingjmx.protocol.v2.ServerProxy$InvokeHandler.handle(ServerProxy.java:952)
    at org.jboss.remotingjmx.protocol.v2.ServerCommon$MessageReciever$1$1.run(ServerCommon.java:153)
    at org.jboss.as.jmx.ServerInterceptorFactory$Interceptor$1.run(ServerInterceptorFactory.java:75)
    at org.jboss.as.jmx.ServerInterceptorFactory$Interceptor$1.run(ServerInterceptorFactory.java:70)
    at java.security.AccessController.doPrivileged(Native Method) [rt.jar:1.8.0_25]
    at javax.security.auth.Subject.doAs(Subject.java:422) [rt.jar:1.8.0_25]
    at org.jboss.as.controller.AccessAuditContext.doAs(AccessAuditContext.java:94)
    at org.jboss.as.jmx.ServerInterceptorFactory$Interceptor.handleEvent(ServerInterceptorFactory.java:70)
    at org.jboss.remotingjmx.protocol.v2.ServerCommon$MessageReciever$1.run(ServerCommon.java:149)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_25]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_25]
    at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_25]
Caused by: java.lang.Exception: The remote byteman agent reported an error:
ERROR failed to find loaded rule with name bmrule
ERROR No rule scripts to remove

    at org.jboss.byteman.agent.submit.Submit$Comm.readResponse(Submit.java:966) [byteman.jar:0.0.0.Arq]
    at org.jboss.byteman.agent.submit.Submit.submitRequest(Submit.java:790) [byteman.jar:0.0.0.Arq]
    at org.jboss.byteman.agent.submit.Submit.deleteScripts(Submit.java:697) [byteman.jar:0.0.0.Arq]
    at org.jboss.arquillian.extension.byteman.impl.common.SubmitUtil.uninstall(SubmitUtil.java:44) [arquillian-service:]
    ... 96 more

Unable to run on IBM java

Hi,

hi I am unable to run extension on IBM java. Apparently problem of IBM java, that agent could not be installed. But would be nice to have some reference to fix the problem here.

Regards,
Martin Choma

Running org.jboss.as.test.integration.security.jaas.cache.JAASCacheNullTestCase
06:54:05 *** java.lang.instrument ASSERTION FAILED ***: "jvmtierror == JVMTI_ERROR_NOT_AVAILABLE" at ../../../src/share/instrument/JPLISAgent.c line: 1009
06:54:05 Exception in thread "Attachment 41784" Agent failed to start!
06:54:05 JVMJ9TI064E Agent initialization function Agent_OnAttach failed for library instrument, return code 102
06:54:05 Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 2.186 sec <<< FAILURE! - in org.jboss.as.test.integration.security.jaas.cache.JAASCacheNullTestCase
06:54:05 org.jboss.as.test.integration.security.jaas.cache.JAASCacheNullTestCase  Time elapsed: 2.185 sec  <<< ERROR!
06:54:05 java.lang.RuntimeException: Could not install byteman agent
06:54:05    at org.jboss.arquillian.extension.byteman.impl.client.AgentInstaller.install(AgentInstaller.java:109)
06:54:05    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
06:54:05    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:94)
06:54:05    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
06:54:05    at java.lang.reflect.Method.invoke(Method.java:619)
06:54:05    at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
06:54:05    at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
06:54:05    at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
06:54:05    at org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:60)
06:54:05    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
06:54:05    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:94)
06:54:05    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
06:54:05    at java.lang.reflect.Method.invoke(Method.java:619)
06:54:05    at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
06:54:05    at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
06:54:05    at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135)
06:54:05    at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:115)
06:54:05    at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.beforeSuite(EventTestRunnerAdaptor.java:68)
06:54:05    at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:97)
06:54:05    at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:264)
06:54:05    at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
06:54:05    at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124)
06:54:05    at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200)
06:54:05    at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
06:54:05    at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
06:54:05 Caused by: com.sun.tools.attach.AgentInitializationException: ATTACH_ERR AgentInitializationException102
06:54:05    at ibm.tools.attach.J9VirtualMachine.loadAgent(J9VirtualMachine.java:66)
06:54:05    at org.jboss.arquillian.extension.byteman.impl.client.AgentInstaller.install(AgentInstaller.java:100)
06:54:05    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
06:54:05    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:94)
06:54:05    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
06:54:05    at java.lang.reflect.Method.invoke(Method.java:619)
06:54:05    at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
06:54:05    at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
06:54:05    at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
06:54:05    at org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:60)
06:54:05    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
06:54:05    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:94)
06:54:05    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
06:54:05    at java.lang.reflect.Method.invoke(Method.java:619)
06:54:05    at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
06:54:05    at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
06:54:05    at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135)
06:54:05    at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:115)
06:54:05    at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.beforeSuite(EventTestRunnerAdaptor.java:68)
06:54:05    at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:97)
06:54:05    at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:264)
06:54:05    at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
06:54:05    at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124)
06:54:05    at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200)
06:54:05    at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
06:54:05    at org.apache.maven.surefire.booter.For

Test configuration should allow multiple containers

A common use case for Arquillian and Byteman is to have a single client interacting with two or more servers, where:

  • the Byteman agent is installed on each server (and possibly the client)
  • rules deployed to the servers only (or to both client and servers)
  • the test runs on the client

The current version of Arquillian Byteman extension does not handle this case,as the Byteman configuration allows configuration of a single clientAgentPort and a single containerAgentPort. In other words, the test configuration is limited to a client interacting with a single container. This is my understanding, in any case.

I'm currently trying to think of a simple way to fix this, but it's complicated by the fact that agents can be auto-installed or not, containers may be remote or managed, and enough information needs to be provided to enable the generation of the correct set of ExecContexts which are used by the RuleInstaller to communicate with the various agents.

One starting point might be to allow a user to specify a simple list of agent ports via a new element in the Byteman configuration schema. Or more completely to specify a new XML element "agent" with attributes host, port and auto-install flag which are children of an "agents" element so that each agent can be configured separately. I think the latter would allow more precise configuration possibilities.

I'll try and set up a PR for this in the near future. Any comments appreciated.

NOTE: just realised that the Byteman configuration is provided as an extension configuration within arquillian.xml, so the latter configuration option involving adding new XML elements is probably not viable; some form of String will need to be used.

Byteman extension is incomplete

Is anyone planning to finish this project? Because at the moment, its only about 40% complete.

As far as I can tell, this only implements a small subset of Byteman's configurable features, namely the annotations BMRules and BMRule. What about BMConfig, BMScript, and other means of configuring the agent? Also, there is precious little in the way of documenting how to use it: for example, in a test involving a client and two servers, how to direct some rules to install on one server or client versus another.

Byteman is used successfully in a number of projects, but always via the BMUnit test runner - which works out of the box. In the Wildfly testsuite, which is based on ARQ, nobody's using it, and i'm guessing that the reason is the state of this extension.

Is anyone planning on addressing this? It's a pretty serious limitation of our ability to test when we are dependent on ARQ as a test runner.

Problem running on JDK9 and above

The project's pom has the following dependency:
<dependency>
<groupId>com.sun</groupId>
<artifactId>tools</artifactId>
<version>1.6.0</version>
<scope>system</scope>
<systemPath>${path.tools_jar}</systemPath>
</dependency>
This dependency can only be satisfied for JDK 8 and below, as tools.jar has been removed from the JDK with the introduction of jigsaw.

When I include the arquillian-byteman-extension in my ARQ-based testsuite, which I want to run on JDK 9, this dependency can't be satisfied and my testsuite will not execute. JDK 9 was released in September 2017.

I'll probably be submitting a fix for this shortly as I can't work around it.

arquillian remote container

The profile for the remote container is not working, receiving NoClassDefFoundError on org.jboss.byteman.agent.submit.Submit at org.jboss.arquillian.extension.byteman.impl.common.SubmitUtil.install

Some things I noticed, the managed-container(which does work) writes out a byteman.jar that's been created in DeploymentAppender.createAuxiliaryArchive to c:/tmp.

The Submit.class, ScriptText.class and others have been added to this jar via DeploymentAppender.createAuxiliaryArchive; then the classloader in SubmitUtil.intall loads the org.jboss.byteman.agent.submit.Submit from c:\tmp

The remote-container is not writng this jar to c:\tmp, therefore I'm guessing that's cause of the NoClassDefFoundError; same classloader is being used and throwing NoClassDefFoundError.

Also I'm set the following in the standalone.bat:
JAVA_OPTS= %JAVA_OPTS% -Djboss.modules.system.pkgs=com.sun.tools.attach,org.jboss.byteman -Dorg.jboss.byteman.transform.all -javaagent:G:\lib\byteMan\byteman.jar=boot:G:\lib\byteMan\byteman.jar,listener:true

Thanks

Could not run with arquillian 1.4.0.Final

I tried to get running the arquillian byteman extension in version 1.0.0.Alpha4 while I've defined dependency to arquillian core as 1.4.0.Final. Execution failed with

java.lang.RuntimeException: Could not create new instance of class org.jboss.arquillian.test.impl.EventTestRunnerAdaptor
Caused by: java.lang.reflect.InvocationTargetException
Caused by: java.lang.RuntimeException: Could not create new instance of class org.jboss.arquillian.core.impl.ManagerImpl
Caused by: java.lang.reflect.InvocationTargetException
Caused by: java.lang.NoSuchMethodError: org.jboss.arquillian.core.spi.ExtensionLoader.loadVetoed()Ljava/util/Map;

Taking the project and recompiling it with the arquillian version and byteman 4.0.2 version helped. See my "changes" here
ochaloup@2d3201f

Installing agent multiple times

When deploying to a remote container, and having autoInstallAgent set to true, the 'firstTime' check in AgentInstaller fails (return true all the time), resulting in the org.jboss.byteman.agent.Main throwing on consecutive runs.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.