You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Eli Collins (JIRA)" <ji...@apache.org> on 2009/10/12 18:59:31 UTC

[jira] Created: (HADOOP-6309) Enable asserts for tests by default

Enable asserts for tests by default
-----------------------------------

                 Key: HADOOP-6309
                 URL: https://issues.apache.org/jira/browse/HADOOP-6309
             Project: Hadoop Common
          Issue Type: Test
            Reporter: Eli Collins


What do people think of making the tests run with java asserts enabled by default?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HADOOP-6309) Enable asserts for tests by default

Posted by "Konstantin Shvachko (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-6309?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12764759#action_12764759 ] 

Konstantin Shvachko commented on HADOOP-6309:
---------------------------------------------

This would be very useful. I found several bugs running tests with asserts. Also in many cases asserts help tests fail early.

> Enable asserts for tests by default
> -----------------------------------
>
>                 Key: HADOOP-6309
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6309
>             Project: Hadoop Common
>          Issue Type: Test
>            Reporter: Eli Collins
>
> What do people think of making the tests run with java asserts enabled by default?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HADOOP-6309) Enable asserts for tests by default

Posted by "Eli Collins (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-6309?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eli Collins updated HADOOP-6309:
--------------------------------

    Status: Patch Available  (was: Open)

Tests run w/o assertion failure on trunk.

> Enable asserts for tests by default
> -----------------------------------
>
>                 Key: HADOOP-6309
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6309
>             Project: Hadoop Common
>          Issue Type: Test
>            Reporter: Eli Collins
>            Assignee: Eli Collins
>         Attachments: hadoop6309-common.patch
>
>
> What do people think of making the tests run with java asserts enabled by default?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HADOOP-6309) Enable asserts for tests by default

Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-6309?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12764859#action_12764859 ] 

Hadoop QA commented on HADOOP-6309:
-----------------------------------

+1 overall.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12421901/hadoop6309-common.patch
  against trunk revision 823756.

    +1 @author.  The patch does not contain any @author tags.

    -1 tests included.  The patch doesn't appear to include any new or modified tests.
                        Please justify why no new tests are needed for this patch.
                        Also please list what manual steps were performed to verify this patch.

    +1 javadoc.  The javadoc tool did not generate any warning messages.

    +1 javac.  The applied patch does not increase the total number of javac compiler warnings.

    +1 findbugs.  The patch does not introduce any new Findbugs warnings.

    +1 release audit.  The applied patch does not increase the total number of release audit warnings.

    +1 core tests.  The patch passed core unit tests.

    +1 contrib tests.  The patch passed contrib unit tests.

Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/83/testReport/
Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/83/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/83/artifact/trunk/build/test/checkstyle-errors.html
Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/83/console

This message is automatically generated.

> Enable asserts for tests by default
> -----------------------------------
>
>                 Key: HADOOP-6309
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6309
>             Project: Hadoop Common
>          Issue Type: Test
>          Components: build
>            Reporter: Eli Collins
>            Assignee: Eli Collins
>         Attachments: hadoop6309-common.patch
>
>
> What do people think of making the tests run with java asserts enabled by default?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HADOOP-6309) Enable asserts for tests by default

Posted by "Eli Collins (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-6309?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12764842#action_12764842 ] 

Eli Collins commented on HADOOP-6309:
-------------------------------------

Thanks Konstantin, filed HDFS-697 and MAPREDUCE-1092.  

Tested the patch attached to this jira by adding an assert false; to Configuration.java and made sure TestConfiguration failed as expected. 

> Enable asserts for tests by default
> -----------------------------------
>
>                 Key: HADOOP-6309
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6309
>             Project: Hadoop Common
>          Issue Type: Test
>            Reporter: Eli Collins
>            Assignee: Eli Collins
>         Attachments: hadoop6309-common.patch
>
>
> What do people think of making the tests run with java asserts enabled by default?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HADOOP-6309) Enable asserts for tests by default

Posted by "Nigel Daley (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-6309?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12764753#action_12764753 ] 

Nigel Daley commented on HADOOP-6309:
-------------------------------------

+1 on the idea.

> Enable asserts for tests by default
> -----------------------------------
>
>                 Key: HADOOP-6309
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6309
>             Project: Hadoop Common
>          Issue Type: Test
>            Reporter: Eli Collins
>
> What do people think of making the tests run with java asserts enabled by default?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HADOOP-6309) Enable asserts for tests by default

Posted by "Tsz Wo (Nicholas), SZE (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-6309?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12764763#action_12764763 ] 

Tsz Wo (Nicholas), SZE commented on HADOOP-6309:
------------------------------------------------

> What do people think of making the tests run with java asserts enabled by default?
+1

> Enable asserts for tests by default
> -----------------------------------
>
>                 Key: HADOOP-6309
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6309
>             Project: Hadoop Common
>          Issue Type: Test
>            Reporter: Eli Collins
>
> What do people think of making the tests run with java asserts enabled by default?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HADOOP-6309) Enable asserts for tests by default

Posted by "Tsz Wo (Nicholas), SZE (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-6309?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tsz Wo (Nicholas), SZE updated HADOOP-6309:
-------------------------------------------

       Resolution: Fixed
    Fix Version/s: 0.22.0
                   0.21.0
           Status: Resolved  (was: Patch Available)

No new tests needed because the patch only changes build.xml.

I have committed this to 0.21 and above.  Thanks, Eli!

> Enable asserts for tests by default
> -----------------------------------
>
>                 Key: HADOOP-6309
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6309
>             Project: Hadoop Common
>          Issue Type: Test
>          Components: build
>            Reporter: Eli Collins
>            Assignee: Eli Collins
>             Fix For: 0.21.0, 0.22.0
>
>         Attachments: hadoop6309-common.patch
>
>
> What do people think of making the tests run with java asserts enabled by default?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HADOOP-6309) Enable asserts for tests by default

Posted by "Todd Lipcon (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-6309?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12764770#action_12764770 ] 

Todd Lipcon commented on HADOOP-6309:
-------------------------------------

Big +1. We should also open a ticket to add asserts in various places where we've shied away from error checking due to performance concerns.

Note that we'll need to fix an assertion failure currently triggered by TestAccessTokenWithDFS before committing the -ea addition.

> Enable asserts for tests by default
> -----------------------------------
>
>                 Key: HADOOP-6309
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6309
>             Project: Hadoop Common
>          Issue Type: Test
>            Reporter: Eli Collins
>
> What do people think of making the tests run with java asserts enabled by default?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HADOOP-6309) Enable asserts for tests by default

Posted by "Eli Collins (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-6309?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12864547#action_12864547 ] 

Eli Collins commented on HADOOP-6309:
-------------------------------------

Per HDFS-697 and MAPREDUCE-1092 should we just enable the asserts as part of the unit tests for now?

> Enable asserts for tests by default
> -----------------------------------
>
>                 Key: HADOOP-6309
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6309
>             Project: Hadoop Common
>          Issue Type: Test
>          Components: build
>            Reporter: Eli Collins
>            Assignee: Eli Collins
>             Fix For: 0.21.0
>
>         Attachments: hadoop6309-common.patch
>
>
> What do people think of making the tests run with java asserts enabled by default?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HADOOP-6309) Enable asserts for tests by default

Posted by "Tsz Wo (Nicholas), SZE (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-6309?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12764876#action_12764876 ] 

Tsz Wo (Nicholas), SZE commented on HADOOP-6309:
------------------------------------------------

How about we commit this to 0.21 and above?  Any thought?

> Enable asserts for tests by default
> -----------------------------------
>
>                 Key: HADOOP-6309
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6309
>             Project: Hadoop Common
>          Issue Type: Test
>          Components: build
>            Reporter: Eli Collins
>            Assignee: Eli Collins
>         Attachments: hadoop6309-common.patch
>
>
> What do people think of making the tests run with java asserts enabled by default?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HADOOP-6309) Enable asserts for tests by default

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-6309?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12765215#action_12765215 ] 

Hudson commented on HADOOP-6309:
--------------------------------

Integrated in Hadoop-Common-trunk-Commit #60 (See [http://hudson.zones.apache.org/hudson/job/Hadoop-Common-trunk-Commit/60/])
    . Change build.xml to run tests with java asserts.  Contributed by Eli Collins


> Enable asserts for tests by default
> -----------------------------------
>
>                 Key: HADOOP-6309
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6309
>             Project: Hadoop Common
>          Issue Type: Test
>          Components: build
>            Reporter: Eli Collins
>            Assignee: Eli Collins
>             Fix For: 0.21.0, 0.22.0
>
>         Attachments: hadoop6309-common.patch
>
>
> What do people think of making the tests run with java asserts enabled by default?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HADOOP-6309) Enable asserts for tests by default

Posted by "Konstantin Boudnik (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-6309?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12764880#action_12764880 ] 

Konstantin Boudnik commented on HADOOP-6309:
--------------------------------------------

Also, for accounting purposes it'd by good to have a comment about {{-1}} in the Hudson's report. It is clear why there's no additional tests in this patch, however later on it will require an extra effort to find out why the patch has been committed with negative rating.

> Enable asserts for tests by default
> -----------------------------------
>
>                 Key: HADOOP-6309
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6309
>             Project: Hadoop Common
>          Issue Type: Test
>          Components: build
>            Reporter: Eli Collins
>            Assignee: Eli Collins
>         Attachments: hadoop6309-common.patch
>
>
> What do people think of making the tests run with java asserts enabled by default?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HADOOP-6309) Enable asserts for tests by default

Posted by "Eli Collins (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-6309?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12864549#action_12864549 ] 

Eli Collins commented on HADOOP-6309:
-------------------------------------

Actually that's what this change did, sorry for the noise.

> Enable asserts for tests by default
> -----------------------------------
>
>                 Key: HADOOP-6309
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6309
>             Project: Hadoop Common
>          Issue Type: Test
>          Components: build
>            Reporter: Eli Collins
>            Assignee: Eli Collins
>             Fix For: 0.21.0
>
>         Attachments: hadoop6309-common.patch
>
>
> What do people think of making the tests run with java asserts enabled by default?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HADOOP-6309) Enable asserts for tests by default

Posted by "Konstantin Boudnik (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-6309?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12764877#action_12764877 ] 

Konstantin Boudnik commented on HADOOP-6309:
--------------------------------------------

You mean get it into the trunk and backport to 0.21? +1

> Enable asserts for tests by default
> -----------------------------------
>
>                 Key: HADOOP-6309
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6309
>             Project: Hadoop Common
>          Issue Type: Test
>          Components: build
>            Reporter: Eli Collins
>            Assignee: Eli Collins
>         Attachments: hadoop6309-common.patch
>
>
> What do people think of making the tests run with java asserts enabled by default?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HADOOP-6309) Enable asserts for tests by default

Posted by "Tsz Wo (Nicholas), SZE (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-6309?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12764895#action_12764895 ] 

Tsz Wo (Nicholas), SZE commented on HADOOP-6309:
------------------------------------------------

> You mean get it into the trunk and backport to 0.21? +1

Exactly.

I will wait until tomorrow before committing this .  See if anyone has comments.

> Enable asserts for tests by default
> -----------------------------------
>
>                 Key: HADOOP-6309
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6309
>             Project: Hadoop Common
>          Issue Type: Test
>          Components: build
>            Reporter: Eli Collins
>            Assignee: Eli Collins
>         Attachments: hadoop6309-common.patch
>
>
> What do people think of making the tests run with java asserts enabled by default?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HADOOP-6309) Enable asserts for tests by default

Posted by "Tsz Wo (Nicholas), SZE (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-6309?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tsz Wo (Nicholas), SZE updated HADOOP-6309:
-------------------------------------------

     Component/s: build
    Hadoop Flags: [Reviewed]

+1 patch looks good.

> Enable asserts for tests by default
> -----------------------------------
>
>                 Key: HADOOP-6309
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6309
>             Project: Hadoop Common
>          Issue Type: Test
>          Components: build
>            Reporter: Eli Collins
>            Assignee: Eli Collins
>         Attachments: hadoop6309-common.patch
>
>
> What do people think of making the tests run with java asserts enabled by default?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (HADOOP-6309) Enable asserts for tests by default

Posted by "Eli Collins (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-6309?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eli Collins reassigned HADOOP-6309:
-----------------------------------

    Assignee: Eli Collins

> Enable asserts for tests by default
> -----------------------------------
>
>                 Key: HADOOP-6309
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6309
>             Project: Hadoop Common
>          Issue Type: Test
>            Reporter: Eli Collins
>            Assignee: Eli Collins
>
> What do people think of making the tests run with java asserts enabled by default?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HADOOP-6309) Enable asserts for tests by default

Posted by "Eli Collins (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-6309?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eli Collins updated HADOOP-6309:
--------------------------------

    Attachment: hadoop6309-common.patch

Attached a patch for enabling java asserts by default for tests in common.  Ran ant test runs w/o assertion failure on trunk@823756. Verified this same change on the hdfs tree running TestAccessTokenWithDFS causes the assert to fire. Will upload patches for hdfs and mapreduce. Lemme know if these need separate jiras, otherwise will post them here.  Will also file jiras for any asserts that fail.

> Enable asserts for tests by default
> -----------------------------------
>
>                 Key: HADOOP-6309
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6309
>             Project: Hadoop Common
>          Issue Type: Test
>            Reporter: Eli Collins
>            Assignee: Eli Collins
>         Attachments: hadoop6309-common.patch
>
>
> What do people think of making the tests run with java asserts enabled by default?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HADOOP-6309) Enable asserts for tests by default

Posted by "Konstantin Boudnik (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-6309?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12764832#action_12764832 ] 

Konstantin Boudnik commented on HADOOP-6309:
--------------------------------------------

Yes, they better have separate JIRAs (being separate projects). And link them all together.

> Enable asserts for tests by default
> -----------------------------------
>
>                 Key: HADOOP-6309
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6309
>             Project: Hadoop Common
>          Issue Type: Test
>            Reporter: Eli Collins
>            Assignee: Eli Collins
>         Attachments: hadoop6309-common.patch
>
>
> What do people think of making the tests run with java asserts enabled by default?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.