You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Weston M. Price" <wp...@redhat.com> on 2012/05/03 17:18:59 UTC

Unit Test Question

I have a fix for https://issues.apache.org/jira/browse/QPID-3971. The fix is fairly simple, but I wanted to create a unit test for the PropertiesFileInitialContextFactory as we don't seem to have one. I am sort of confused about where the appropriate test for this should go. Looking at the tree, and since this doesn't actually require Broker connectivity, my best guess would be in:

java/client/src/test/java/org/apache/qpid/client

I would create a jndi directory and the test. The class itself lives in the client code so this would seem to make sense. 

Thoughts? 

Regards,

Weston
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org


Re: Unit Test Question

Posted by "Weston M. Price" <wp...@redhat.com>.
sigh..one of those days

s/gripping/grepping


On May 3, 2012, at 11:49 AM, Weston M. Price wrote:

> Ah, I see why I missed it as I was gripping for any test with PropertiesFileInitialContextFactory. So, sorry to be obtuse, but the existing stuff, based on your original recommendation doesn't really seem to be in the right place. Perhaps I should just move it all to the new PropertiesFileInitialContextFactoryTest? 
> 
> Regards,
> 
> Weston
> On May 3, 2012, at 11:42 AM, Robbie Gemmell wrote:
> 
>> Its not hard to see why you might get confused in there, some of the
>> older tests are quite a mess [when it comes to naming]. E.g, there
>> does actually look to be some really basic testing of the properties
>> file stuff in o.a.q.test.unit.jndi.
>> 
>> Robbie
>> 
>> On 3 May 2012 16:35, Weston M. Price <wp...@redhat.com> wrote:
>>> Hi Robbie,
>>>       Thanks for the clarification. I was confused as there were other tests that didn't match the module, but I will go with your suggestion.
>>> 
>>> Regards,
>>> 
>>> Weston
>>> On May 3, 2012, at 11:31 AM, Robbie Gemmell wrote:
>>> 
>>>> Unit tests for a class in <module_x> should generally live in
>>>> <module_x>/src/test/<etc to match the implementation class package>,
>>>> so for PropertiesFileInitialContextFactory we would usually go for:
>>>> 
>>>> java/client/src/test/java/org/apache/qpid/jndi/PropertiesFileInitialContextFactoryTest.java
>>>> 
>>>> Robbie
>>>> 
>>>> On 3 May 2012 16:18, Weston M. Price <wp...@redhat.com> wrote:
>>>>> I have a fix for https://issues.apache.org/jira/browse/QPID-3971. The fix is fairly simple, but I wanted to create a unit test for the PropertiesFileInitialContextFactory as we don't seem to have one. I am sort of confused about where the appropriate test for this should go. Looking at the tree, and since this doesn't actually require Broker connectivity, my best guess would be in:
>>>>> 
>>>>> java/client/src/test/java/org/apache/qpid/client
>>>>> 
>>>>> I would create a jndi directory and the test. The class itself lives in the client code so this would seem to make sense.
>>>>> 
>>>>> Thoughts?
>>>>> 
>>>>> Regards,
>>>>> 
>>>>> Weston
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
>>>>> For additional commands, e-mail: dev-help@qpid.apache.org
>>>>> 
>>>> 
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
>>>> For additional commands, e-mail: dev-help@qpid.apache.org
>>>> 
>>> 
>>> 
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
>>> For additional commands, e-mail: dev-help@qpid.apache.org
>>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
>> For additional commands, e-mail: dev-help@qpid.apache.org
>> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
> For additional commands, e-mail: dev-help@qpid.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org


Re: Unit Test Question

Posted by Robbie Gemmell <ro...@gmail.com>.
Yep, thats exactly what I would do if looks useful, or delete it if it
doesn't and you are replacing it with something that is (I didnt
actually look at what it is does, other than seeing it wasn't a great
deal).

Robbie

On 3 May 2012 16:49, Weston M. Price <wp...@redhat.com> wrote:
> Ah, I see why I missed it as I was gripping for any test with PropertiesFileInitialContextFactory. So, sorry to be obtuse, but the existing stuff, based on your original recommendation doesn't really seem to be in the right place. Perhaps I should just move it all to the new PropertiesFileInitialContextFactoryTest?
>
> Regards,
>
> Weston
> On May 3, 2012, at 11:42 AM, Robbie Gemmell wrote:
>
>> Its not hard to see why you might get confused in there, some of the
>> older tests are quite a mess [when it comes to naming]. E.g, there
>> does actually look to be some really basic testing of the properties
>> file stuff in o.a.q.test.unit.jndi.
>>
>> Robbie
>>
>> On 3 May 2012 16:35, Weston M. Price <wp...@redhat.com> wrote:
>>> Hi Robbie,
>>>        Thanks for the clarification. I was confused as there were other tests that didn't match the module, but I will go with your suggestion.
>>>
>>> Regards,
>>>
>>> Weston
>>> On May 3, 2012, at 11:31 AM, Robbie Gemmell wrote:
>>>
>>>> Unit tests for a class in <module_x> should generally live in
>>>> <module_x>/src/test/<etc to match the implementation class package>,
>>>> so for PropertiesFileInitialContextFactory we would usually go for:
>>>>
>>>> java/client/src/test/java/org/apache/qpid/jndi/PropertiesFileInitialContextFactoryTest.java
>>>>
>>>> Robbie
>>>>
>>>> On 3 May 2012 16:18, Weston M. Price <wp...@redhat.com> wrote:
>>>>> I have a fix for https://issues.apache.org/jira/browse/QPID-3971. The fix is fairly simple, but I wanted to create a unit test for the PropertiesFileInitialContextFactory as we don't seem to have one. I am sort of confused about where the appropriate test for this should go. Looking at the tree, and since this doesn't actually require Broker connectivity, my best guess would be in:
>>>>>
>>>>> java/client/src/test/java/org/apache/qpid/client
>>>>>
>>>>> I would create a jndi directory and the test. The class itself lives in the client code so this would seem to make sense.
>>>>>
>>>>> Thoughts?
>>>>>
>>>>> Regards,
>>>>>
>>>>> Weston
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
>>>>> For additional commands, e-mail: dev-help@qpid.apache.org
>>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
>>>> For additional commands, e-mail: dev-help@qpid.apache.org
>>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
>>> For additional commands, e-mail: dev-help@qpid.apache.org
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
>> For additional commands, e-mail: dev-help@qpid.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
> For additional commands, e-mail: dev-help@qpid.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org


Re: Unit Test Question

Posted by "Weston M. Price" <wp...@redhat.com>.
Ah, I see why I missed it as I was gripping for any test with PropertiesFileInitialContextFactory. So, sorry to be obtuse, but the existing stuff, based on your original recommendation doesn't really seem to be in the right place. Perhaps I should just move it all to the new PropertiesFileInitialContextFactoryTest? 

Regards,

Weston
On May 3, 2012, at 11:42 AM, Robbie Gemmell wrote:

> Its not hard to see why you might get confused in there, some of the
> older tests are quite a mess [when it comes to naming]. E.g, there
> does actually look to be some really basic testing of the properties
> file stuff in o.a.q.test.unit.jndi.
> 
> Robbie
> 
> On 3 May 2012 16:35, Weston M. Price <wp...@redhat.com> wrote:
>> Hi Robbie,
>>        Thanks for the clarification. I was confused as there were other tests that didn't match the module, but I will go with your suggestion.
>> 
>> Regards,
>> 
>> Weston
>> On May 3, 2012, at 11:31 AM, Robbie Gemmell wrote:
>> 
>>> Unit tests for a class in <module_x> should generally live in
>>> <module_x>/src/test/<etc to match the implementation class package>,
>>> so for PropertiesFileInitialContextFactory we would usually go for:
>>> 
>>> java/client/src/test/java/org/apache/qpid/jndi/PropertiesFileInitialContextFactoryTest.java
>>> 
>>> Robbie
>>> 
>>> On 3 May 2012 16:18, Weston M. Price <wp...@redhat.com> wrote:
>>>> I have a fix for https://issues.apache.org/jira/browse/QPID-3971. The fix is fairly simple, but I wanted to create a unit test for the PropertiesFileInitialContextFactory as we don't seem to have one. I am sort of confused about where the appropriate test for this should go. Looking at the tree, and since this doesn't actually require Broker connectivity, my best guess would be in:
>>>> 
>>>> java/client/src/test/java/org/apache/qpid/client
>>>> 
>>>> I would create a jndi directory and the test. The class itself lives in the client code so this would seem to make sense.
>>>> 
>>>> Thoughts?
>>>> 
>>>> Regards,
>>>> 
>>>> Weston
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
>>>> For additional commands, e-mail: dev-help@qpid.apache.org
>>>> 
>>> 
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
>>> For additional commands, e-mail: dev-help@qpid.apache.org
>>> 
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
>> For additional commands, e-mail: dev-help@qpid.apache.org
>> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
> For additional commands, e-mail: dev-help@qpid.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org


Re: Unit Test Question

Posted by Robbie Gemmell <ro...@gmail.com>.
Its not hard to see why you might get confused in there, some of the
older tests are quite a mess [when it comes to naming]. E.g, there
does actually look to be some really basic testing of the properties
file stuff in o.a.q.test.unit.jndi.

Robbie

On 3 May 2012 16:35, Weston M. Price <wp...@redhat.com> wrote:
> Hi Robbie,
>        Thanks for the clarification. I was confused as there were other tests that didn't match the module, but I will go with your suggestion.
>
> Regards,
>
> Weston
> On May 3, 2012, at 11:31 AM, Robbie Gemmell wrote:
>
>> Unit tests for a class in <module_x> should generally live in
>> <module_x>/src/test/<etc to match the implementation class package>,
>> so for PropertiesFileInitialContextFactory we would usually go for:
>>
>> java/client/src/test/java/org/apache/qpid/jndi/PropertiesFileInitialContextFactoryTest.java
>>
>> Robbie
>>
>> On 3 May 2012 16:18, Weston M. Price <wp...@redhat.com> wrote:
>>> I have a fix for https://issues.apache.org/jira/browse/QPID-3971. The fix is fairly simple, but I wanted to create a unit test for the PropertiesFileInitialContextFactory as we don't seem to have one. I am sort of confused about where the appropriate test for this should go. Looking at the tree, and since this doesn't actually require Broker connectivity, my best guess would be in:
>>>
>>> java/client/src/test/java/org/apache/qpid/client
>>>
>>> I would create a jndi directory and the test. The class itself lives in the client code so this would seem to make sense.
>>>
>>> Thoughts?
>>>
>>> Regards,
>>>
>>> Weston
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
>>> For additional commands, e-mail: dev-help@qpid.apache.org
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
>> For additional commands, e-mail: dev-help@qpid.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
> For additional commands, e-mail: dev-help@qpid.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org


Re: Unit Test Question

Posted by "Weston M. Price" <wp...@redhat.com>.
Hi Robbie,
	Thanks for the clarification. I was confused as there were other tests that didn't match the module, but I will go with your suggestion. 

Regards,

Weston
On May 3, 2012, at 11:31 AM, Robbie Gemmell wrote:

> Unit tests for a class in <module_x> should generally live in
> <module_x>/src/test/<etc to match the implementation class package>,
> so for PropertiesFileInitialContextFactory we would usually go for:
> 
> java/client/src/test/java/org/apache/qpid/jndi/PropertiesFileInitialContextFactoryTest.java
> 
> Robbie
> 
> On 3 May 2012 16:18, Weston M. Price <wp...@redhat.com> wrote:
>> I have a fix for https://issues.apache.org/jira/browse/QPID-3971. The fix is fairly simple, but I wanted to create a unit test for the PropertiesFileInitialContextFactory as we don't seem to have one. I am sort of confused about where the appropriate test for this should go. Looking at the tree, and since this doesn't actually require Broker connectivity, my best guess would be in:
>> 
>> java/client/src/test/java/org/apache/qpid/client
>> 
>> I would create a jndi directory and the test. The class itself lives in the client code so this would seem to make sense.
>> 
>> Thoughts?
>> 
>> Regards,
>> 
>> Weston
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
>> For additional commands, e-mail: dev-help@qpid.apache.org
>> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
> For additional commands, e-mail: dev-help@qpid.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org


Re: Unit Test Question

Posted by Robbie Gemmell <ro...@gmail.com>.
Unit tests for a class in <module_x> should generally live in
<module_x>/src/test/<etc to match the implementation class package>,
so for PropertiesFileInitialContextFactory we would usually go for:

java/client/src/test/java/org/apache/qpid/jndi/PropertiesFileInitialContextFactoryTest.java

Robbie

On 3 May 2012 16:18, Weston M. Price <wp...@redhat.com> wrote:
> I have a fix for https://issues.apache.org/jira/browse/QPID-3971. The fix is fairly simple, but I wanted to create a unit test for the PropertiesFileInitialContextFactory as we don't seem to have one. I am sort of confused about where the appropriate test for this should go. Looking at the tree, and since this doesn't actually require Broker connectivity, my best guess would be in:
>
> java/client/src/test/java/org/apache/qpid/client
>
> I would create a jndi directory and the test. The class itself lives in the client code so this would seem to make sense.
>
> Thoughts?
>
> Regards,
>
> Weston
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
> For additional commands, e-mail: dev-help@qpid.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org