You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by wp...@apache.org on 2012/05/03 23:54:29 UTC

svn commit: r1333645 - /qpid/trunk/qpid/java/client/src/test/java/org/apache/qpid/jndi/PropertiesFileInitialContextFactoryTest.java

Author: wprice
Date: Thu May  3 21:54:29 2012
New Revision: 1333645

URL: http://svn.apache.org/viewvc?rev=1333645&view=rev
Log:
QPID-3791: PropertiesFileInitialContextFactory cannot open file URL
    *Removing new test for now as absolute file path is not working on
    test machine
    *Excludes mechanism did not work to remove a single test, or the
    entire class
    *Will rework

Modified:
    qpid/trunk/qpid/java/client/src/test/java/org/apache/qpid/jndi/PropertiesFileInitialContextFactoryTest.java

Modified: qpid/trunk/qpid/java/client/src/test/java/org/apache/qpid/jndi/PropertiesFileInitialContextFactoryTest.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/client/src/test/java/org/apache/qpid/jndi/PropertiesFileInitialContextFactoryTest.java?rev=1333645&r1=1333644&r2=1333645&view=diff
==============================================================================
--- qpid/trunk/qpid/java/client/src/test/java/org/apache/qpid/jndi/PropertiesFileInitialContextFactoryTest.java (original)
+++ qpid/trunk/qpid/java/client/src/test/java/org/apache/qpid/jndi/PropertiesFileInitialContextFactoryTest.java Thu May  3 21:54:29 2012
@@ -51,25 +51,6 @@ public class PropertiesFileInitialContex
         ctx = new InitialContext(properties);
     }
 
-    public void testInitialContextProviderURL() throws Exception
-    {
-        Destination d = null;
-
-        System.setProperty("java.naming.factory.initial", "org.apache.qpid.jndi.PropertiesFileInitialContextFactory");
-        System.setProperty("java.naming.provider.url",  FILE_URL_PATH + FILE_NAME);
-
-        InitialContext ctx = new InitialContext();
-        d = (Destination)ctx.lookup("topicExchange");
-        assertNotNull("Lookup for Destination from file path should not be null", d);
-
-        ctx.close();
-
-        System.setProperty("java.naming.provider.url", "file:///" + FILE_URL_PATH + FILE_NAME);
-
-        ctx = new InitialContext();
-        d = (Destination)ctx.lookup("topicExchange");
-        assertNotNull("Lookup for Destination from file URI should not be null", d);
-    }
 
     public void testQueueNamesWithTrailingSpaces() throws Exception
     {



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


Re: svn commit: r1333645 - /qpid/trunk/qpid/java/client/src/test/java/org/apache/qpid/jndi/PropertiesFileInitialContextFactoryTest.java

Posted by "Weston M. Price" <wp...@redhat.com>.
Thanks Robbie. I agree on the temp file solution as well. 

Regards,

Weston
On May 4, 2012, at 4:45 AM, Robbie Gemmell wrote:

> You need to subclass QpidTestCase rather than just TestCase in order
> to use the excludes functionality. As for the underlying issue, I
> guess trying to use a new temporary file as the source is probably the
> likely solution to avoiding the path issues.
> 
> Robbie
> 
> On 3 May 2012 22:54,  <wp...@apache.org> wrote:
>> Author: wprice
>> Date: Thu May  3 21:54:29 2012
>> New Revision: 1333645
>> 
>> URL: http://svn.apache.org/viewvc?rev=1333645&view=rev
>> Log:
>> QPID-3791: PropertiesFileInitialContextFactory cannot open file URL
>>    *Removing new test for now as absolute file path is not working on
>>    test machine
>>    *Excludes mechanism did not work to remove a single test, or the
>>    entire class
>>    *Will rework
>> 
>> Modified:
>>    qpid/trunk/qpid/java/client/src/test/java/org/apache/qpid/jndi/PropertiesFileInitialContextFactoryTest.java
>> 
>> Modified: qpid/trunk/qpid/java/client/src/test/java/org/apache/qpid/jndi/PropertiesFileInitialContextFactoryTest.java
>> URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/client/src/test/java/org/apache/qpid/jndi/PropertiesFileInitialContextFactoryTest.java?rev=1333645&r1=1333644&r2=1333645&view=diff
>> ==============================================================================
>> --- qpid/trunk/qpid/java/client/src/test/java/org/apache/qpid/jndi/PropertiesFileInitialContextFactoryTest.java (original)
>> +++ qpid/trunk/qpid/java/client/src/test/java/org/apache/qpid/jndi/PropertiesFileInitialContextFactoryTest.java Thu May  3 21:54:29 2012
>> @@ -51,25 +51,6 @@ public class PropertiesFileInitialContex
>>         ctx = new InitialContext(properties);
>>     }
>> 
>> -    public void testInitialContextProviderURL() throws Exception
>> -    {
>> -        Destination d = null;
>> -
>> -        System.setProperty("java.naming.factory.initial", "org.apache.qpid.jndi.PropertiesFileInitialContextFactory");
>> -        System.setProperty("java.naming.provider.url",  FILE_URL_PATH + FILE_NAME);
>> -
>> -        InitialContext ctx = new InitialContext();
>> -        d = (Destination)ctx.lookup("topicExchange");
>> -        assertNotNull("Lookup for Destination from file path should not be null", d);
>> -
>> -        ctx.close();
>> -
>> -        System.setProperty("java.naming.provider.url", "file:///" + FILE_URL_PATH + FILE_NAME);
>> -
>> -        ctx = new InitialContext();
>> -        d = (Destination)ctx.lookup("topicExchange");
>> -        assertNotNull("Lookup for Destination from file URI should not be null", d);
>> -    }
>> 
>>     public void testQueueNamesWithTrailingSpaces() throws Exception
>>     {
>> 
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
>> For additional commands, e-mail: commits-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: svn commit: r1333645 - /qpid/trunk/qpid/java/client/src/test/java/org/apache/qpid/jndi/PropertiesFileInitialContextFactoryTest.java

Posted by Robbie Gemmell <ro...@gmail.com>.
You need to subclass QpidTestCase rather than just TestCase in order
to use the excludes functionality. As for the underlying issue, I
guess trying to use a new temporary file as the source is probably the
likely solution to avoiding the path issues.

Robbie

On 3 May 2012 22:54,  <wp...@apache.org> wrote:
> Author: wprice
> Date: Thu May  3 21:54:29 2012
> New Revision: 1333645
>
> URL: http://svn.apache.org/viewvc?rev=1333645&view=rev
> Log:
> QPID-3791: PropertiesFileInitialContextFactory cannot open file URL
>    *Removing new test for now as absolute file path is not working on
>    test machine
>    *Excludes mechanism did not work to remove a single test, or the
>    entire class
>    *Will rework
>
> Modified:
>    qpid/trunk/qpid/java/client/src/test/java/org/apache/qpid/jndi/PropertiesFileInitialContextFactoryTest.java
>
> Modified: qpid/trunk/qpid/java/client/src/test/java/org/apache/qpid/jndi/PropertiesFileInitialContextFactoryTest.java
> URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/client/src/test/java/org/apache/qpid/jndi/PropertiesFileInitialContextFactoryTest.java?rev=1333645&r1=1333644&r2=1333645&view=diff
> ==============================================================================
> --- qpid/trunk/qpid/java/client/src/test/java/org/apache/qpid/jndi/PropertiesFileInitialContextFactoryTest.java (original)
> +++ qpid/trunk/qpid/java/client/src/test/java/org/apache/qpid/jndi/PropertiesFileInitialContextFactoryTest.java Thu May  3 21:54:29 2012
> @@ -51,25 +51,6 @@ public class PropertiesFileInitialContex
>         ctx = new InitialContext(properties);
>     }
>
> -    public void testInitialContextProviderURL() throws Exception
> -    {
> -        Destination d = null;
> -
> -        System.setProperty("java.naming.factory.initial", "org.apache.qpid.jndi.PropertiesFileInitialContextFactory");
> -        System.setProperty("java.naming.provider.url",  FILE_URL_PATH + FILE_NAME);
> -
> -        InitialContext ctx = new InitialContext();
> -        d = (Destination)ctx.lookup("topicExchange");
> -        assertNotNull("Lookup for Destination from file path should not be null", d);
> -
> -        ctx.close();
> -
> -        System.setProperty("java.naming.provider.url", "file:///" + FILE_URL_PATH + FILE_NAME);
> -
> -        ctx = new InitialContext();
> -        d = (Destination)ctx.lookup("topicExchange");
> -        assertNotNull("Lookup for Destination from file URI should not be null", d);
> -    }
>
>     public void testQueueNamesWithTrailingSpaces() throws Exception
>     {
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
> For additional commands, e-mail: commits-help@qpid.apache.org
>

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