[ 
https://issues.apache.org/jira/browse/QPID-1421?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andrea Gazzarini updated QPID-1421:
-----------------------------------

    Attachment: qman_systest_05112008.patch

Hi all, this patch solves this issue and introduces some improvements on Q-Man 
design. 
Briefly :

**** PUBLISH / SUBSCRIBE PATTERN ****
QMan has an MBean administration interface that allows extermal (JMX clients) 
to regitester themselves a listeners.
Q-Man is sending notification to registered listenrers in the following 
scenarios :

- A schema (class / event) has been requested (Schema request); 
- A schema (class / event) has been injected (Schema response); 
- A schema cannot be parsed (probably it is malformed);
- An object instance has been created (Instrumentation / Configuration 
response); 
- An event instance has been created (Instrumentation / Configuration 
response); 
- An object instance has been removed (Instrumentation / Configuration 
response); 
- An event instance has been removed (Instrumentation / Configuration 
response); 
- A method has been invoked and the corresponding result has been received.

So basically, referring to this issue, the added test case are external JMX 
listeners that are using the above mechanism in order to check the behaviour of 
the management command messages exchange.

For example the ManagementSchemaMessagesTest is doing the following in order to 
test 's' / 'S' messages exchange :

- Starts QMan (Qpid is already started);
- Register a notification listener interested in schema events and wait 
- When a "schema requested" notification (= Schema request has been sent) comes 
from Q-Man, test stores the FQN of the entity (class or event) on a Set;
- When a "schema injected"  notification (Schema response has been received and 
corresponding enrtity definition has been built) comes from Q-Man, test stores 
the FQN of the entity (class or event) on another Set.
- A check is made in order to see that all "requested schema" entries have a 
corresponding entry on the "injected schema" collection.
 
**** QMAN JMX DOMAIN MODEL ***
Q-Man domain model has been improved adding two new kind of entities : Class & 
Event;
Previously, only object& event instances were registered on MBeanServer; now 
there's their definition too.

Regards,
Andrea

> QMan Integration Tests : Tests with QMan & QPID running 
> --------------------------------------------------------
>
>                 Key: QPID-1421
>                 URL: https://issues.apache.org/jira/browse/QPID-1421
>             Project: Qpid
>          Issue Type: Improvement
>          Components: Java Tools
>    Affects Versions: M4
>         Environment: J2SE 5.0 or higher 
>            Reporter: Andrea Gazzarini
>             Fix For: M4
>
>         Attachments: qman_systest_05112008.patch
>
>
> Actual bundle of QMan has only "offline" unit test that are running tests 
> again isolated "components" of QMan.
> That means that in order to see those tests running you don't need to have 
> QMan and / or Qpid running.
> This is good for development stage, allowing a (moreless) test-driven 
> development and therefore a flexible code but in order to see that all is 
> working (Test --> QMan --> Qpid) we need to add tests against a runnning QMan 
> connected to a broker.
> I'm thinking about that...I already coded some tests but it's an hard work 
> because the asynchronous nature of the interaction between QMan & Qpid.
> Probably QMan will be extended to support JMX notifications. 
> I'm thinkng about that so I'm not sure but from a test perspective should be 
> cool if you could register a test as a listener of QMan notifications and in 
> that way you will be informed about object creations, events, method 
> invocations and all what you need to run your verifications.
> If you some kind of idea feel free to suggest...
> Regards,
> Andrea   

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to