You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by li...@apache.org on 2014/02/26 20:18:32 UTC
svn commit: r1572205 -
/hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/thrift/TestThriftServer.java
Author: liyin
Date: Wed Feb 26 19:18:31 2014
New Revision: 1572205
URL: http://svn.apache.org/r1572205
Log:
[HBASE-10450] Fix the Thrift test cases
Author: rshroff
Summary:
The TestThriftServer is the base class for testing all HBase operations
from thrift via different thrift servers. Hence a failure in TestThriftServer
fails multiple test cases. Also TestThriftServer takes the Hbase.Iface as
an input to perform all the operations. The Hbase.Iface can either be the standard
HBase thrift client or the ThriftServerRunner.HBaseHandler (which acts as an
intermediate between the client and the hbase client). The bug is that
the TestThriftServer now assumes the Hbase.Iface to be always of type HBaseHandler,
which causes the problem. Hence, removing it.
Test Plan: run unit tests.
Reviewers: manukranthk, daviddeng
Reviewed By: daviddeng
CC: hbase-eng@
Differential Revision: https://phabricator.fb.com/D1186452
Modified:
hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/thrift/TestThriftServer.java
Modified: hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/thrift/TestThriftServer.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/thrift/TestThriftServer.java?rev=1572205&r1=1572204&r2=1572205&view=diff
==============================================================================
--- hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/thrift/TestThriftServer.java (original)
+++ hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/thrift/TestThriftServer.java Wed Feb 26 19:18:31 2014
@@ -558,8 +558,10 @@ public class TestThriftServer {
LOG.info("Region found:" + regions.get(0));
handler.disableTable(tableAname);
handler.deleteTable(tableAname);
- ((ThriftServerRunner.HBaseHandler) handler).getTable(tableAname)
+ if (handler instanceof ThriftServerRunner.HBaseHandler) {
+ ((ThriftServerRunner.HBaseHandler) handler).getTable(tableAname)
.clearRegionCache();
+ }
regionCount = handler.getTableRegions(tableAname).size();
assertEquals("non-existing table should have 0 region, " +
"but found " + regionCount, regionCount, 0);