You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by Jonathan Robie <jo...@redhat.com> on 2010/08/11 17:28:39 UTC
Rename drain and spout? qpid-python-test ....
qpid-python-test generally assumes that programs to be executed are on
the path.
I wrote some Python unit tests that use drain and spout in three
languages, and test interop. My tests specify the complete path to the
programs, but this makes installation a little more complex.
It would be convenient to have different program names that can coexist
on the path, e.g.
python-send
python-receive
cpp-send
cpp-receive
java-send
java-receive
Would renaming these examples in this way have any significant
disadvantages?
Jonathan
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org
Re: Rename drain and spout? qpid-python-test ....
Posted by Alan Conway <ac...@redhat.com>.
On 08/11/2010 11:28 AM, Jonathan Robie wrote:
> qpid-python-test generally assumes that programs to be executed are on
> the path.
>
> I wrote some Python unit tests that use drain and spout in three
> languages, and test interop. My tests specify the complete path to the
> programs, but this makes installation a little more complex.
>
> It would be convenient to have different program names that can coexist
> on the path, e.g.
>
> python-send
> python-receive
> cpp-send
> cpp-receive
> java-send
> java-receive
>
> Would renaming these examples in this way have any significant
> disadvantages?
>
I'm not keen on putting the language in the name of the program. People using a
program typically care about what it does, not what language it's written in. I
think qpid-send and qpid-receive are the kind of programs that we want to
install as debugging/testing tools, not just examples. (BTW, I think we *do*
need the qpid- prefix if we want to install these things in standard paths.) I
don't see the user benefit to installing multiple different-language
implementations of essentially the same program.
Interop testing is a special case, I don't think we should complicate the naming
of programs intended for users in order to simplify our interop testing. Perhaps
for interop testing purposes you could copy qpid-send to qpid-cpp-send etc. in
your path to give distinct names for purposes of the test.
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org
Re: Rename drain and spout? qpid-python-test ....
Posted by Rajith Attapattu <ra...@gmail.com>.
On Wed, Aug 11, 2010 at 3:15 PM, Justin Ross <jr...@redhat.com> wrote:
> On Wed, 11 Aug 2010, Jonathan Robie wrote:
>
>> qpid-python-test generally assumes that programs to be executed are on the
>> path.
>>
>> I wrote some Python unit tests that use drain and spout in three
>> languages, and test interop. My tests specify the complete path to the
>> programs, but this makes installation a little more complex.
>
> I think the answer depends on what you intend to test.
>
> If it's just a generic interop test, don't use drain and spout. Those are
> example programs. An interop suite should use senders and receivers built
> for testing.
I also raised this issue several times before. We try to write
utilities that work as demos, examples, interop testing tools and end
up in a right royal mess.
It happened with the last set of examples as well.
The end result was that it severely restricted the examples to the
least common denominator to make sure it all worked.
I think we should have clear code examples, demos and utilities that
are specifically written for each purpose.
Feedback from customers indicate that while drain and spout are
excellent utilities for demonstrating the new addressing syntax or as
general testing tool, it's not good as code examples.
Rajith
> If it's specifically to test the example code, then the key concept is
> "default system location". drain and spout don't need to be in the path,
> but the examples do need to live at a well-known base directory. That way,
> your tests can find drains and spouts (from the base directory). Offer an
> environment variable for overriding the base directory. Iow, for this
> particular problem, you don't need to use the search path.
>
> Why are we testing interop using drain and spout? Is it just expediency?
>
> Justin
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project: http://qpid.apache.org
> Use/Interact: mailto:dev-subscribe@qpid.apache.org
>
>
--
Regards,
Rajith Attapattu
Red Hat
http://rajith.2rlabs.com/
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org
Re: Rename drain and spout? qpid-python-test ....
Posted by Gordon Sim <gs...@redhat.com>.
On 08/11/2010 08:15 PM, Justin Ross wrote:
> On Wed, 11 Aug 2010, Jonathan Robie wrote:
>
>> qpid-python-test generally assumes that programs to be executed are on
>> the path.
>>
>> I wrote some Python unit tests that use drain and spout in three
>> languages, and test interop. My tests specify the complete path to the
>> programs, but this makes installation a little more complex.
>
> I think the answer depends on what you intend to test.
>
> If it's just a generic interop test, don't use drain and spout. Those
> are example programs. An interop suite should use senders and receivers
> built for testing.
>
> If it's specifically to test the example code, then the key concept is
> "default system location". drain and spout don't need to be in the path,
> but the examples do need to live at a well-known base directory. That
> way, your tests can find drains and spouts (from the base directory).
> Offer an environment variable for overriding the base directory. Iow,
> for this particular problem, you don't need to use the search path.
This is what the tests were supposed to be in my view. They are there to
verify the examples work as expected (and were a replacement for the old
verify scripts for the old examples).
> Why are we testing interop using drain and spout? Is it just expediency?
As above, that's not really the objective here. The objective is to
ensure that the examples keep working for the cases and combinations we
need.
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org
Re: Rename drain and spout? qpid-python-test ....
Posted by Justin Ross <jr...@redhat.com>.
On Wed, 11 Aug 2010, Jonathan Robie wrote:
> qpid-python-test generally assumes that programs to be executed are on the
> path.
>
> I wrote some Python unit tests that use drain and spout in three languages,
> and test interop. My tests specify the complete path to the programs, but
> this makes installation a little more complex.
I think the answer depends on what you intend to test.
If it's just a generic interop test, don't use drain and spout. Those are
example programs. An interop suite should use senders and receivers built
for testing.
If it's specifically to test the example code, then the key concept is
"default system location". drain and spout don't need to be in the path,
but the examples do need to live at a well-known base directory. That
way, your tests can find drains and spouts (from the base directory).
Offer an environment variable for overriding the base directory. Iow, for
this particular problem, you don't need to use the search path.
Why are we testing interop using drain and spout? Is it just expediency?
Justin
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org
Re: Rename drain and spout? qpid-python-test ....
Posted by Gordon Sim <gs...@redhat.com>.
On 08/11/2010 07:09 PM, Chuck Rolke wrote:
> I'd tend to leave the names be what they are and adjust my design and environment to them.
Me too.
> Certainly it's a problem when you type 'drain' and the wrong drain runs because of a path. But it seems there will always be the case where you need to test two cpp-receive versions against each other and you are right back to where you are now. If you design for a full absolute path to each executable then it never goes wrong.
Good point.
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org
Re: Rename drain and spout? qpid-python-test ....
Posted by Chuck Rolke <cr...@redhat.com>.
I'd tend to leave the names be what they are and adjust my design and environment to them.
Certainly it's a problem when you type 'drain' and the wrong drain runs because of a path. But it seems there will always be the case where you need to test two cpp-receive versions against each other and you are right back to where you are now. If you design for a full absolute path to each executable then it never goes wrong.
-C
----- "Jonathan Robie" <jo...@redhat.com> wrote:
> From: "Jonathan Robie" <jo...@redhat.com>
> To: dev@qpid.apache.org
> Sent: Wednesday, August 11, 2010 11:28:39 AM GMT -05:00 US/Canada Eastern
> Subject: Rename drain and spout? qpid-python-test ....
>
> qpid-python-test generally assumes that programs to be executed are on
>
> the path.
>
> I wrote some Python unit tests that use drain and spout in three
> languages, and test interop. My tests specify the complete path to the
>
> programs, but this makes installation a little more complex.
>
> It would be convenient to have different program names that can
> coexist
> on the path, e.g.
>
> python-send
> python-receive
> cpp-send
> cpp-receive
> java-send
> java-receive
>
> Would renaming these examples in this way have any significant
> disadvantages?
>
> Jonathan
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project: http://qpid.apache.org
> Use/Interact: mailto:dev-subscribe@qpid.apache.org
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org