Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test configuration should allow multiple containers #40

Open
rachmatowicz opened this issue Nov 16, 2020 · 1 comment
Open

Test configuration should allow multiple containers #40

rachmatowicz opened this issue Nov 16, 2020 · 1 comment

Comments

@rachmatowicz
Copy link
Contributor

rachmatowicz commented Nov 16, 2020

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.

@ochaloup
Copy link
Contributor

ochaloup commented Nov 18, 2020

This feature would be nice. Currently I need to managed multiple containers manually by adding the byteman command line arguments as part of the jvmArgs of particular app server.

Regarding the configuration. I've never tried to hook such thing with Arquillian but would not be possible to attach those parameters for particular container directly? Instead of

<container qualifier="app-container">
  ...
</container>
<extension qualifier="byteman">
  <property name="agentPort" .. />
</extension>

having like

<container qualifier="app-container">
  <property name="agentPort" .. />
</container>

The old configuration could be deprecated and taken as a default when nothing else configured. Still, I have no idea if it's feasible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants