You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-dev@hadoop.apache.org by "Yoram Kulbak (JIRA)" <ji...@apache.org> on 2008/09/29 00:54:45 UTC

[jira] Created: (HADOOP-4297) Enable Java assertions when running tests

Enable Java assertions when running tests
-----------------------------------------

                 Key: HADOOP-4297
                 URL: https://issues.apache.org/jira/browse/HADOOP-4297
             Project: Hadoop Core
          Issue Type: Improvement
          Components: build
    Affects Versions: 0.19.0, 0.20.0
            Reporter: Yoram Kulbak


A suggestion to enable Java assertions in the project's build xml when running tests. I think this would improve the build quality.
To enable assertions add the following snippets to the JUnit tasks in build.xml:

<assertions>
     <enable />
</assertions>

--
For example:

<junit ... >
     ...
    <assertions>
        <enable />
    </assertions>
</junit>

 

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


[jira] Commented: (HADOOP-4297) Enable Java assertions when running tests

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

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

> is there a way (through command line parameters) to run the unit tests without assertions enabled?
I think we should add an option to "ant test" for enabling/disabling assert.

> Enable Java assertions when running tests
> -----------------------------------------
>
>                 Key: HADOOP-4297
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4297
>             Project: Hadoop Core
>          Issue Type: Improvement
>          Components: build
>    Affects Versions: 0.19.0, 0.20.0
>            Reporter: Yoram Kulbak
>             Fix For: 0.20.0
>
>         Attachments: HADOOP-4297.patch, HADOOP-4297.patch
>
>
> A suggestion to enable Java assertions in the project's build xml when running tests. I think this would improve the build quality.
> To enable assertions add the following snippets to the JUnit tasks in build.xml:
> <assertions>
>      <enable />
> </assertions>
> --
> For example:
> <junit ... >
>      ...
>     <assertions>
>         <enable />
>     </assertions>
> </junit>
>  

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


[jira] Commented: (HADOOP-4297) Enable Java assertions when running tests

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

Doug Cutting commented on HADOOP-4297:
--------------------------------------

Should we worry about assertions with inadvertent side-effects?  If they do, there's the chance that tests will succeed with assertions enabled and fail when they're disabled.  Perhaps the final release build instructions should disable assertions?  Or am I being too paranoid?


> Enable Java assertions when running tests
> -----------------------------------------
>
>                 Key: HADOOP-4297
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4297
>             Project: Hadoop Core
>          Issue Type: Improvement
>          Components: build
>    Affects Versions: 0.19.0, 0.20.0
>            Reporter: Yoram Kulbak
>             Fix For: 0.20.0
>
>         Attachments: HADOOP-4297.patch, HADOOP-4297.patch
>
>
> A suggestion to enable Java assertions in the project's build xml when running tests. I think this would improve the build quality.
> To enable assertions add the following snippets to the JUnit tasks in build.xml:
> <assertions>
>      <enable />
> </assertions>
> --
> For example:
> <junit ... >
>      ...
>     <assertions>
>         <enable />
>     </assertions>
> </junit>
>  

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


[jira] Updated: (HADOOP-4297) Enable Java assertions when running tests

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

dhruba borthakur updated HADOOP-4297:
-------------------------------------

    Attachment: HADOOP-4297.patch

I changed the original patch to apply cleanly on  trunk. Submitting it for HadoopQA tests

> Enable Java assertions when running tests
> -----------------------------------------
>
>                 Key: HADOOP-4297
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4297
>             Project: Hadoop Core
>          Issue Type: Improvement
>          Components: build
>    Affects Versions: 0.19.0, 0.20.0
>            Reporter: Yoram Kulbak
>             Fix For: 0.20.0
>
>         Attachments: HADOOP-4297.patch, HADOOP-4297.patch
>
>
> A suggestion to enable Java assertions in the project's build xml when running tests. I think this would improve the build quality.
> To enable assertions add the following snippets to the JUnit tasks in build.xml:
> <assertions>
>      <enable />
> </assertions>
> --
> For example:
> <junit ... >
>      ...
>     <assertions>
>         <enable />
>     </assertions>
> </junit>
>  

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


[jira] Commented: (HADOOP-4297) Enable Java assertions when running tests

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

Nigel Daley commented on HADOOP-4297:
-------------------------------------

Yoram, can you provide a patch file?  Instructions are here:
http://wiki.apache.org/hadoop/HowToContribute
under "Generating a patch"

Thanks!

> Enable Java assertions when running tests
> -----------------------------------------
>
>                 Key: HADOOP-4297
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4297
>             Project: Hadoop Core
>          Issue Type: Improvement
>          Components: build
>    Affects Versions: 0.19.0, 0.20.0
>            Reporter: Yoram Kulbak
>
> A suggestion to enable Java assertions in the project's build xml when running tests. I think this would improve the build quality.
> To enable assertions add the following snippets to the JUnit tasks in build.xml:
> <assertions>
>      <enable />
> </assertions>
> --
> For example:
> <junit ... >
>      ...
>     <assertions>
>         <enable />
>     </assertions>
> </junit>
>  

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


[jira] Commented: (HADOOP-4297) Enable Java assertions when running tests

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

Hadoop QA commented on HADOOP-4297:
-----------------------------------

-1 overall.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12393978/HADOOP-4297.patch
  against trunk revision 718544.

    +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 tests are needed for 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 Eclipse classpath. The patch retains Eclipse classpath integrity.

    -1 core tests.  The patch failed core unit tests.

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

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

This message is automatically generated.

> Enable Java assertions when running tests
> -----------------------------------------
>
>                 Key: HADOOP-4297
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4297
>             Project: Hadoop Core
>          Issue Type: Improvement
>          Components: build
>    Affects Versions: 0.19.0, 0.20.0
>            Reporter: Yoram Kulbak
>             Fix For: 0.20.0
>
>         Attachments: HADOOP-4297.patch, HADOOP-4297.patch
>
>
> A suggestion to enable Java assertions in the project's build xml when running tests. I think this would improve the build quality.
> To enable assertions add the following snippets to the JUnit tasks in build.xml:
> <assertions>
>      <enable />
> </assertions>
> --
> For example:
> <junit ... >
>      ...
>     <assertions>
>         <enable />
>     </assertions>
> </junit>
>  

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


[jira] Updated: (HADOOP-4297) Enable Java assertions when running tests

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

dhruba borthakur updated HADOOP-4297:
-------------------------------------

    Status: Open  (was: Patch Available)

> Enable Java assertions when running tests
> -----------------------------------------
>
>                 Key: HADOOP-4297
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4297
>             Project: Hadoop Core
>          Issue Type: Improvement
>          Components: build
>    Affects Versions: 0.19.0, 0.20.0
>            Reporter: Yoram Kulbak
>             Fix For: 0.20.0
>
>         Attachments: HADOOP-4297.patch, HADOOP-4297.patch
>
>
> A suggestion to enable Java assertions in the project's build xml when running tests. I think this would improve the build quality.
> To enable assertions add the following snippets to the JUnit tasks in build.xml:
> <assertions>
>      <enable />
> </assertions>
> --
> For example:
> <junit ... >
>      ...
>     <assertions>
>         <enable />
>     </assertions>
> </junit>
>  

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


[jira] Commented: (HADOOP-4297) Enable Java assertions when running tests

Posted by "Owen O'Malley (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-4297?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12635285#action_12635285 ] 

Owen O'Malley commented on HADOOP-4297:
---------------------------------------

+1 for enabling assertions during testing.

> Enable Java assertions when running tests
> -----------------------------------------
>
>                 Key: HADOOP-4297
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4297
>             Project: Hadoop Core
>          Issue Type: Improvement
>          Components: build
>    Affects Versions: 0.19.0, 0.20.0
>            Reporter: Yoram Kulbak
>
> A suggestion to enable Java assertions in the project's build xml when running tests. I think this would improve the build quality.
> To enable assertions add the following snippets to the JUnit tasks in build.xml:
> <assertions>
>      <enable />
> </assertions>
> --
> For example:
> <junit ... >
>      ...
>     <assertions>
>         <enable />
>     </assertions>
> </junit>
>  

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


[jira] Commented: (HADOOP-4297) Enable Java assertions when running tests

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

dhruba borthakur commented on HADOOP-4297:
------------------------------------------

Once this patch is commited, is there a way (through command line parameters) to run the unit tests without assertions enabled? I agree with Doug that we should run unit tests without assertions enabled for a build that is targeted as a release candidate.

> Enable Java assertions when running tests
> -----------------------------------------
>
>                 Key: HADOOP-4297
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4297
>             Project: Hadoop Core
>          Issue Type: Improvement
>          Components: build
>    Affects Versions: 0.19.0, 0.20.0
>            Reporter: Yoram Kulbak
>             Fix For: 0.20.0
>
>         Attachments: HADOOP-4297.patch, HADOOP-4297.patch
>
>
> A suggestion to enable Java assertions in the project's build xml when running tests. I think this would improve the build quality.
> To enable assertions add the following snippets to the JUnit tasks in build.xml:
> <assertions>
>      <enable />
> </assertions>
> --
> For example:
> <junit ... >
>      ...
>     <assertions>
>         <enable />
>     </assertions>
> </junit>
>  

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


[jira] Commented: (HADOOP-4297) Enable Java assertions when running tests

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

dhruba borthakur commented on HADOOP-4297:
------------------------------------------

TestBalancer failed beucase of this one:

java.lang.AssertionError: Mismatched number of datanodes
	at org.apache.hadoop.hdfs.server.balancer.Balancer.chooseNodes(Balancer.java:1009)
	at org.apache.hadoop.hdfs.server.balancer.Balancer.run(Balancer.java:1407)
	at org.apache.hadoop.hdfs.server.balancer.TestBalancer.runBalancer(TestBalancer.java:233)
	at org.apache.hadoop.hdfs.server.balancer.TestBalancer.test(TestBalancer.java:220)
	at org.apache.hadoop.hdfs.server.balancer.TestBalancer.testBalancer0(TestBalancer.java:262)

TestCheckpiont failed :

java.lang.AssertionError: Negative layout version is expected.
	at org.apache.hadoop.hdfs.server.namenode.FSImage.loadFSImage(FSImage.java:804)
	at org.apache.hadoop.hdfs.server.namenode.SecondaryNameNode$CheckpointStorage.doMerge(SecondaryNameNode.java:589)
	at org.apache.hadoop.hdfs.server.namenode.SecondaryNameNode$CheckpointStorage.access$000(SecondaryNameNode.java:473)
	at org.apache.hadoop.hdfs.server.namenode.SecondaryNameNode.doMerge(SecondaryNameNode.java:350)
	at org.apache.hadoop.hdfs.server.namenode.SecondaryNameNode.doCheckpoint(SecondaryNameNode.java:314)
	at org.apache.hadoop.hdfs.server.namenode.TestCheckpoint.testCheckpoint(TestCheckpoint.java:594)

If somebody ca take a look into these two asserts, that would be great!


> Enable Java assertions when running tests
> -----------------------------------------
>
>                 Key: HADOOP-4297
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4297
>             Project: Hadoop Core
>          Issue Type: Improvement
>          Components: build
>    Affects Versions: 0.19.0, 0.20.0
>            Reporter: Yoram Kulbak
>             Fix For: 0.20.0
>
>         Attachments: HADOOP-4297.patch, HADOOP-4297.patch
>
>
> A suggestion to enable Java assertions in the project's build xml when running tests. I think this would improve the build quality.
> To enable assertions add the following snippets to the JUnit tasks in build.xml:
> <assertions>
>      <enable />
> </assertions>
> --
> For example:
> <junit ... >
>      ...
>     <assertions>
>         <enable />
>     </assertions>
> </junit>
>  

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


[jira] Updated: (HADOOP-4297) Enable Java assertions when running tests

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

dhruba borthakur updated HADOOP-4297:
-------------------------------------

    Fix Version/s: 0.20.0
           Status: Patch Available  (was: Open)

> Enable Java assertions when running tests
> -----------------------------------------
>
>                 Key: HADOOP-4297
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4297
>             Project: Hadoop Core
>          Issue Type: Improvement
>          Components: build
>    Affects Versions: 0.19.0, 0.20.0
>            Reporter: Yoram Kulbak
>             Fix For: 0.20.0
>
>         Attachments: HADOOP-4297.patch, HADOOP-4297.patch
>
>
> A suggestion to enable Java assertions in the project's build xml when running tests. I think this would improve the build quality.
> To enable assertions add the following snippets to the JUnit tasks in build.xml:
> <assertions>
>      <enable />
> </assertions>
> --
> For example:
> <junit ... >
>      ...
>     <assertions>
>         <enable />
>     </assertions>
> </junit>
>  

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


[jira] Updated: (HADOOP-4297) Enable Java assertions when running tests

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

Yoram Kulbak updated HADOOP-4297:
---------------------------------

    Attachment: HADOOP-4297.patch

A patch file as requested.

> Enable Java assertions when running tests
> -----------------------------------------
>
>                 Key: HADOOP-4297
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4297
>             Project: Hadoop Core
>          Issue Type: Improvement
>          Components: build
>    Affects Versions: 0.19.0, 0.20.0
>            Reporter: Yoram Kulbak
>         Attachments: HADOOP-4297.patch
>
>
> A suggestion to enable Java assertions in the project's build xml when running tests. I think this would improve the build quality.
> To enable assertions add the following snippets to the JUnit tasks in build.xml:
> <assertions>
>      <enable />
> </assertions>
> --
> For example:
> <junit ... >
>      ...
>     <assertions>
>         <enable />
>     </assertions>
> </junit>
>  

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