You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Matthew F. Dennis (JIRA)" <ji...@apache.org> on 2010/06/17 00:57:25 UTC

[jira] Created: (CASSANDRA-1200) additional BRAF tests

additional BRAF tests
---------------------

                 Key: CASSANDRA-1200
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1200
             Project: Cassandra
          Issue Type: Improvement
    Affects Versions: 0.7
            Reporter: Matthew F. Dennis
            Assignee: Matthew F. Dennis
            Priority: Minor
             Fix For: 0.7


In comments/IRC there was some concern about BRAF.readFully() raising EOFException when appropriate

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


[jira] Updated: (CASSANDRA-1200) additional BRAF tests

Posted by "Matthew F. Dennis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-1200?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matthew F. Dennis updated CASSANDRA-1200:
-----------------------------------------

    Attachment: trunk-1200.txt

I don't think that statement says anything about the expected behavior when a request to read more bytes than will fit into the array is made.

However, the contract in the javadoc does specify that IndexOutOfBoundsException will be thrown when len > buf.length - offset (which is consistent with the behavior of java.io.RandomAccessFile).  Being an unchecked exception, I hadn't expected this to be part of the contract (I actually think IllegalArgumentException is more descriptive for this scenario since the impossible was requested).  The tests for IAE have been removed, leaving only the EOF tests.


> additional BRAF tests
> ---------------------
>
>                 Key: CASSANDRA-1200
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1200
>             Project: Cassandra
>          Issue Type: Improvement
>    Affects Versions: 0.7
>            Reporter: Matthew F. Dennis
>            Assignee: Matthew F. Dennis
>            Priority: Minor
>             Fix For: 0.7
>
>         Attachments: trunk-1200.txt
>
>
> In comments/IRC there was some concern about BRAF.readFully() raising EOFException when appropriate

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


[jira] Commented: (CASSANDRA-1200) additional BRAF tests

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

Hudson commented on CASSANDRA-1200:
-----------------------------------

Integrated in Cassandra #476 (See [http://hudson.zones.apache.org/hudson/job/Cassandra/476/])
    add test for BRAF EOFException.  patch by mdennis; reviewed by jbellis for CASSANDRA-1200


> additional BRAF tests
> ---------------------
>
>                 Key: CASSANDRA-1200
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1200
>             Project: Cassandra
>          Issue Type: Improvement
>    Affects Versions: 0.7
>            Reporter: Matthew F. Dennis
>            Assignee: Matthew F. Dennis
>            Priority: Minor
>             Fix For: 0.7
>
>         Attachments: trunk-1200.txt
>
>
> In comments/IRC there was some concern about BRAF.readFully() raising EOFException when appropriate

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


[jira] Commented: (CASSANDRA-1200) additional BRAF tests

Posted by "Matthew F. Dennis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-1200?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12881533#action_12881533 ] 

Matthew F. Dennis commented on CASSANDRA-1200:
----------------------------------------------

Can you do that in a loop, or were you suggesting breaking the loop out into individual test methods?

> additional BRAF tests
> ---------------------
>
>                 Key: CASSANDRA-1200
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1200
>             Project: Cassandra
>          Issue Type: Improvement
>    Affects Versions: 0.7
>            Reporter: Matthew F. Dennis
>            Assignee: Matthew F. Dennis
>            Priority: Minor
>             Fix For: 0.7
>
>         Attachments: trunk-1200.txt
>
>
> In comments/IRC there was some concern about BRAF.readFully() raising EOFException when appropriate

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


[jira] Updated: (CASSANDRA-1200) additional BRAF tests

Posted by "Matthew F. Dennis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-1200?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matthew F. Dennis updated CASSANDRA-1200:
-----------------------------------------

    Attachment: trunk-1200.txt

> additional BRAF tests
> ---------------------
>
>                 Key: CASSANDRA-1200
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1200
>             Project: Cassandra
>          Issue Type: Improvement
>    Affects Versions: 0.7
>            Reporter: Matthew F. Dennis
>            Assignee: Matthew F. Dennis
>            Priority: Minor
>             Fix For: 0.7
>
>         Attachments: trunk-1200.txt
>
>
> In comments/IRC there was some concern about BRAF.readFully() raising EOFException when appropriate

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


[jira] Updated: (CASSANDRA-1200) additional BRAF tests

Posted by "Matthew F. Dennis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-1200?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matthew F. Dennis updated CASSANDRA-1200:
-----------------------------------------

    Attachment:     (was: trunk-1200-v1.txt)

> additional BRAF tests
> ---------------------
>
>                 Key: CASSANDRA-1200
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1200
>             Project: Cassandra
>          Issue Type: Improvement
>    Affects Versions: 0.7
>            Reporter: Matthew F. Dennis
>            Assignee: Matthew F. Dennis
>            Priority: Minor
>             Fix For: 0.7
>
>
> In comments/IRC there was some concern about BRAF.readFully() raising EOFException when appropriate

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


[jira] Updated: (CASSANDRA-1200) additional BRAF tests

Posted by "Matthew F. Dennis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-1200?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matthew F. Dennis updated CASSANDRA-1200:
-----------------------------------------

    Attachment:     (was: trunk-1200.txt)

> additional BRAF tests
> ---------------------
>
>                 Key: CASSANDRA-1200
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1200
>             Project: Cassandra
>          Issue Type: Improvement
>    Affects Versions: 0.7
>            Reporter: Matthew F. Dennis
>            Assignee: Matthew F. Dennis
>            Priority: Minor
>             Fix For: 0.7
>
>         Attachments: trunk-1200.txt
>
>
> In comments/IRC there was some concern about BRAF.readFully() raising EOFException when appropriate

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


[jira] Commented: (CASSANDRA-1200) additional BRAF tests

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-1200?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12880638#action_12880638 ] 

Jonathan Ellis commented on CASSANDRA-1200:
-------------------------------------------

it certainly does say what the expected behavior is: read less than or equal to the length of the array, and return that count.  

(sun's docs are very scrupulous about mentioning if exceptions may be thrown; if they don't mention it, then you can assume they're not.)

> additional BRAF tests
> ---------------------
>
>                 Key: CASSANDRA-1200
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1200
>             Project: Cassandra
>          Issue Type: Improvement
>    Affects Versions: 0.7
>            Reporter: Matthew F. Dennis
>            Assignee: Matthew F. Dennis
>            Priority: Minor
>             Fix For: 0.7
>
>         Attachments: trunk-1200.txt
>
>
> In comments/IRC there was some concern about BRAF.readFully() raising EOFException when appropriate

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


[jira] Commented: (CASSANDRA-1200) additional BRAF tests

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-1200?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12880485#action_12880485 ] 

Jonathan Ellis commented on CASSANDRA-1200:
-------------------------------------------

        if (len > b.length-off)
            throw new IllegalArgumentException("byte[] does not have space for " + len + " bytes (len > byte[].length-offset)");

this is wrong, the read() contract is

"Reads up to len bytes of data from this file into an array of bytes... returns the total number of bytes read into the buffer"

> additional BRAF tests
> ---------------------
>
>                 Key: CASSANDRA-1200
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1200
>             Project: Cassandra
>          Issue Type: Improvement
>    Affects Versions: 0.7
>            Reporter: Matthew F. Dennis
>            Assignee: Matthew F. Dennis
>            Priority: Minor
>             Fix For: 0.7
>
>         Attachments: trunk-1200-v1.txt
>
>
> In comments/IRC there was some concern about BRAF.readFully() raising EOFException when appropriate

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


[jira] Updated: (CASSANDRA-1200) additional BRAF tests

Posted by "Matthew F. Dennis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-1200?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matthew F. Dennis updated CASSANDRA-1200:
-----------------------------------------

    Attachment:     (was: trunk-1200.txt)

> additional BRAF tests
> ---------------------
>
>                 Key: CASSANDRA-1200
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1200
>             Project: Cassandra
>          Issue Type: Improvement
>    Affects Versions: 0.7
>            Reporter: Matthew F. Dennis
>            Assignee: Matthew F. Dennis
>            Priority: Minor
>             Fix For: 0.7
>
>
> In comments/IRC there was some concern about BRAF.readFully() raising EOFException when appropriate

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


[jira] Updated: (CASSANDRA-1200) additional BRAF tests

Posted by "Matthew F. Dennis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-1200?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matthew F. Dennis updated CASSANDRA-1200:
-----------------------------------------

    Attachment: trunk-1200-v1.txt

> additional BRAF tests
> ---------------------
>
>                 Key: CASSANDRA-1200
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1200
>             Project: Cassandra
>          Issue Type: Improvement
>    Affects Versions: 0.7
>            Reporter: Matthew F. Dennis
>            Assignee: Matthew F. Dennis
>            Priority: Minor
>             Fix For: 0.7
>
>         Attachments: trunk-1200-v1.txt
>
>
> In comments/IRC there was some concern about BRAF.readFully() raising EOFException when appropriate

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


[jira] Updated: (CASSANDRA-1200) additional BRAF tests

Posted by "Matthew F. Dennis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-1200?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matthew F. Dennis updated CASSANDRA-1200:
-----------------------------------------

    Attachment: trunk-1200.txt

> additional BRAF tests
> ---------------------
>
>                 Key: CASSANDRA-1200
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1200
>             Project: Cassandra
>          Issue Type: Improvement
>    Affects Versions: 0.7
>            Reporter: Matthew F. Dennis
>            Assignee: Matthew F. Dennis
>            Priority: Minor
>             Fix For: 0.7
>
>         Attachments: trunk-1200.txt
>
>
> In comments/IRC there was some concern about BRAF.readFully() raising EOFException when appropriate

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


[jira] Commented: (CASSANDRA-1200) additional BRAF tests

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-1200?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12881230#action_12881230 ] 

Jonathan Ellis commented on CASSANDRA-1200:
-------------------------------------------

can you update w/ junit exception handling?

e.g. @Test(expected=IndexOutOfBoundsException.class)

> additional BRAF tests
> ---------------------
>
>                 Key: CASSANDRA-1200
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1200
>             Project: Cassandra
>          Issue Type: Improvement
>    Affects Versions: 0.7
>            Reporter: Matthew F. Dennis
>            Assignee: Matthew F. Dennis
>            Priority: Minor
>             Fix For: 0.7
>
>         Attachments: trunk-1200.txt
>
>
> In comments/IRC there was some concern about BRAF.readFully() raising EOFException when appropriate

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


[jira] Updated: (CASSANDRA-1200) additional BRAF tests

Posted by "Matthew F. Dennis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-1200?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matthew F. Dennis updated CASSANDRA-1200:
-----------------------------------------

    Attachment: trunk-1200.txt

> additional BRAF tests
> ---------------------
>
>                 Key: CASSANDRA-1200
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1200
>             Project: Cassandra
>          Issue Type: Improvement
>    Affects Versions: 0.7
>            Reporter: Matthew F. Dennis
>            Assignee: Matthew F. Dennis
>            Priority: Minor
>             Fix For: 0.7
>
>         Attachments: trunk-1200.txt
>
>
> In comments/IRC there was some concern about BRAF.readFully() raising EOFException when appropriate

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


[jira] Updated: (CASSANDRA-1200) additional BRAF tests

Posted by "Matthew F. Dennis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-1200?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matthew F. Dennis updated CASSANDRA-1200:
-----------------------------------------

    Attachment:     (was: trunk-1200.txt)

> additional BRAF tests
> ---------------------
>
>                 Key: CASSANDRA-1200
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1200
>             Project: Cassandra
>          Issue Type: Improvement
>    Affects Versions: 0.7
>            Reporter: Matthew F. Dennis
>            Assignee: Matthew F. Dennis
>            Priority: Minor
>             Fix For: 0.7
>
>         Attachments: trunk-1200.txt
>
>
> In comments/IRC there was some concern about BRAF.readFully() raising EOFException when appropriate

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