You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by he...@apache.org on 2013/10/24 09:53:38 UTC

svn commit: r1535297 - in /commons/proper/configuration/branches/RELEASE_1_10_BRANCH: NOTICE.txt build.properties.sample build.xml pom.xml src/site/resources/profile.cobertura src/test/java/org/apache/commons/configuration/TestDataConfiguration.java

Author: henning
Date: Thu Oct 24 07:53:37 2013
New Revision: 1535297

URL: http://svn.apache.org/r1535297
Log:
Feedback from RC1.


Added:
    commons/proper/configuration/branches/RELEASE_1_10_BRANCH/src/site/resources/profile.cobertura
Removed:
    commons/proper/configuration/branches/RELEASE_1_10_BRANCH/build.properties.sample
    commons/proper/configuration/branches/RELEASE_1_10_BRANCH/build.xml
Modified:
    commons/proper/configuration/branches/RELEASE_1_10_BRANCH/NOTICE.txt
    commons/proper/configuration/branches/RELEASE_1_10_BRANCH/pom.xml
    commons/proper/configuration/branches/RELEASE_1_10_BRANCH/src/test/java/org/apache/commons/configuration/TestDataConfiguration.java

Modified: commons/proper/configuration/branches/RELEASE_1_10_BRANCH/NOTICE.txt
URL: http://svn.apache.org/viewvc/commons/proper/configuration/branches/RELEASE_1_10_BRANCH/NOTICE.txt?rev=1535297&r1=1535296&r2=1535297&view=diff
==============================================================================
--- commons/proper/configuration/branches/RELEASE_1_10_BRANCH/NOTICE.txt (original)
+++ commons/proper/configuration/branches/RELEASE_1_10_BRANCH/NOTICE.txt Thu Oct 24 07:53:37 2013
@@ -1,5 +1,5 @@
 Apache Commons Configuration
 Copyright 2001-2013 The Apache Software Foundation
 
-This product includes software developed by
+This product includes software developed at
 The Apache Software Foundation (http://www.apache.org/).

Modified: commons/proper/configuration/branches/RELEASE_1_10_BRANCH/pom.xml
URL: http://svn.apache.org/viewvc/commons/proper/configuration/branches/RELEASE_1_10_BRANCH/pom.xml?rev=1535297&r1=1535296&r2=1535297&view=diff
==============================================================================
--- commons/proper/configuration/branches/RELEASE_1_10_BRANCH/pom.xml (original)
+++ commons/proper/configuration/branches/RELEASE_1_10_BRANCH/pom.xml Thu Oct 24 07:53:37 2013
@@ -668,11 +668,6 @@
       </plugin>
       <plugin>
         <groupId>org.codehaus.mojo</groupId>
-        <artifactId>cobertura-maven-plugin</artifactId>
-        <version>${commons.cobertura.version}</version>
-      </plugin>
-      <plugin>
-        <groupId>org.codehaus.mojo</groupId>
         <artifactId>clirr-maven-plugin</artifactId>
         <version>${commons.clirr.version}</version>
         <configuration>

Added: commons/proper/configuration/branches/RELEASE_1_10_BRANCH/src/site/resources/profile.cobertura
URL: http://svn.apache.org/viewvc/commons/proper/configuration/branches/RELEASE_1_10_BRANCH/src/site/resources/profile.cobertura?rev=1535297&view=auto
==============================================================================
    (empty)

Modified: commons/proper/configuration/branches/RELEASE_1_10_BRANCH/src/test/java/org/apache/commons/configuration/TestDataConfiguration.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/branches/RELEASE_1_10_BRANCH/src/test/java/org/apache/commons/configuration/TestDataConfiguration.java?rev=1535297&r1=1535296&r2=1535297&view=diff
==============================================================================
--- commons/proper/configuration/branches/RELEASE_1_10_BRANCH/src/test/java/org/apache/commons/configuration/TestDataConfiguration.java (original)
+++ commons/proper/configuration/branches/RELEASE_1_10_BRANCH/src/test/java/org/apache/commons/configuration/TestDataConfiguration.java Thu Oct 24 07:53:37 2013
@@ -1711,7 +1711,7 @@ public class TestDataConfiguration
     @Test(expected = ConversionException.class)
     public void testGetInetAddressInvalidType()
     {
-        conf.setProperty("ip.unknownhost", "foo");
+        conf.setProperty("ip.unknownhost", "random-foo-that-does-not-exist.ever");
         conf.get(InetAddress.class, "ip.unknownhost");
     }
 



Re: svn commit: r1535297 - in /commons/proper/configuration/branches/RELEASE_1_10_BRANCH: NOTICE.txt build.properties.sample build.xml pom.xml src/site/resources/profile.cobertura src/test/java/org/apache/commons/configuration/TestDataConfiguration.java

Posted by sebb <se...@gmail.com>.
On 25 October 2013 06:51, Thomas Neidhart <th...@gmail.com> wrote:
> On 10/25/2013 01:35 AM, sebb wrote:
>> On 24 October 2013 08:53,  <he...@apache.org> wrote:

Snip

>>> @@ -1711,7 +1711,7 @@ public class TestDataConfiguration
>>>      @Test(expected = ConversionException.class)
>>>      public void testGetInetAddressInvalidType()
>>>      {
>>> -        conf.setProperty("ip.unknownhost", "foo");
>>> +        conf.setProperty("ip.unknownhost", "random-foo-that-does-not-exist.ever");
>>
>> That's not guaranteed to never exist.
>>
>> However, the TLD "invalid" is specifically designed for such a purpose.
>>
>> i.e. use conf.setProperty("ip.unknownhost", "foo.invalid");
>
> I would not rely on that in every environment.
> For commons-email we had certain tests fail because some providers still
> resolved this name to something.

It's true that OpenDNS used to resolve this to their web server (as
for any other non-existent domain).
However, they have now finally fixed the behaviour to be RFC-compliant.

I still think it's better to use the correct TLD for testing
That may possibly cause the test to fail with some misbehaving DNS
providers, but won't fail everywhere.
Whereas if the random host name is ever defined, it will fail everywhere.

> So if you have a test that relies on an exception if you want to open a
> stream to the invalid host better mock that behavior in your test.

That may be another approach, depending on what is being tested.

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


Re: svn commit: r1535297 - in /commons/proper/configuration/branches/RELEASE_1_10_BRANCH: NOTICE.txt build.properties.sample build.xml pom.xml src/site/resources/profile.cobertura src/test/java/org/apache/commons/configuration/TestDataConfiguration.java

Posted by Thomas Neidhart <th...@gmail.com>.
On 10/25/2013 01:35 AM, sebb wrote:
> On 24 October 2013 08:53,  <he...@apache.org> wrote:
>> Author: henning
>> Date: Thu Oct 24 07:53:37 2013
>> New Revision: 1535297
>>
>> URL: http://svn.apache.org/r1535297
>> Log:
>> Feedback from RC1.
>>
>>
>> Added:
>>     commons/proper/configuration/branches/RELEASE_1_10_BRANCH/src/site/resources/profile.cobertura
>> Removed:
>>     commons/proper/configuration/branches/RELEASE_1_10_BRANCH/build.properties.sample
>>     commons/proper/configuration/branches/RELEASE_1_10_BRANCH/build.xml
>> Modified:
>>     commons/proper/configuration/branches/RELEASE_1_10_BRANCH/NOTICE.txt
>>     commons/proper/configuration/branches/RELEASE_1_10_BRANCH/pom.xml
>>     commons/proper/configuration/branches/RELEASE_1_10_BRANCH/src/test/java/org/apache/commons/configuration/TestDataConfiguration.java
>>
>> Modified: commons/proper/configuration/branches/RELEASE_1_10_BRANCH/NOTICE.txt
>> URL: http://svn.apache.org/viewvc/commons/proper/configuration/branches/RELEASE_1_10_BRANCH/NOTICE.txt?rev=1535297&r1=1535296&r2=1535297&view=diff
>> ==============================================================================
>> --- commons/proper/configuration/branches/RELEASE_1_10_BRANCH/NOTICE.txt (original)
>> +++ commons/proper/configuration/branches/RELEASE_1_10_BRANCH/NOTICE.txt Thu Oct 24 07:53:37 2013
>> @@ -1,5 +1,5 @@
>>  Apache Commons Configuration
>>  Copyright 2001-2013 The Apache Software Foundation
>>
>> -This product includes software developed by
>> +This product includes software developed at
>>  The Apache Software Foundation (http://www.apache.org/).
>>
>> Modified: commons/proper/configuration/branches/RELEASE_1_10_BRANCH/pom.xml
>> URL: http://svn.apache.org/viewvc/commons/proper/configuration/branches/RELEASE_1_10_BRANCH/pom.xml?rev=1535297&r1=1535296&r2=1535297&view=diff
>> ==============================================================================
>> --- commons/proper/configuration/branches/RELEASE_1_10_BRANCH/pom.xml (original)
>> +++ commons/proper/configuration/branches/RELEASE_1_10_BRANCH/pom.xml Thu Oct 24 07:53:37 2013
>> @@ -668,11 +668,6 @@
>>        </plugin>
>>        <plugin>
>>          <groupId>org.codehaus.mojo</groupId>
>> -        <artifactId>cobertura-maven-plugin</artifactId>
>> -        <version>${commons.cobertura.version}</version>
>> -      </plugin>
>> -      <plugin>
>> -        <groupId>org.codehaus.mojo</groupId>
>>          <artifactId>clirr-maven-plugin</artifactId>
>>          <version>${commons.clirr.version}</version>
>>          <configuration>
>>
>> Added: commons/proper/configuration/branches/RELEASE_1_10_BRANCH/src/site/resources/profile.cobertura
>> URL: http://svn.apache.org/viewvc/commons/proper/configuration/branches/RELEASE_1_10_BRANCH/src/site/resources/profile.cobertura?rev=1535297&view=auto
>> ==============================================================================
>>     (empty)
>>
>> Modified: commons/proper/configuration/branches/RELEASE_1_10_BRANCH/src/test/java/org/apache/commons/configuration/TestDataConfiguration.java
>> URL: http://svn.apache.org/viewvc/commons/proper/configuration/branches/RELEASE_1_10_BRANCH/src/test/java/org/apache/commons/configuration/TestDataConfiguration.java?rev=1535297&r1=1535296&r2=1535297&view=diff
>> ==============================================================================
>> --- commons/proper/configuration/branches/RELEASE_1_10_BRANCH/src/test/java/org/apache/commons/configuration/TestDataConfiguration.java (original)
>> +++ commons/proper/configuration/branches/RELEASE_1_10_BRANCH/src/test/java/org/apache/commons/configuration/TestDataConfiguration.java Thu Oct 24 07:53:37 2013
>> @@ -1711,7 +1711,7 @@ public class TestDataConfiguration
>>      @Test(expected = ConversionException.class)
>>      public void testGetInetAddressInvalidType()
>>      {
>> -        conf.setProperty("ip.unknownhost", "foo");
>> +        conf.setProperty("ip.unknownhost", "random-foo-that-does-not-exist.ever");
> 
> That's not guaranteed to never exist.
> 
> However, the TLD "invalid" is specifically designed for such a purpose.
> 
> i.e. use conf.setProperty("ip.unknownhost", "foo.invalid");

I would not rely on that in every environment.
For commons-email we had certain tests fail because some providers still
resolved this name to something.

So if you have a test that relies on an exception if you want to open a
stream to the invalid host better mock that behavior in your test.

Thomas

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


Re: svn commit: r1535297 - in /commons/proper/configuration/branches/RELEASE_1_10_BRANCH: NOTICE.txt build.properties.sample build.xml pom.xml src/site/resources/profile.cobertura src/test/java/org/apache/commons/configuration/TestDataConfiguration.java

Posted by sebb <se...@gmail.com>.
On 24 October 2013 08:53,  <he...@apache.org> wrote:
> Author: henning
> Date: Thu Oct 24 07:53:37 2013
> New Revision: 1535297
>
> URL: http://svn.apache.org/r1535297
> Log:
> Feedback from RC1.
>
>
> Added:
>     commons/proper/configuration/branches/RELEASE_1_10_BRANCH/src/site/resources/profile.cobertura
> Removed:
>     commons/proper/configuration/branches/RELEASE_1_10_BRANCH/build.properties.sample
>     commons/proper/configuration/branches/RELEASE_1_10_BRANCH/build.xml
> Modified:
>     commons/proper/configuration/branches/RELEASE_1_10_BRANCH/NOTICE.txt
>     commons/proper/configuration/branches/RELEASE_1_10_BRANCH/pom.xml
>     commons/proper/configuration/branches/RELEASE_1_10_BRANCH/src/test/java/org/apache/commons/configuration/TestDataConfiguration.java
>
> Modified: commons/proper/configuration/branches/RELEASE_1_10_BRANCH/NOTICE.txt
> URL: http://svn.apache.org/viewvc/commons/proper/configuration/branches/RELEASE_1_10_BRANCH/NOTICE.txt?rev=1535297&r1=1535296&r2=1535297&view=diff
> ==============================================================================
> --- commons/proper/configuration/branches/RELEASE_1_10_BRANCH/NOTICE.txt (original)
> +++ commons/proper/configuration/branches/RELEASE_1_10_BRANCH/NOTICE.txt Thu Oct 24 07:53:37 2013
> @@ -1,5 +1,5 @@
>  Apache Commons Configuration
>  Copyright 2001-2013 The Apache Software Foundation
>
> -This product includes software developed by
> +This product includes software developed at
>  The Apache Software Foundation (http://www.apache.org/).
>
> Modified: commons/proper/configuration/branches/RELEASE_1_10_BRANCH/pom.xml
> URL: http://svn.apache.org/viewvc/commons/proper/configuration/branches/RELEASE_1_10_BRANCH/pom.xml?rev=1535297&r1=1535296&r2=1535297&view=diff
> ==============================================================================
> --- commons/proper/configuration/branches/RELEASE_1_10_BRANCH/pom.xml (original)
> +++ commons/proper/configuration/branches/RELEASE_1_10_BRANCH/pom.xml Thu Oct 24 07:53:37 2013
> @@ -668,11 +668,6 @@
>        </plugin>
>        <plugin>
>          <groupId>org.codehaus.mojo</groupId>
> -        <artifactId>cobertura-maven-plugin</artifactId>
> -        <version>${commons.cobertura.version}</version>
> -      </plugin>
> -      <plugin>
> -        <groupId>org.codehaus.mojo</groupId>
>          <artifactId>clirr-maven-plugin</artifactId>
>          <version>${commons.clirr.version}</version>
>          <configuration>
>
> Added: commons/proper/configuration/branches/RELEASE_1_10_BRANCH/src/site/resources/profile.cobertura
> URL: http://svn.apache.org/viewvc/commons/proper/configuration/branches/RELEASE_1_10_BRANCH/src/site/resources/profile.cobertura?rev=1535297&view=auto
> ==============================================================================
>     (empty)
>
> Modified: commons/proper/configuration/branches/RELEASE_1_10_BRANCH/src/test/java/org/apache/commons/configuration/TestDataConfiguration.java
> URL: http://svn.apache.org/viewvc/commons/proper/configuration/branches/RELEASE_1_10_BRANCH/src/test/java/org/apache/commons/configuration/TestDataConfiguration.java?rev=1535297&r1=1535296&r2=1535297&view=diff
> ==============================================================================
> --- commons/proper/configuration/branches/RELEASE_1_10_BRANCH/src/test/java/org/apache/commons/configuration/TestDataConfiguration.java (original)
> +++ commons/proper/configuration/branches/RELEASE_1_10_BRANCH/src/test/java/org/apache/commons/configuration/TestDataConfiguration.java Thu Oct 24 07:53:37 2013
> @@ -1711,7 +1711,7 @@ public class TestDataConfiguration
>      @Test(expected = ConversionException.class)
>      public void testGetInetAddressInvalidType()
>      {
> -        conf.setProperty("ip.unknownhost", "foo");
> +        conf.setProperty("ip.unknownhost", "random-foo-that-does-not-exist.ever");

That's not guaranteed to never exist.

However, the TLD "invalid" is specifically designed for such a purpose.

i.e. use conf.setProperty("ip.unknownhost", "foo.invalid");

>          conf.get(InetAddress.class, "ip.unknownhost");
>      }
>
>
>

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