Added: hadoop/hbase/trunk/core/src/test/java/org/apache/hadoop/hbase/master/TestRegionServerOperationQueue.java URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/core/src/test/java/org/apache/hadoop/hbase/master/TestRegionServerOperationQueue.java?rev=939567&view=auto ============================================================================== --- hadoop/hbase/trunk/core/src/test/java/org/apache/hadoop/hbase/master/TestRegionServerOperationQueue.java (added) +++ hadoop/hbase/trunk/core/src/test/java/org/apache/hadoop/hbase/master/TestRegionServerOperationQueue.java Fri Apr 30 06:52:27 2010 @@ -0,0 +1,47 @@ +/** + * Copyright 2010 The Apache Software Foundation + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.hadoop.hbase.master; +import java.util.concurrent.atomic.AtomicBoolean; + +import org.apache.hadoop.conf.Configuration; +import org.junit.After; +import org.junit.Before; + +/** + * Test the queue used to manage RegionServerOperations. + * Currently RegionServerOperationQueue is untestable because each + * RegionServerOperation has a {...@link HMaster} reference. TOOD: Fix. + */ +public class TestRegionServerOperationQueue { + private RegionServerOperationQueue queue; + private Configuration conf; + private AtomicBoolean closed; + + @Before + public void setUp() throws Exception { + this.closed = new AtomicBoolean(false); + this.conf = new Configuration(); + this.queue = new RegionServerOperationQueue(this.conf, this.closed); + } + + @After + public void tearDown() throws Exception { + } +} \ No newline at end of file
Modified: hadoop/hbase/trunk/core/src/test/java/org/apache/hadoop/hbase/regionserver/DisabledTestRegionServerExit.java URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/core/src/test/java/org/apache/hadoop/hbase/regionserver/DisabledTestRegionServerExit.java?rev=939567&r1=939566&r2=939567&view=diff ============================================================================== --- hadoop/hbase/trunk/core/src/test/java/org/apache/hadoop/hbase/regionserver/DisabledTestRegionServerExit.java (original) +++ hadoop/hbase/trunk/core/src/test/java/org/apache/hadoop/hbase/regionserver/DisabledTestRegionServerExit.java Fri Apr 30 06:52:27 2010 @@ -37,6 +37,7 @@ import org.apache.hadoop.hbase.client.Re import org.apache.hadoop.hbase.client.ResultScanner; import org.apache.hadoop.hbase.client.Scan; import org.apache.hadoop.hbase.util.Bytes; +import org.apache.hadoop.hbase.util.JVMClusterUtil; /** * Tests region server failover when a region server exits both cleanly and @@ -123,8 +124,8 @@ public class DisabledTestRegionServerExi * is just shut down. */ private void stopOrAbortMetaRegionServer(boolean abort) { - List<LocalHBaseCluster.RegionServerThread> regionThreads = - cluster.getRegionThreads(); + List<JVMClusterUtil.RegionServerThread> regionThreads = + cluster.getRegionServerThreads(); int server = -1; for (int i = 0; i < regionThreads.size() && server == -1; i++) { Modified: hadoop/hbase/trunk/core/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestLogRolling.java URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/core/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestLogRolling.java?rev=939567&r1=939566&r2=939567&view=diff ============================================================================== --- hadoop/hbase/trunk/core/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestLogRolling.java (original) +++ hadoop/hbase/trunk/core/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestLogRolling.java Fri Apr 30 06:52:27 2010 @@ -99,7 +99,7 @@ public class TestLogRolling extends HBas private void startAndWriteData() throws Exception { // When the META table can be opened, the region servers are running new HTable(conf, HConstants.META_TABLE_NAME); - this.server = cluster.getRegionThreads().get(0).getRegionServer(); + this.server = cluster.getRegionServerThreads().get(0).getRegionServer(); this.log = server.getLog(); // Create the test table and open it