Hi John,

> I'm squiffing up qpid-config to add the ability to configure 
> xml exchanges and queue bindings.  I'm trying to add stuff to 
> the test suite (cpp/src/tests/cli_tests.py and related) to match.
> 
> The difficulty I have right now is that the xml support is 
> optional.  If you didn't configure for xml and load the 
> module when you started the broker, you don't get xml 
> support, and my test case flames out.
> 
> It's not too hard to make the wrapper script (run_cli_tests) 
> sense the presence of the module and only optionally add the 
> --load-module arg.

Also, you can do this in cpp/src/CMakeLists.txt and/or
cpp/src/tests/CMakeLists.txt with the BUILD_XML setting - if XML is
being built, include the test, else not.

> Presumably something analogous could be done on windows as well.

Theoretically, yes, but since Windows doesn't today support the XML
exchange, you don't need to test this.

> It's less clear to me how to make 
> the test code sense that the environment is sans-xml and DTRT.  
> 
> Possibilities which come to mind:
> 
> 1.  Trap the error (about xml being unhandled) and ignore it

Yes, if you could be sure it was because XML support isn't there.

> 2.  Move the xml test out into a separate module, and only 
> invoke it if we're configured the right way.

This is what I'd recommend.

-Steve


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscr...@qpid.apache.org

Reply via email to