[jboss-jira] [JBoss JIRA] (AS7-2485) Propagate property node0 to system properties

Ondrej Zizka (Commented) (JIRA) jira-events at lists.jboss.org
Tue Nov 8 15:34:45 EST 2011


    [ https://issues.jboss.org/browse/AS7-2485?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12641205#comment-12641205 ] 

Ondrej Zizka commented on AS7-2485:
-----------------------------------

So, currently the only way to pass the props is to put it to <property name="jvmProperties">...

I asked Aslak if he could add a way to take sysprops from current JVM and pass them to the server. He agreed. See the log here.

{quote}
(21:05:14) OndrejZizka1: aslak: There you are :)
(21:05:29) aslak: OndrejZizka1, heya
(21:05:52) OndrejZizka1: aslak:  <property name="javaVmArguments"> is the only way to pass system props to in-server tests?
(21:06:48) aslak: OndrejZizka1, yes, basically
(21:07:17) OndrejZizka1: aslak:  How about changing that a bit?
(21:07:18) aslak: OndrejZizka1, you could write a extension to read up a File from the Deployment and set them as System Properties
(21:07:50) OndrejZizka1: aslak: Could it take all system props from the JVM it launches from?
(21:08:12) OndrejZizka1: Perhaps with some prefix..
(21:08:22) OndrejZizka1: (removing the prefix)
(21:08:45) aslak: it's possible
(21:09:05) aslak: OndrejZizka1, what are you trying to do ? 
(21:10:03) OndrejZizka1: aslak: the testsuite needs to pass several global props
(21:10:09) OndrejZizka1: aslak: to be available for any test
(21:10:44) aslak: OndrejZizka1, what does the props represent?
(21:12:53) OndrejZizka1: aslak: Random things, and I don't even have complete list, but for example:
(21:13:03) OndrejZizka1: Location of the AS project
(21:13:05) OndrejZizka1: (source root)
(21:13:08) OndrejZizka1: then testsuite dir
(21:13:12) OndrejZizka1: integration test suite dir
(21:13:16) OndrejZizka1: current module's dir
(21:13:42) OndrejZizka1: IPv6 related things like interface definition
(21:14:21) OndrejZizka1: QA has some more stuff to put there
(21:14:57) aslak: OndrejZizka1, you're reading/writing to disk form incontainer ? 
(21:15:02) aslak: form/from
(21:15:06) OndrejZizka1: aslak:  The idea with a file is ok, only - the mechanism to pass the props would differ from how they are passed to non-server tests, which is imo confusing -
(21:15:29) aslak: OndrejZizka1, non-server tests ? 
(21:15:35) aslak opustil místnost (quit: Read error: Connection reset by peer).
(21:15:38) OndrejZizka1: you'd have some calls to System.getProperty() taking from surefire's sys props and some from a deployment's file
(21:16:05) ***OndrejZizka1 made aslak upset and leave :)
(21:16:47) aslak [~aslak at redhat/jboss/aslak] vstoupil do místnosti.
(21:18:31) aslak: OndrejZizka1, non-server tests ? 
(21:18:33) aslak: :)
(21:18:55) OndrejZizka1: (21:15:38) OndrejZizka1: you'd have some calls to System.getProperty() taking from surefire's sys props and some from a deployment's file
(21:18:55) OndrejZizka1: (21:16:05) ***OndrejZizka1 made aslak upset and leave :)
(21:19:13) aslak: hehe
(21:19:14) OndrejZizka1: aslak:  non-server == those which are not running in arquillian -
(21:19:21) aslak: aa ic
(21:19:22) OndrejZizka1: I mean, not deployed
(21:19:28) OndrejZizka1: just plain test method
(21:19:54) OndrejZizka1: E.g. by in-server I mean a code that goes to the deployment - just to be clear
(21:20:10) OndrejZizka1: aslak:  We were discussing this:
(21:20:29) OndrejZizka1: package org.jboss.as.test.smoke.embedded.parse.ParseAndMarshalModelsTestCase
(21:20:44) OndrejZizka1: ShrinkWrapUtils.createJavaArchive("bogus.jar", ParseAndMarshalModelsTestCase.class.getPackage())
(21:23:28) aslak: OndrejZizka1, the easiest route for the System Properties thing is to write a extension. Impl LoadableExtension, add a ApplicationArchiveProcessor that reads in SystemProps from current JVM and adds them to a file in the Archive. impl a RemoteLoadableExtension and add a Observer for @BeforeSuite that reads that file and sets the SystemProperties in the Remote VM
(21:24:37) aslak: and possible unset them in @AfterSuite if you want to be nice
(21:25:03) OndrejZizka1: aslak:  Sounds nice. Want to do it?
(21:25:17) OndrejZizka1: PLeeeeeassee.... :)
(21:25:43) OndrejZizka1: Anyway, that would need some new  testsuite-common module I guess since it would be used in more modules
(21:26:33) aslak: or if you want to only have it work for Managed containers(e.g.) impl a LoadableExtension that Observes ArquillianConfiguration and manipulate the JVMArquments configuration 
(21:28:40) aslak: OndrejZizka1, yea, some common module is required
(21:28:52) aslak: OndrejZizka1, where is the source ? 
(21:29:05) aslak: OndrejZizka1, or where do you want the source.. 
(21:29:11) OndrejZizka1: aslak: It will be for whole testsuite, 
(21:29:29) OndrejZizka1: so perhaps next to testsuite module to allow testsuite have it as dep -
(21:29:37) OndrejZizka1: so -> in the root dir
(21:29:49) aslak: as7 source tree?
(21:29:53) OndrejZizka1: aslak: yes
(21:29:53) fnasser opustil místnost (quit: Quit: This computer has gone to sleep).
(21:30:04) OndrejZizka1: bstansberry, Nihility may we introduce a new module for that?
(21:30:16) OndrejZizka1: bstansberry: Nihility (shared testsuite classes)
(21:30:59) smcgowan opustil místnost (quit: Ping timeout: 256 seconds).
(21:31:31) OndrejZizka1: aslak:  Or if you have it ready somewhere, I could pick it up and put there
{quote}
                
> Propagate property node0 to system properties
> ---------------------------------------------
>
>                 Key: AS7-2485
>                 URL: https://issues.jboss.org/browse/AS7-2485
>             Project: Application Server 7
>          Issue Type: Sub-task
>          Components: Test Suite
>            Reporter: Ondřej Chaloupka
>            Assignee: Ondrej Zizka
>             Fix For: 7.1.0.CR1
>
>
> Propagate property node0 (and other ones) to system properties for test being able to take IP address where the AS runs.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       



More information about the jboss-jira mailing list