You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Jimmy Xiang (Created) (JIRA)" <ji...@apache.org> on 2012/01/09 02:23:39 UTC

[jira] [Created] (HBASE-5150) Fail in a thread may not fail a test, clean up log splitting test

Fail in a thread may not fail a test, clean up log splitting test
-----------------------------------------------------------------

                 Key: HBASE-5150
                 URL: https://issues.apache.org/jira/browse/HBASE-5150
             Project: HBase
          Issue Type: Test
    Affects Versions: 0.94.0
            Reporter: Jimmy Xiang
            Assignee: Jimmy Xiang
            Priority: Minor


This is to clean up some tests for HBASE-5081.  The Assert.fail method in a separate thread will terminate the thread, but may not fail the test.
We can use callable, so that we can get the error in getting the result. 

Some documentation to explain the test will be helpful too.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-5150) Fail in a thread may not fail a test, clean up log splitting test

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

Hadoop QA commented on HBASE-5150:
----------------------------------

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

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

    +1 tests included.  The patch appears to include 6 new or modified tests.

    -1 javadoc.  The javadoc tool appears to have generated -147 warning messages.

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

    -1 findbugs.  The patch appears to introduce 78 new Findbugs (version 1.3.9) warnings.

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

     -1 core tests.  The patch failed these unit tests:
                       org.apache.hadoop.hbase.regionserver.TestSplitTransactionOnCluster
                  org.apache.hadoop.hbase.mapreduce.TestImportTsv
                  org.apache.hadoop.hbase.mapred.TestTableMapReduce
                  org.apache.hadoop.hbase.mapreduce.TestHFileOutputFormat

Test results: https://builds.apache.org/job/PreCommit-HBASE-Build/724//testReport/
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/724//artifact/trunk/patchprocess/newPatchFindbugsWarnings.html
Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/724//console

This message is automatically generated.
                
> Fail in a thread may not fail a test, clean up log splitting test
> -----------------------------------------------------------------
>
>                 Key: HBASE-5150
>                 URL: https://issues.apache.org/jira/browse/HBASE-5150
>             Project: HBase
>          Issue Type: Test
>    Affects Versions: 0.94.0
>            Reporter: Jimmy Xiang
>            Assignee: Jimmy Xiang
>            Priority: Minor
>         Attachments: hbase-5150.txt, hbase_5150_v3.patch
>
>
> This is to clean up some tests for HBASE-5081.  The Assert.fail method in a separate thread will terminate the thread, but may not fail the test.
> We can use callable, so that we can get the error in getting the result. 
> Some documentation to explain the test will be helpful too.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-5150) Fail in a thread may not fail a test, clean up log splitting test

Posted by "jiraposter@reviews.apache.org (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-5150?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13182351#comment-13182351 ] 

jiraposter@reviews.apache.org commented on HBASE-5150:
------------------------------------------------------


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/3433/
-----------------------------------------------------------

(Updated 2012-01-09 02:39:28.394063)


Review request for hbase, Todd Lipcon and Michael Stack.


Changes
-------

Updated per comments.


Summary
-------

Cleaned up the tests introduced in HBASE-5081, added some documentation.


This addresses bug HBASE-5150.
    https://issues.apache.org/jira/browse/HBASE-5150


Diffs (updated)
-----

  src/main/java/org/apache/hadoop/hbase/master/SplitLogManager.java 0ef0e33 
  src/test/java/org/apache/hadoop/hbase/master/TestDistributedLogSplitting.java b0487f1 
  src/test/java/org/apache/hadoop/hbase/master/TestSplitLogManager.java 0974b56 

Diff: https://reviews.apache.org/r/3433/diff


Testing
-------

Affected tests: TestDistributedLogSplitting and TestSplitLogManager, are passed


Thanks,

Jimmy


                
> Fail in a thread may not fail a test, clean up log splitting test
> -----------------------------------------------------------------
>
>                 Key: HBASE-5150
>                 URL: https://issues.apache.org/jira/browse/HBASE-5150
>             Project: HBase
>          Issue Type: Test
>    Affects Versions: 0.94.0
>            Reporter: Jimmy Xiang
>            Assignee: Jimmy Xiang
>            Priority: Minor
>         Attachments: hbase-5150.txt
>
>
> This is to clean up some tests for HBASE-5081.  The Assert.fail method in a separate thread will terminate the thread, but may not fail the test.
> We can use callable, so that we can get the error in getting the result. 
> Some documentation to explain the test will be helpful too.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-5150) Fail in a thread may not fail a test, clean up log splitting test

Posted by "jiraposter@reviews.apache.org (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-5150?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13182355#comment-13182355 ] 

jiraposter@reviews.apache.org commented on HBASE-5150:
------------------------------------------------------


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/3433/#review4259
-----------------------------------------------------------



src/test/java/org/apache/hadoop/hbase/master/TestDistributedLogSplitting.java
<https://reviews.apache.org/r/3433/#comment9620>

    There is no reason to wait for 3 seconds over here



src/test/java/org/apache/hadoop/hbase/master/TestDistributedLogSplitting.java
<https://reviews.apache.org/r/3433/#comment9621>

    Since fs is from master.getMasterFileSystem().getFileSystem(), I am pretty sure it gets cleaned up at the end of the test when the cluster is stopped. Did you see the files hanging around?



src/test/java/org/apache/hadoop/hbase/master/TestSplitLogManager.java
<https://reviews.apache.org/r/3433/#comment9622>

    The test should fail if there is an exception.


- Prakash


On 2012-01-09 02:39:28, Jimmy Xiang wrote:
bq.  
bq.  -----------------------------------------------------------
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/3433/
bq.  -----------------------------------------------------------
bq.  
bq.  (Updated 2012-01-09 02:39:28)
bq.  
bq.  
bq.  Review request for hbase, Todd Lipcon and Michael Stack.
bq.  
bq.  
bq.  Summary
bq.  -------
bq.  
bq.  Cleaned up the tests introduced in HBASE-5081, added some documentation.
bq.  
bq.  
bq.  This addresses bug HBASE-5150.
bq.      https://issues.apache.org/jira/browse/HBASE-5150
bq.  
bq.  
bq.  Diffs
bq.  -----
bq.  
bq.    src/main/java/org/apache/hadoop/hbase/master/SplitLogManager.java 0ef0e33 
bq.    src/test/java/org/apache/hadoop/hbase/master/TestDistributedLogSplitting.java b0487f1 
bq.    src/test/java/org/apache/hadoop/hbase/master/TestSplitLogManager.java 0974b56 
bq.  
bq.  Diff: https://reviews.apache.org/r/3433/diff
bq.  
bq.  
bq.  Testing
bq.  -------
bq.  
bq.  Affected tests: TestDistributedLogSplitting and TestSplitLogManager, are passed
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Jimmy
bq.  
bq.


                
> Fail in a thread may not fail a test, clean up log splitting test
> -----------------------------------------------------------------
>
>                 Key: HBASE-5150
>                 URL: https://issues.apache.org/jira/browse/HBASE-5150
>             Project: HBase
>          Issue Type: Test
>    Affects Versions: 0.94.0
>            Reporter: Jimmy Xiang
>            Assignee: Jimmy Xiang
>            Priority: Minor
>         Attachments: hbase-5150.txt
>
>
> This is to clean up some tests for HBASE-5081.  The Assert.fail method in a separate thread will terminate the thread, but may not fail the test.
> We can use callable, so that we can get the error in getting the result. 
> Some documentation to explain the test will be helpful too.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-5150) Fail in a thread may not fail a test, clean up log splitting test

Posted by "jiraposter@reviews.apache.org (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-5150?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13182774#comment-13182774 ] 

jiraposter@reviews.apache.org commented on HBASE-5150:
------------------------------------------------------



bq.  On 2012-01-09 20:13:20, Prakash Khemani wrote:
bq.  > I wrote the following dummy test
bq.  > 
bq.  > {code}
bq.  >   @Test
bq.  >   public void testDummy() throws Exception {
bq.  >     Thread t = new Thread() {
bq.  >       public void run() {
bq.  >         fail();
bq.  >       }
bq.  >     };
bq.  >     t.start();
bq.  >     t.join();
bq.  >   }
bq.  > {code}
bq.  > 
bq.  > And it failed with the following output 
bq.  > {code}
bq.  > Exception in thread "Thread-2" java.lang.AssertionError: 
bq.  > 	at org.junit.Assert.fail(Assert.java:91)
bq.  > 	at org.junit.Assert.fail(Assert.java:98)
bq.  > 	at org.apache.hadoop.hbase.master.TestDistributedLogSplitting$3.run(TestDistributedLogSplitting.java:294)
bq.  > {code}
bq.  > 
bq.  > To me it looks like that calling fail() or junit-asserts in a spawned thread is equally effective as in the main thread. (I ran this in my eclipse IDE.)

I ran the same from command line.  I do get the exception.  But it shows OK:

JUnit version 4.10
.Exception in thread "Thread-0" java.lang.AssertionError
	at org.junit.Assert.fail(Assert.java:92)
	at org.junit.Assert.fail(Assert.java:100)
	at Try$1.run(Try.java:11)

Time: 0.004

OK (1 test)

After I moved the fail() to below t.join(), I got this:

There was 1 failure:
1) testDummy(Try)
java.lang.AssertionError
	at org.junit.Assert.fail(Assert.java:92)
.............................................

FAILURES!!!
Tests run: 1,  Failures: 1


One fails the test, one doesn't.  That's my concern.


- Jimmy


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/3433/#review4282
-----------------------------------------------------------


On 2012-01-09 17:34:47, Jimmy Xiang wrote:
bq.  
bq.  -----------------------------------------------------------
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/3433/
bq.  -----------------------------------------------------------
bq.  
bq.  (Updated 2012-01-09 17:34:47)
bq.  
bq.  
bq.  Review request for hbase, Todd Lipcon, Ted Yu, Michael Stack, and Prakash Khemani.
bq.  
bq.  
bq.  Summary
bq.  -------
bq.  
bq.  Cleaned up the tests introduced in HBASE-5081, added some documentation.
bq.  
bq.  
bq.  This addresses bug HBASE-5150.
bq.      https://issues.apache.org/jira/browse/HBASE-5150
bq.  
bq.  
bq.  Diffs
bq.  -----
bq.  
bq.    src/main/java/org/apache/hadoop/hbase/master/SplitLogManager.java 0ef0e33 
bq.    src/test/java/org/apache/hadoop/hbase/master/TestDistributedLogSplitting.java b0487f1 
bq.    src/test/java/org/apache/hadoop/hbase/master/TestSplitLogManager.java 0974b56 
bq.  
bq.  Diff: https://reviews.apache.org/r/3433/diff
bq.  
bq.  
bq.  Testing
bq.  -------
bq.  
bq.  Affected tests: TestDistributedLogSplitting and TestSplitLogManager, are passed
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Jimmy
bq.  
bq.


                
> Fail in a thread may not fail a test, clean up log splitting test
> -----------------------------------------------------------------
>
>                 Key: HBASE-5150
>                 URL: https://issues.apache.org/jira/browse/HBASE-5150
>             Project: HBase
>          Issue Type: Test
>    Affects Versions: 0.94.0
>            Reporter: Jimmy Xiang
>            Assignee: Jimmy Xiang
>            Priority: Minor
>         Attachments: hbase-5150.txt
>
>
> This is to clean up some tests for HBASE-5081.  The Assert.fail method in a separate thread will terminate the thread, but may not fail the test.
> We can use callable, so that we can get the error in getting the result. 
> Some documentation to explain the test will be helpful too.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HBASE-5150) Fail in a thread may not fail a test, clean up log splitting test

Posted by "Zhihong Yu (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-5150?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Zhihong Yu updated HBASE-5150:
------------------------------

    Fix Version/s: 0.94.0
     Hadoop Flags: Reviewed
    
> Fail in a thread may not fail a test, clean up log splitting test
> -----------------------------------------------------------------
>
>                 Key: HBASE-5150
>                 URL: https://issues.apache.org/jira/browse/HBASE-5150
>             Project: HBase
>          Issue Type: Test
>    Affects Versions: 0.94.0
>            Reporter: Jimmy Xiang
>            Assignee: Jimmy Xiang
>            Priority: Minor
>             Fix For: 0.94.0
>
>         Attachments: hbase-5150.txt, hbase_5150_v3.patch
>
>
> This is to clean up some tests for HBASE-5081.  The Assert.fail method in a separate thread will terminate the thread, but may not fail the test.
> We can use callable, so that we can get the error in getting the result. 
> Some documentation to explain the test will be helpful too.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-5150) Fail in a thread may not fail a test, clean up log splitting test

Posted by "jiraposter@reviews.apache.org (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-5150?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13182658#comment-13182658 ] 

jiraposter@reviews.apache.org commented on HBASE-5150:
------------------------------------------------------


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/3433/
-----------------------------------------------------------

(Updated 2012-01-09 17:34:47.010866)


Review request for hbase, Todd Lipcon, Ted Yu, Michael Stack, and Prakash Khemani.


Changes
-------

Clean up thread in case the test fails in the middle.


Summary
-------

Cleaned up the tests introduced in HBASE-5081, added some documentation.


This addresses bug HBASE-5150.
    https://issues.apache.org/jira/browse/HBASE-5150


Diffs (updated)
-----

  src/main/java/org/apache/hadoop/hbase/master/SplitLogManager.java 0ef0e33 
  src/test/java/org/apache/hadoop/hbase/master/TestDistributedLogSplitting.java b0487f1 
  src/test/java/org/apache/hadoop/hbase/master/TestSplitLogManager.java 0974b56 

Diff: https://reviews.apache.org/r/3433/diff


Testing
-------

Affected tests: TestDistributedLogSplitting and TestSplitLogManager, are passed


Thanks,

Jimmy


                
> Fail in a thread may not fail a test, clean up log splitting test
> -----------------------------------------------------------------
>
>                 Key: HBASE-5150
>                 URL: https://issues.apache.org/jira/browse/HBASE-5150
>             Project: HBase
>          Issue Type: Test
>    Affects Versions: 0.94.0
>            Reporter: Jimmy Xiang
>            Assignee: Jimmy Xiang
>            Priority: Minor
>         Attachments: hbase-5150.txt
>
>
> This is to clean up some tests for HBASE-5081.  The Assert.fail method in a separate thread will terminate the thread, but may not fail the test.
> We can use callable, so that we can get the error in getting the result. 
> Some documentation to explain the test will be helpful too.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HBASE-5150) Fail in a thread may not fail a test, clean up log splitting test

Posted by "Jimmy Xiang (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-5150?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jimmy Xiang updated HBASE-5150:
-------------------------------

    Attachment: hbase_5150_v3.patch
    
> Fail in a thread may not fail a test, clean up log splitting test
> -----------------------------------------------------------------
>
>                 Key: HBASE-5150
>                 URL: https://issues.apache.org/jira/browse/HBASE-5150
>             Project: HBase
>          Issue Type: Test
>    Affects Versions: 0.94.0
>            Reporter: Jimmy Xiang
>            Assignee: Jimmy Xiang
>            Priority: Minor
>         Attachments: hbase-5150.txt, hbase_5150_v3.patch
>
>
> This is to clean up some tests for HBASE-5081.  The Assert.fail method in a separate thread will terminate the thread, but may not fail the test.
> We can use callable, so that we can get the error in getting the result. 
> Some documentation to explain the test will be helpful too.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-5150) Fail in a thread may not fail a test, clean up log splitting test

Posted by "jiraposter@reviews.apache.org (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-5150?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13182342#comment-13182342 ] 

jiraposter@reviews.apache.org commented on HBASE-5150:
------------------------------------------------------


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/3433/
-----------------------------------------------------------

Review request for hbase, Todd Lipcon and Michael Stack.


Summary
-------

Cleaned up the tests introduced in HBASE-5081, added some documentation.


This addresses bug HBASE-5150.
    https://issues.apache.org/jira/browse/HBASE-5150


Diffs
-----

  src/main/java/org/apache/hadoop/hbase/master/SplitLogManager.java 0ef0e33 
  src/test/java/org/apache/hadoop/hbase/master/TestDistributedLogSplitting.java b0487f1 
  src/test/java/org/apache/hadoop/hbase/master/TestSplitLogManager.java 0974b56 

Diff: https://reviews.apache.org/r/3433/diff


Testing
-------

Affected tests: TestDistributedLogSplitting and TestSplitLogManager, are passed


Thanks,

Jimmy


                
> Fail in a thread may not fail a test, clean up log splitting test
> -----------------------------------------------------------------
>
>                 Key: HBASE-5150
>                 URL: https://issues.apache.org/jira/browse/HBASE-5150
>             Project: HBase
>          Issue Type: Test
>    Affects Versions: 0.94.0
>            Reporter: Jimmy Xiang
>            Assignee: Jimmy Xiang
>            Priority: Minor
>
> This is to clean up some tests for HBASE-5081.  The Assert.fail method in a separate thread will terminate the thread, but may not fail the test.
> We can use callable, so that we can get the error in getting the result. 
> Some documentation to explain the test will be helpful too.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-5150) Failure in a thread may not fail a test, clean up log splitting test

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

Hudson commented on HBASE-5150:
-------------------------------

Integrated in HBase-TRUNK #2632 (See [https://builds.apache.org/job/HBase-TRUNK/2632/])
    HBASE-5150 Failure in a thread may not fail a test, clean up log splitting test (Jimmy Xiang)

tedyu : 
Files : 
* /hbase/trunk/src/main/java/org/apache/hadoop/hbase/master/SplitLogManager.java
* /hbase/trunk/src/test/java/org/apache/hadoop/hbase/master/TestDistributedLogSplitting.java
* /hbase/trunk/src/test/java/org/apache/hadoop/hbase/master/TestSplitLogManager.java

                
> Failure in a thread may not fail a test, clean up log splitting test
> --------------------------------------------------------------------
>
>                 Key: HBASE-5150
>                 URL: https://issues.apache.org/jira/browse/HBASE-5150
>             Project: HBase
>          Issue Type: Test
>    Affects Versions: 0.94.0
>            Reporter: Jimmy Xiang
>            Assignee: Jimmy Xiang
>            Priority: Minor
>             Fix For: 0.94.0
>
>         Attachments: hbase-5150.txt, hbase_5150_v3.patch
>
>
> This is to clean up some tests for HBASE-5081.  The Assert.fail method in a separate thread will terminate the thread, but may not fail the test.
> We can use callable, so that we can get the error in getting the result. 
> Some documentation to explain the test will be helpful too.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-5150) Fail in a thread may not fail a test, clean up log splitting test

Posted by "jiraposter@reviews.apache.org (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-5150?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13182359#comment-13182359 ] 

jiraposter@reviews.apache.org commented on HBASE-5150:
------------------------------------------------------



bq.  On 2012-01-09 03:01:16, Prakash Khemani wrote:
bq.  > src/test/java/org/apache/hadoop/hbase/master/TestDistributedLogSplitting.java, line 316
bq.  > <https://reviews.apache.org/r/3433/diff/2/?file=67170#file67170line316>
bq.  >
bq.  >     There is no reason to wait for 3 seconds over here

If everything works as expected, we won't have to wait here, since those two fail() calls won't be called.  I'd like to give it some time to make sure the second splitLogDistributed() is really blocked there.


bq.  On 2012-01-09 03:01:16, Prakash Khemani wrote:
bq.  > src/test/java/org/apache/hadoop/hbase/master/TestDistributedLogSplitting.java, line 326
bq.  > <https://reviews.apache.org/r/3433/diff/2/?file=67170#file67170line326>
bq.  >
bq.  >     Since fs is from master.getMasterFileSystem().getFileSystem(), I am pretty sure it gets cleaned up at the end of the test when the cluster is stopped. Did you see the files hanging around?

ShutdownMiniCluster will try to clean up the test dir.  Just want to be safe.


bq.  On 2012-01-09 03:01:16, Prakash Khemani wrote:
bq.  > src/test/java/org/apache/hadoop/hbase/master/TestSplitLogManager.java, line 481
bq.  > <https://reviews.apache.org/r/3433/diff/2/?file=67171#file67171line481>
bq.  >
bq.  >     The test should fail if there is an exception.

That fail() doesn't fail the test.   If there is an exception, those waitForCounter() will actually fail the test.


- Jimmy


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/3433/#review4259
-----------------------------------------------------------


On 2012-01-09 02:39:28, Jimmy Xiang wrote:
bq.  
bq.  -----------------------------------------------------------
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/3433/
bq.  -----------------------------------------------------------
bq.  
bq.  (Updated 2012-01-09 02:39:28)
bq.  
bq.  
bq.  Review request for hbase, Todd Lipcon and Michael Stack.
bq.  
bq.  
bq.  Summary
bq.  -------
bq.  
bq.  Cleaned up the tests introduced in HBASE-5081, added some documentation.
bq.  
bq.  
bq.  This addresses bug HBASE-5150.
bq.      https://issues.apache.org/jira/browse/HBASE-5150
bq.  
bq.  
bq.  Diffs
bq.  -----
bq.  
bq.    src/main/java/org/apache/hadoop/hbase/master/SplitLogManager.java 0ef0e33 
bq.    src/test/java/org/apache/hadoop/hbase/master/TestDistributedLogSplitting.java b0487f1 
bq.    src/test/java/org/apache/hadoop/hbase/master/TestSplitLogManager.java 0974b56 
bq.  
bq.  Diff: https://reviews.apache.org/r/3433/diff
bq.  
bq.  
bq.  Testing
bq.  -------
bq.  
bq.  Affected tests: TestDistributedLogSplitting and TestSplitLogManager, are passed
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Jimmy
bq.  
bq.


                
> Fail in a thread may not fail a test, clean up log splitting test
> -----------------------------------------------------------------
>
>                 Key: HBASE-5150
>                 URL: https://issues.apache.org/jira/browse/HBASE-5150
>             Project: HBase
>          Issue Type: Test
>    Affects Versions: 0.94.0
>            Reporter: Jimmy Xiang
>            Assignee: Jimmy Xiang
>            Priority: Minor
>         Attachments: hbase-5150.txt
>
>
> This is to clean up some tests for HBASE-5081.  The Assert.fail method in a separate thread will terminate the thread, but may not fail the test.
> We can use callable, so that we can get the error in getting the result. 
> Some documentation to explain the test will be helpful too.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HBASE-5150) Failure in a thread may not fail a test, clean up log splitting test

Posted by "Zhihong Yu (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-5150?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Zhihong Yu updated HBASE-5150:
------------------------------

    Summary: Failure in a thread may not fail a test, clean up log splitting test  (was: Fail in a thread may not fail a test, clean up log splitting test)
    
> Failure in a thread may not fail a test, clean up log splitting test
> --------------------------------------------------------------------
>
>                 Key: HBASE-5150
>                 URL: https://issues.apache.org/jira/browse/HBASE-5150
>             Project: HBase
>          Issue Type: Test
>    Affects Versions: 0.94.0
>            Reporter: Jimmy Xiang
>            Assignee: Jimmy Xiang
>            Priority: Minor
>             Fix For: 0.94.0
>
>         Attachments: hbase-5150.txt, hbase_5150_v3.patch
>
>
> This is to clean up some tests for HBASE-5081.  The Assert.fail method in a separate thread will terminate the thread, but may not fail the test.
> We can use callable, so that we can get the error in getting the result. 
> Some documentation to explain the test will be helpful too.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-5150) Fail in a thread may not fail a test, clean up log splitting test

Posted by "Zhihong Yu (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-5150?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13185737#comment-13185737 ] 

Zhihong Yu commented on HBASE-5150:
-----------------------------------

I think the patch is fine.

Will integrate if Prakash has no further comments.
                
> Fail in a thread may not fail a test, clean up log splitting test
> -----------------------------------------------------------------
>
>                 Key: HBASE-5150
>                 URL: https://issues.apache.org/jira/browse/HBASE-5150
>             Project: HBase
>          Issue Type: Test
>    Affects Versions: 0.94.0
>            Reporter: Jimmy Xiang
>            Assignee: Jimmy Xiang
>            Priority: Minor
>         Attachments: hbase-5150.txt, hbase_5150_v3.patch
>
>
> This is to clean up some tests for HBASE-5081.  The Assert.fail method in a separate thread will terminate the thread, but may not fail the test.
> We can use callable, so that we can get the error in getting the result. 
> Some documentation to explain the test will be helpful too.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HBASE-5150) Fail in a thread may not fail a test, clean up log splitting test

Posted by "Jimmy Xiang (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-5150?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jimmy Xiang updated HBASE-5150:
-------------------------------

    Status: Open  (was: Patch Available)
    
> Fail in a thread may not fail a test, clean up log splitting test
> -----------------------------------------------------------------
>
>                 Key: HBASE-5150
>                 URL: https://issues.apache.org/jira/browse/HBASE-5150
>             Project: HBase
>          Issue Type: Test
>    Affects Versions: 0.94.0
>            Reporter: Jimmy Xiang
>            Assignee: Jimmy Xiang
>            Priority: Minor
>         Attachments: hbase-5150.txt, hbase_5150_v3.patch
>
>
> This is to clean up some tests for HBASE-5081.  The Assert.fail method in a separate thread will terminate the thread, but may not fail the test.
> We can use callable, so that we can get the error in getting the result. 
> Some documentation to explain the test will be helpful too.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-5150) Fail in a thread may not fail a test, clean up log splitting test

Posted by "jiraposter@reviews.apache.org (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-5150?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13182828#comment-13182828 ] 

jiraposter@reviews.apache.org commented on HBASE-5150:
------------------------------------------------------



bq.  On 2012-01-09 21:35:34, Prakash Khemani wrote:
bq.  > Thanks, I get it now. May be there is a fix newer JUnit version where it maintains some kind of a global flag ...
bq.  > 
bq.  > Is it possible to set a failureFlag in the second thread and then check the flag in the end in the main thread (better than removing some of the test-failure cases, I think)?

I thought about that. It means we need to define another interface so as to get the flag/error message. If those waitForCounter() can cover the failure cases, we may not
need to check the flag again.  If the testcase failed with some Exception, tot_mgr_log_split_batch_success will not be changed from 0 to 1.  So that waitForCounter() will fail
and catch this failure.


- Jimmy


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/3433/#review4284
-----------------------------------------------------------


On 2012-01-09 17:34:47, Jimmy Xiang wrote:
bq.  
bq.  -----------------------------------------------------------
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/3433/
bq.  -----------------------------------------------------------
bq.  
bq.  (Updated 2012-01-09 17:34:47)
bq.  
bq.  
bq.  Review request for hbase, Todd Lipcon, Ted Yu, Michael Stack, and Prakash Khemani.
bq.  
bq.  
bq.  Summary
bq.  -------
bq.  
bq.  Cleaned up the tests introduced in HBASE-5081, added some documentation.
bq.  
bq.  
bq.  This addresses bug HBASE-5150.
bq.      https://issues.apache.org/jira/browse/HBASE-5150
bq.  
bq.  
bq.  Diffs
bq.  -----
bq.  
bq.    src/main/java/org/apache/hadoop/hbase/master/SplitLogManager.java 0ef0e33 
bq.    src/test/java/org/apache/hadoop/hbase/master/TestDistributedLogSplitting.java b0487f1 
bq.    src/test/java/org/apache/hadoop/hbase/master/TestSplitLogManager.java 0974b56 
bq.  
bq.  Diff: https://reviews.apache.org/r/3433/diff
bq.  
bq.  
bq.  Testing
bq.  -------
bq.  
bq.  Affected tests: TestDistributedLogSplitting and TestSplitLogManager, are passed
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Jimmy
bq.  
bq.


                
> Fail in a thread may not fail a test, clean up log splitting test
> -----------------------------------------------------------------
>
>                 Key: HBASE-5150
>                 URL: https://issues.apache.org/jira/browse/HBASE-5150
>             Project: HBase
>          Issue Type: Test
>    Affects Versions: 0.94.0
>            Reporter: Jimmy Xiang
>            Assignee: Jimmy Xiang
>            Priority: Minor
>         Attachments: hbase-5150.txt
>
>
> This is to clean up some tests for HBASE-5081.  The Assert.fail method in a separate thread will terminate the thread, but may not fail the test.
> We can use callable, so that we can get the error in getting the result. 
> Some documentation to explain the test will be helpful too.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-5150) Fail in a thread may not fail a test, clean up log splitting test

Posted by "jiraposter@reviews.apache.org (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-5150?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13182757#comment-13182757 ] 

jiraposter@reviews.apache.org commented on HBASE-5150:
------------------------------------------------------


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/3433/#review4282
-----------------------------------------------------------


I wrote the following dummy test

{code}
  @Test
  public void testDummy() throws Exception {
    Thread t = new Thread() {
      public void run() {
        fail();
      }
    };
    t.start();
    t.join();
  }
{code}

And it failed with the following output 
{code}
Exception in thread "Thread-2" java.lang.AssertionError: 
	at org.junit.Assert.fail(Assert.java:91)
	at org.junit.Assert.fail(Assert.java:98)
	at org.apache.hadoop.hbase.master.TestDistributedLogSplitting$3.run(TestDistributedLogSplitting.java:294)
{code}

To me it looks like that calling fail() or junit-asserts in a spawned thread is equally effective as in the main thread. (I ran this in my eclipse IDE.)

- Prakash


On 2012-01-09 17:34:47, Jimmy Xiang wrote:
bq.  
bq.  -----------------------------------------------------------
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/3433/
bq.  -----------------------------------------------------------
bq.  
bq.  (Updated 2012-01-09 17:34:47)
bq.  
bq.  
bq.  Review request for hbase, Todd Lipcon, Ted Yu, Michael Stack, and Prakash Khemani.
bq.  
bq.  
bq.  Summary
bq.  -------
bq.  
bq.  Cleaned up the tests introduced in HBASE-5081, added some documentation.
bq.  
bq.  
bq.  This addresses bug HBASE-5150.
bq.      https://issues.apache.org/jira/browse/HBASE-5150
bq.  
bq.  
bq.  Diffs
bq.  -----
bq.  
bq.    src/main/java/org/apache/hadoop/hbase/master/SplitLogManager.java 0ef0e33 
bq.    src/test/java/org/apache/hadoop/hbase/master/TestDistributedLogSplitting.java b0487f1 
bq.    src/test/java/org/apache/hadoop/hbase/master/TestSplitLogManager.java 0974b56 
bq.  
bq.  Diff: https://reviews.apache.org/r/3433/diff
bq.  
bq.  
bq.  Testing
bq.  -------
bq.  
bq.  Affected tests: TestDistributedLogSplitting and TestSplitLogManager, are passed
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Jimmy
bq.  
bq.


                
> Fail in a thread may not fail a test, clean up log splitting test
> -----------------------------------------------------------------
>
>                 Key: HBASE-5150
>                 URL: https://issues.apache.org/jira/browse/HBASE-5150
>             Project: HBase
>          Issue Type: Test
>    Affects Versions: 0.94.0
>            Reporter: Jimmy Xiang
>            Assignee: Jimmy Xiang
>            Priority: Minor
>         Attachments: hbase-5150.txt
>
>
> This is to clean up some tests for HBASE-5081.  The Assert.fail method in a separate thread will terminate the thread, but may not fail the test.
> We can use callable, so that we can get the error in getting the result. 
> Some documentation to explain the test will be helpful too.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HBASE-5150) Fail in a thread may not fail a test, clean up log splitting test

Posted by "Jimmy Xiang (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-5150?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jimmy Xiang updated HBASE-5150:
-------------------------------

    Attachment: hbase-5150.txt
    
> Fail in a thread may not fail a test, clean up log splitting test
> -----------------------------------------------------------------
>
>                 Key: HBASE-5150
>                 URL: https://issues.apache.org/jira/browse/HBASE-5150
>             Project: HBase
>          Issue Type: Test
>    Affects Versions: 0.94.0
>            Reporter: Jimmy Xiang
>            Assignee: Jimmy Xiang
>            Priority: Minor
>         Attachments: hbase-5150.txt
>
>
> This is to clean up some tests for HBASE-5081.  The Assert.fail method in a separate thread will terminate the thread, but may not fail the test.
> We can use callable, so that we can get the error in getting the result. 
> Some documentation to explain the test will be helpful too.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-5150) Fail in a thread may not fail a test, clean up log splitting test

Posted by "Jimmy Xiang (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-5150?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13184221#comment-13184221 ] 

Jimmy Xiang commented on HBASE-5150:
------------------------------------

Those failed tests passed on my local box.
                
> Fail in a thread may not fail a test, clean up log splitting test
> -----------------------------------------------------------------
>
>                 Key: HBASE-5150
>                 URL: https://issues.apache.org/jira/browse/HBASE-5150
>             Project: HBase
>          Issue Type: Test
>    Affects Versions: 0.94.0
>            Reporter: Jimmy Xiang
>            Assignee: Jimmy Xiang
>            Priority: Minor
>         Attachments: hbase-5150.txt, hbase_5150_v3.patch
>
>
> This is to clean up some tests for HBASE-5081.  The Assert.fail method in a separate thread will terminate the thread, but may not fail the test.
> We can use callable, so that we can get the error in getting the result. 
> Some documentation to explain the test will be helpful too.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HBASE-5150) Failure in a thread may not fail a test, clean up log splitting test

Posted by "Jimmy Xiang (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-5150?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jimmy Xiang updated HBASE-5150:
-------------------------------

    Resolution: Fixed
        Status: Resolved  (was: Patch Available)
    
> Failure in a thread may not fail a test, clean up log splitting test
> --------------------------------------------------------------------
>
>                 Key: HBASE-5150
>                 URL: https://issues.apache.org/jira/browse/HBASE-5150
>             Project: HBase
>          Issue Type: Test
>    Affects Versions: 0.94.0
>            Reporter: Jimmy Xiang
>            Assignee: Jimmy Xiang
>            Priority: Minor
>             Fix For: 0.94.0
>
>         Attachments: hbase-5150.txt, hbase_5150_v3.patch
>
>
> This is to clean up some tests for HBASE-5081.  The Assert.fail method in a separate thread will terminate the thread, but may not fail the test.
> We can use callable, so that we can get the error in getting the result. 
> Some documentation to explain the test will be helpful too.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-5150) Fail in a thread may not fail a test, clean up log splitting test

Posted by "jiraposter@reviews.apache.org (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-5150?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13182697#comment-13182697 ] 

jiraposter@reviews.apache.org commented on HBASE-5150:
------------------------------------------------------



bq.  On 2012-01-09 03:01:16, Prakash Khemani wrote:
bq.  > src/test/java/org/apache/hadoop/hbase/master/TestDistributedLogSplitting.java, line 316
bq.  > <https://reviews.apache.org/r/3433/diff/2/?file=67170#file67170line316>
bq.  >
bq.  >     There is no reason to wait for 3 seconds over here
bq.  
bq.  Jimmy Xiang wrote:
bq.      If everything works as expected, we won't have to wait here, since those two fail() calls won't be called.  I'd like to give it some time to make sure the second splitLogDistributed() is really blocked there.

If the test is working as expecte then there will be a 3sec wait here. This I still feel is unnecessary.

If the second splitLogDistributed() isn't really blocked and result.get(3000, millisecs) returns early then there is nothing in the test to catch that case.

I prefer the original thread based test rather than the executor based.

Also there used to be a assertTrue(t.isIntruppted()) at the end of the test. It's possible I missed checking it in. That was the test to make sure that the split-logging thread had blocked and was actually interrupted. You could also add a counter to test that case.


bq.  On 2012-01-09 03:01:16, Prakash Khemani wrote:
bq.  > src/test/java/org/apache/hadoop/hbase/master/TestSplitLogManager.java, line 481
bq.  > <https://reviews.apache.org/r/3433/diff/2/?file=67171#file67171line481>
bq.  >
bq.  >     The test should fail if there is an exception.
bq.  
bq.  Jimmy Xiang wrote:
bq.      That fail() doesn't fail the test.   If there is an exception, those waitForCounter() will actually fail the test.

fail() over here serves 3 purposes (1) It documents that we are not expecting any exceptions in the thread and if there is one then the test should fail. (2) if there is an exception then test fails quicker with the fail() statement (3) if we don't put a fail() here then we will ignore any exception thrown by the thread. the counter logic might not be strong enough to flag all exceptions.


- Prakash


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/3433/#review4259
-----------------------------------------------------------


On 2012-01-09 17:34:47, Jimmy Xiang wrote:
bq.  
bq.  -----------------------------------------------------------
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/3433/
bq.  -----------------------------------------------------------
bq.  
bq.  (Updated 2012-01-09 17:34:47)
bq.  
bq.  
bq.  Review request for hbase, Todd Lipcon, Ted Yu, Michael Stack, and Prakash Khemani.
bq.  
bq.  
bq.  Summary
bq.  -------
bq.  
bq.  Cleaned up the tests introduced in HBASE-5081, added some documentation.
bq.  
bq.  
bq.  This addresses bug HBASE-5150.
bq.      https://issues.apache.org/jira/browse/HBASE-5150
bq.  
bq.  
bq.  Diffs
bq.  -----
bq.  
bq.    src/main/java/org/apache/hadoop/hbase/master/SplitLogManager.java 0ef0e33 
bq.    src/test/java/org/apache/hadoop/hbase/master/TestDistributedLogSplitting.java b0487f1 
bq.    src/test/java/org/apache/hadoop/hbase/master/TestSplitLogManager.java 0974b56 
bq.  
bq.  Diff: https://reviews.apache.org/r/3433/diff
bq.  
bq.  
bq.  Testing
bq.  -------
bq.  
bq.  Affected tests: TestDistributedLogSplitting and TestSplitLogManager, are passed
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Jimmy
bq.  
bq.


                
> Fail in a thread may not fail a test, clean up log splitting test
> -----------------------------------------------------------------
>
>                 Key: HBASE-5150
>                 URL: https://issues.apache.org/jira/browse/HBASE-5150
>             Project: HBase
>          Issue Type: Test
>    Affects Versions: 0.94.0
>            Reporter: Jimmy Xiang
>            Assignee: Jimmy Xiang
>            Priority: Minor
>         Attachments: hbase-5150.txt
>
>
> This is to clean up some tests for HBASE-5081.  The Assert.fail method in a separate thread will terminate the thread, but may not fail the test.
> We can use callable, so that we can get the error in getting the result. 
> Some documentation to explain the test will be helpful too.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-5150) Fail in a thread may not fail a test, clean up log splitting test

Posted by "Jimmy Xiang (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-5150?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13184234#comment-13184234 ] 

Jimmy Xiang commented on HBASE-5150:
------------------------------------

@Prakash and Ted, are you ok with this patch? I changed the 3sec wait time to 2sec.
                
> Fail in a thread may not fail a test, clean up log splitting test
> -----------------------------------------------------------------
>
>                 Key: HBASE-5150
>                 URL: https://issues.apache.org/jira/browse/HBASE-5150
>             Project: HBase
>          Issue Type: Test
>    Affects Versions: 0.94.0
>            Reporter: Jimmy Xiang
>            Assignee: Jimmy Xiang
>            Priority: Minor
>         Attachments: hbase-5150.txt, hbase_5150_v3.patch
>
>
> This is to clean up some tests for HBASE-5081.  The Assert.fail method in a separate thread will terminate the thread, but may not fail the test.
> We can use callable, so that we can get the error in getting the result. 
> Some documentation to explain the test will be helpful too.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HBASE-5150) Fail in a thread may not fail a test, clean up log splitting test

Posted by "Jimmy Xiang (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-5150?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jimmy Xiang updated HBASE-5150:
-------------------------------

    Status: Patch Available  (was: Open)

Patch diff3.
                
> Fail in a thread may not fail a test, clean up log splitting test
> -----------------------------------------------------------------
>
>                 Key: HBASE-5150
>                 URL: https://issues.apache.org/jira/browse/HBASE-5150
>             Project: HBase
>          Issue Type: Test
>    Affects Versions: 0.94.0
>            Reporter: Jimmy Xiang
>            Assignee: Jimmy Xiang
>            Priority: Minor
>         Attachments: hbase-5150.txt, hbase_5150_v3.patch
>
>
> This is to clean up some tests for HBASE-5081.  The Assert.fail method in a separate thread will terminate the thread, but may not fail the test.
> We can use callable, so that we can get the error in getting the result. 
> Some documentation to explain the test will be helpful too.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-5150) Fail in a thread may not fail a test, clean up log splitting test

Posted by "jiraposter@reviews.apache.org (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-5150?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13182350#comment-13182350 ] 

jiraposter@reviews.apache.org commented on HBASE-5150:
------------------------------------------------------



bq.  On 2012-01-09 01:56:13, Ted Yu wrote:
bq.  > src/test/java/org/apache/hadoop/hbase/master/TestDistributedLogSplitting.java, line 302
bq.  > <https://reviews.apache.org/r/3433/diff/1/?file=67167#file67167line302>
bq.  >
bq.  >     Should this read ', or until it is ...' ?

It will keep waiting until it is interrupted.  The task won't be removed from the task map in this test case actually because slm.ignoreZKDeleteForTesting is set to true.
I will add this to the doc.


bq.  On 2012-01-09 01:56:13, Ted Yu wrote:
bq.  > src/test/java/org/apache/hadoop/hbase/master/TestDistributedLogSplitting.java, line 322
bq.  > <https://reviews.apache.org/r/3433/diff/1/?file=67167#file67167line322>
bq.  >
bq.  >     Typo: exception

right.


bq.  On 2012-01-09 01:56:13, Ted Yu wrote:
bq.  > src/test/java/org/apache/hadoop/hbase/master/TestSplitLogManager.java, line 481
bq.  > <https://reviews.apache.org/r/3433/diff/1/?file=67168#file67168line481>
bq.  >
bq.  >     So this is no longer a failure case ?

It doesn't fail here. It tests a scenario when a znode is removed by others.


- Jimmy


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/3433/#review4256
-----------------------------------------------------------


On 2012-01-09 01:32:36, Jimmy Xiang wrote:
bq.  
bq.  -----------------------------------------------------------
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/3433/
bq.  -----------------------------------------------------------
bq.  
bq.  (Updated 2012-01-09 01:32:36)
bq.  
bq.  
bq.  Review request for hbase, Todd Lipcon and Michael Stack.
bq.  
bq.  
bq.  Summary
bq.  -------
bq.  
bq.  Cleaned up the tests introduced in HBASE-5081, added some documentation.
bq.  
bq.  
bq.  This addresses bug HBASE-5150.
bq.      https://issues.apache.org/jira/browse/HBASE-5150
bq.  
bq.  
bq.  Diffs
bq.  -----
bq.  
bq.    src/main/java/org/apache/hadoop/hbase/master/SplitLogManager.java 0ef0e33 
bq.    src/test/java/org/apache/hadoop/hbase/master/TestDistributedLogSplitting.java b0487f1 
bq.    src/test/java/org/apache/hadoop/hbase/master/TestSplitLogManager.java 0974b56 
bq.  
bq.  Diff: https://reviews.apache.org/r/3433/diff
bq.  
bq.  
bq.  Testing
bq.  -------
bq.  
bq.  Affected tests: TestDistributedLogSplitting and TestSplitLogManager, are passed
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Jimmy
bq.  
bq.


                
> Fail in a thread may not fail a test, clean up log splitting test
> -----------------------------------------------------------------
>
>                 Key: HBASE-5150
>                 URL: https://issues.apache.org/jira/browse/HBASE-5150
>             Project: HBase
>          Issue Type: Test
>    Affects Versions: 0.94.0
>            Reporter: Jimmy Xiang
>            Assignee: Jimmy Xiang
>            Priority: Minor
>         Attachments: hbase-5150.txt
>
>
> This is to clean up some tests for HBASE-5081.  The Assert.fail method in a separate thread will terminate the thread, but may not fail the test.
> We can use callable, so that we can get the error in getting the result. 
> Some documentation to explain the test will be helpful too.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-5150) Fail in a thread may not fail a test, clean up log splitting test

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

Hadoop QA commented on HBASE-5150:
----------------------------------

-1 overall.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12509870/hbase-5150.txt
  against trunk revision .

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

    +1 tests included.  The patch appears to include 6 new or modified tests.

    -1 javadoc.  The javadoc tool appears to have generated -151 warning messages.

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

    -1 findbugs.  The patch appears to introduce 79 new Findbugs (version 1.3.9) warnings.

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

     -1 core tests.  The patch failed these unit tests:
                       org.apache.hadoop.hbase.mapreduce.TestImportTsv
                  org.apache.hadoop.hbase.mapred.TestTableMapReduce
                  org.apache.hadoop.hbase.mapreduce.TestHFileOutputFormat

Test results: https://builds.apache.org/job/PreCommit-HBASE-Build/702//testReport/
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/702//artifact/trunk/patchprocess/newPatchFindbugsWarnings.html
Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/702//console

This message is automatically generated.
                
> Fail in a thread may not fail a test, clean up log splitting test
> -----------------------------------------------------------------
>
>                 Key: HBASE-5150
>                 URL: https://issues.apache.org/jira/browse/HBASE-5150
>             Project: HBase
>          Issue Type: Test
>    Affects Versions: 0.94.0
>            Reporter: Jimmy Xiang
>            Assignee: Jimmy Xiang
>            Priority: Minor
>         Attachments: hbase-5150.txt
>
>
> This is to clean up some tests for HBASE-5081.  The Assert.fail method in a separate thread will terminate the thread, but may not fail the test.
> We can use callable, so that we can get the error in getting the result. 
> Some documentation to explain the test will be helpful too.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-5150) Failure in a thread may not fail a test, clean up log splitting test

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

Hudson commented on HBASE-5150:
-------------------------------

Integrated in HBase-TRUNK-security #78 (See [https://builds.apache.org/job/HBase-TRUNK-security/78/])
    HBASE-5150 Failure in a thread may not fail a test, clean up log splitting test (Jimmy Xiang)

tedyu : 
Files : 
* /hbase/trunk/src/main/java/org/apache/hadoop/hbase/master/SplitLogManager.java
* /hbase/trunk/src/test/java/org/apache/hadoop/hbase/master/TestDistributedLogSplitting.java
* /hbase/trunk/src/test/java/org/apache/hadoop/hbase/master/TestSplitLogManager.java

                
> Failure in a thread may not fail a test, clean up log splitting test
> --------------------------------------------------------------------
>
>                 Key: HBASE-5150
>                 URL: https://issues.apache.org/jira/browse/HBASE-5150
>             Project: HBase
>          Issue Type: Test
>    Affects Versions: 0.94.0
>            Reporter: Jimmy Xiang
>            Assignee: Jimmy Xiang
>            Priority: Minor
>             Fix For: 0.94.0
>
>         Attachments: hbase-5150.txt, hbase_5150_v3.patch
>
>
> This is to clean up some tests for HBASE-5081.  The Assert.fail method in a separate thread will terminate the thread, but may not fail the test.
> We can use callable, so that we can get the error in getting the result. 
> Some documentation to explain the test will be helpful too.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-5150) Failure in a thread may not fail a test, clean up log splitting test

Posted by "Zhihong Yu (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-5150?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13185941#comment-13185941 ] 

Zhihong Yu commented on HBASE-5150:
-----------------------------------

Integrated to TRUNK.

Thanks for the patch, Jimmy.

Thanks for the review, Prakash.
                
> Failure in a thread may not fail a test, clean up log splitting test
> --------------------------------------------------------------------
>
>                 Key: HBASE-5150
>                 URL: https://issues.apache.org/jira/browse/HBASE-5150
>             Project: HBase
>          Issue Type: Test
>    Affects Versions: 0.94.0
>            Reporter: Jimmy Xiang
>            Assignee: Jimmy Xiang
>            Priority: Minor
>             Fix For: 0.94.0
>
>         Attachments: hbase-5150.txt, hbase_5150_v3.patch
>
>
> This is to clean up some tests for HBASE-5081.  The Assert.fail method in a separate thread will terminate the thread, but may not fail the test.
> We can use callable, so that we can get the error in getting the result. 
> Some documentation to explain the test will be helpful too.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HBASE-5150) Fail in a thread may not fail a test, clean up log splitting test

Posted by "Jimmy Xiang (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-5150?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jimmy Xiang updated HBASE-5150:
-------------------------------

    Status: Patch Available  (was: Open)
    
> Fail in a thread may not fail a test, clean up log splitting test
> -----------------------------------------------------------------
>
>                 Key: HBASE-5150
>                 URL: https://issues.apache.org/jira/browse/HBASE-5150
>             Project: HBase
>          Issue Type: Test
>    Affects Versions: 0.94.0
>            Reporter: Jimmy Xiang
>            Assignee: Jimmy Xiang
>            Priority: Minor
>         Attachments: hbase-5150.txt
>
>
> This is to clean up some tests for HBASE-5081.  The Assert.fail method in a separate thread will terminate the thread, but may not fail the test.
> We can use callable, so that we can get the error in getting the result. 
> Some documentation to explain the test will be helpful too.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-5150) Fail in a thread may not fail a test, clean up log splitting test

Posted by "jiraposter@reviews.apache.org (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-5150?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13182738#comment-13182738 ] 

jiraposter@reviews.apache.org commented on HBASE-5150:
------------------------------------------------------



bq.  On 2012-01-09 03:01:16, Prakash Khemani wrote:
bq.  > src/test/java/org/apache/hadoop/hbase/master/TestDistributedLogSplitting.java, line 316
bq.  > <https://reviews.apache.org/r/3433/diff/2/?file=67170#file67170line316>
bq.  >
bq.  >     There is no reason to wait for 3 seconds over here
bq.  
bq.  Jimmy Xiang wrote:
bq.      If everything works as expected, we won't have to wait here, since those two fail() calls won't be called.  I'd like to give it some time to make sure the second splitLogDistributed() is really blocked there.
bq.  
bq.  Prakash Khemani wrote:
bq.      If the test is working as expecte then there will be a 3sec wait here. This I still feel is unnecessary.
bq.      
bq.      If the second splitLogDistributed() isn't really blocked and result.get(3000, millisecs) returns early then there is nothing in the test to catch that case.
bq.      
bq.      I prefer the original thread based test rather than the executor based.
bq.      
bq.      Also there used to be a assertTrue(t.isIntruppted()) at the end of the test. It's possible I missed checking it in. That was the test to make sure that the split-logging thread had blocked and was actually interrupted. You could also add a counter to test that case.

The point of the issue here is that the fail() and assertTrue() in the original thread based test will throw some errors and terminate that thread, but it doesn't fail the test.  Only if you throw such errors in the main thread, it will fail the test. With the executor based change, the result.get() call will get those errors and fail the test.

As to the 3sec wait, it is a tough call.  There are two threads: the main thread and the log splitting thread. If the log splitting thread fails fast, by the original way, we just know it is failed (waitForCounter(tot_mgr_wait_for_zk_delete, 0, 1, 10000)) but we don't know why.

Can we change the wait time from 3sec to 1sec?  If we don't wait at all, those two fail()s may be better to change to some error logging messages.  Otherwise, we don't know the cause at all.  We just know 
tot_mgr_wait_for_zk_delete is not changed as expected.


bq.  On 2012-01-09 03:01:16, Prakash Khemani wrote:
bq.  > src/test/java/org/apache/hadoop/hbase/master/TestSplitLogManager.java, line 481
bq.  > <https://reviews.apache.org/r/3433/diff/2/?file=67171#file67171line481>
bq.  >
bq.  >     The test should fail if there is an exception.
bq.  
bq.  Jimmy Xiang wrote:
bq.      That fail() doesn't fail the test.   If there is an exception, those waitForCounter() will actually fail the test.
bq.  
bq.  Prakash Khemani wrote:
bq.      fail() over here serves 3 purposes (1) It documents that we are not expecting any exceptions in the thread and if there is one then the test should fail. (2) if there is an exception then test fails quicker with the fail() statement (3) if we don't put a fail() here then we will ignore any exception thrown by the thread. the counter logic might not be strong enough to flag all exceptions.

I understand the purposes.  But it doesn't achieve some of them, for example, as I mentioned earlier, it won't fail the test.  There are two choices.  (1) We can put the message in some log. (2) Using executor to get the error in the main thread.  But that needs a wait in the main thread.  There is already a warning message "splitLogDistributed failed", should we also say the test is failed too?


- Jimmy


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/3433/#review4259
-----------------------------------------------------------


On 2012-01-09 17:34:47, Jimmy Xiang wrote:
bq.  
bq.  -----------------------------------------------------------
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/3433/
bq.  -----------------------------------------------------------
bq.  
bq.  (Updated 2012-01-09 17:34:47)
bq.  
bq.  
bq.  Review request for hbase, Todd Lipcon, Ted Yu, Michael Stack, and Prakash Khemani.
bq.  
bq.  
bq.  Summary
bq.  -------
bq.  
bq.  Cleaned up the tests introduced in HBASE-5081, added some documentation.
bq.  
bq.  
bq.  This addresses bug HBASE-5150.
bq.      https://issues.apache.org/jira/browse/HBASE-5150
bq.  
bq.  
bq.  Diffs
bq.  -----
bq.  
bq.    src/main/java/org/apache/hadoop/hbase/master/SplitLogManager.java 0ef0e33 
bq.    src/test/java/org/apache/hadoop/hbase/master/TestDistributedLogSplitting.java b0487f1 
bq.    src/test/java/org/apache/hadoop/hbase/master/TestSplitLogManager.java 0974b56 
bq.  
bq.  Diff: https://reviews.apache.org/r/3433/diff
bq.  
bq.  
bq.  Testing
bq.  -------
bq.  
bq.  Affected tests: TestDistributedLogSplitting and TestSplitLogManager, are passed
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Jimmy
bq.  
bq.


                
> Fail in a thread may not fail a test, clean up log splitting test
> -----------------------------------------------------------------
>
>                 Key: HBASE-5150
>                 URL: https://issues.apache.org/jira/browse/HBASE-5150
>             Project: HBase
>          Issue Type: Test
>    Affects Versions: 0.94.0
>            Reporter: Jimmy Xiang
>            Assignee: Jimmy Xiang
>            Priority: Minor
>         Attachments: hbase-5150.txt
>
>
> This is to clean up some tests for HBASE-5081.  The Assert.fail method in a separate thread will terminate the thread, but may not fail the test.
> We can use callable, so that we can get the error in getting the result. 
> Some documentation to explain the test will be helpful too.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-5150) Fail in a thread may not fail a test, clean up log splitting test

Posted by "jiraposter@reviews.apache.org (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-5150?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13182818#comment-13182818 ] 

jiraposter@reviews.apache.org commented on HBASE-5150:
------------------------------------------------------


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/3433/#review4284
-----------------------------------------------------------


Thanks, I get it now. May be there is a fix newer JUnit version where it maintains some kind of a global flag ...

Is it possible to set a failureFlag in the second thread and then check the flag in the end in the main thread (better than removing some of the test-failure cases, I think)?

- Prakash


On 2012-01-09 17:34:47, Jimmy Xiang wrote:
bq.  
bq.  -----------------------------------------------------------
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/3433/
bq.  -----------------------------------------------------------
bq.  
bq.  (Updated 2012-01-09 17:34:47)
bq.  
bq.  
bq.  Review request for hbase, Todd Lipcon, Ted Yu, Michael Stack, and Prakash Khemani.
bq.  
bq.  
bq.  Summary
bq.  -------
bq.  
bq.  Cleaned up the tests introduced in HBASE-5081, added some documentation.
bq.  
bq.  
bq.  This addresses bug HBASE-5150.
bq.      https://issues.apache.org/jira/browse/HBASE-5150
bq.  
bq.  
bq.  Diffs
bq.  -----
bq.  
bq.    src/main/java/org/apache/hadoop/hbase/master/SplitLogManager.java 0ef0e33 
bq.    src/test/java/org/apache/hadoop/hbase/master/TestDistributedLogSplitting.java b0487f1 
bq.    src/test/java/org/apache/hadoop/hbase/master/TestSplitLogManager.java 0974b56 
bq.  
bq.  Diff: https://reviews.apache.org/r/3433/diff
bq.  
bq.  
bq.  Testing
bq.  -------
bq.  
bq.  Affected tests: TestDistributedLogSplitting and TestSplitLogManager, are passed
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Jimmy
bq.  
bq.


                
> Fail in a thread may not fail a test, clean up log splitting test
> -----------------------------------------------------------------
>
>                 Key: HBASE-5150
>                 URL: https://issues.apache.org/jira/browse/HBASE-5150
>             Project: HBase
>          Issue Type: Test
>    Affects Versions: 0.94.0
>            Reporter: Jimmy Xiang
>            Assignee: Jimmy Xiang
>            Priority: Minor
>         Attachments: hbase-5150.txt
>
>
> This is to clean up some tests for HBASE-5081.  The Assert.fail method in a separate thread will terminate the thread, but may not fail the test.
> We can use callable, so that we can get the error in getting the result. 
> Some documentation to explain the test will be helpful too.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-5150) Fail in a thread may not fail a test, clean up log splitting test

Posted by "jiraposter@reviews.apache.org (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-5150?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13182346#comment-13182346 ] 

jiraposter@reviews.apache.org commented on HBASE-5150:
------------------------------------------------------


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/3433/#review4256
-----------------------------------------------------------



src/test/java/org/apache/hadoop/hbase/master/TestDistributedLogSplitting.java
<https://reviews.apache.org/r/3433/#comment9614>

    Should this read ', or until it is ...' ?



src/test/java/org/apache/hadoop/hbase/master/TestDistributedLogSplitting.java
<https://reviews.apache.org/r/3433/#comment9613>

    Typo: exception



src/test/java/org/apache/hadoop/hbase/master/TestSplitLogManager.java
<https://reviews.apache.org/r/3433/#comment9615>

    So this is no longer a failure case ?


- Ted


On 2012-01-09 01:32:36, Jimmy Xiang wrote:
bq.  
bq.  -----------------------------------------------------------
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/3433/
bq.  -----------------------------------------------------------
bq.  
bq.  (Updated 2012-01-09 01:32:36)
bq.  
bq.  
bq.  Review request for hbase, Todd Lipcon and Michael Stack.
bq.  
bq.  
bq.  Summary
bq.  -------
bq.  
bq.  Cleaned up the tests introduced in HBASE-5081, added some documentation.
bq.  
bq.  
bq.  This addresses bug HBASE-5150.
bq.      https://issues.apache.org/jira/browse/HBASE-5150
bq.  
bq.  
bq.  Diffs
bq.  -----
bq.  
bq.    src/main/java/org/apache/hadoop/hbase/master/SplitLogManager.java 0ef0e33 
bq.    src/test/java/org/apache/hadoop/hbase/master/TestDistributedLogSplitting.java b0487f1 
bq.    src/test/java/org/apache/hadoop/hbase/master/TestSplitLogManager.java 0974b56 
bq.  
bq.  Diff: https://reviews.apache.org/r/3433/diff
bq.  
bq.  
bq.  Testing
bq.  -------
bq.  
bq.  Affected tests: TestDistributedLogSplitting and TestSplitLogManager, are passed
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Jimmy
bq.  
bq.


                
> Fail in a thread may not fail a test, clean up log splitting test
> -----------------------------------------------------------------
>
>                 Key: HBASE-5150
>                 URL: https://issues.apache.org/jira/browse/HBASE-5150
>             Project: HBase
>          Issue Type: Test
>    Affects Versions: 0.94.0
>            Reporter: Jimmy Xiang
>            Assignee: Jimmy Xiang
>            Priority: Minor
>         Attachments: hbase-5150.txt
>
>
> This is to clean up some tests for HBASE-5081.  The Assert.fail method in a separate thread will terminate the thread, but may not fail the test.
> We can use callable, so that we can get the error in getting the result. 
> Some documentation to explain the test will be helpful too.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira