[ 
https://issues.apache.org/jira/browse/HBASE-19310?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16263765#comment-16263765
 ] 

Hudson commented on HBASE-19310:
--------------------------------

FAILURE: Integrated in Jenkins build HBase-2.0 #899 (See 
[https://builds.apache.org/job/HBase-2.0/899/])
HBASE-19310 Avoid an NPE IntegrationTestImportTsv when outside of the (elserj: 
rev 46cb5d598689577b01cc7690587ae94579b70a11)
* (edit) 
hbase-it/src/test/java/org/apache/hadoop/hbase/mapreduce/IntegrationTestImportTsv.java


> Verify IntegrationTests don't rely on Rules outside of JUnit context
> --------------------------------------------------------------------
>
>                 Key: HBASE-19310
>                 URL: https://issues.apache.org/jira/browse/HBASE-19310
>             Project: HBase
>          Issue Type: Bug
>          Components: integration tests
>            Reporter: Romil Choksi
>            Assignee: Josh Elser
>            Priority: Critical
>             Fix For: 2.0.0-beta-1
>
>         Attachments: HBASE-19310.001.branch-2.patch, 
> HBASE-19310.002.branch-2.patch
>
>
> {noformat}
> 2017-11-16 00:43:41,204 INFO  [main] mapreduce.IntegrationTestImportTsv: 
> Running test testGenerateAndLoad.
> Exception in thread "main" java.lang.NullPointerException
>   at org.apache.hadoop.hbase.TableName.valueOf(TableName.java:461)
>   at 
> org.apache.hadoop.hbase.mapreduce.IntegrationTestImportTsv.testGenerateAndLoad(IntegrationTestImportTsv.java:189)
>   at 
> org.apache.hadoop.hbase.mapreduce.IntegrationTestImportTsv.run(IntegrationTestImportTsv.java:229)
>   at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:76)
>   at 
> org.apache.hadoop.hbase.mapreduce.IntegrationTestImportTsv.main(IntegrationTestImportTsv.java:239)
> {noformat}
> (Potential line-number skew)
> {code}
>   @Test
>   public void testGenerateAndLoad() throws Exception {
>     LOG.info("Running test testGenerateAndLoad.");
>     final TableName table = TableName.valueOf(name.getMethodName());
> {code}
> The JUnit framework sets the test method name inside of the JUnit {{Rule}}. 
> When we invoke the test directly (ala {{hbase 
> org.apache.hadoop.hbase.mapreduce.IntegrationTestImportTsv}}), this 
> {{getMethodName()}} returns {{null}} and we get the above stacktrace.
> Should make a pass over the ITs with main methods and {{Rule}}'s to make sure 
> we don't have this lurking. Another alternative is to just remove the main 
> methods and just force use of {{IntegrationTestsDriver}} instead.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to