-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HBASE-28608 Correct client meta operation timeout to default to clien…
…t operation timeout
- Loading branch information
Daniel Roudnitsky
committed
Jun 18, 2024
1 parent
f2b7b77
commit ec99eab
Showing
4 changed files
with
53 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestConnectionConfiguration.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package org.apache.hadoop.hbase.client; | ||
|
||
import static org.junit.Assert.assertEquals; | ||
import org.apache.hadoop.conf.Configuration; | ||
import org.apache.hadoop.hbase.HBaseClassTestRule; | ||
import org.apache.hadoop.hbase.HBaseConfiguration; | ||
import org.apache.hadoop.hbase.HConstants; | ||
import org.apache.hadoop.hbase.testclassification.ClientTests; | ||
import org.apache.hadoop.hbase.testclassification.SmallTests; | ||
import org.junit.ClassRule; | ||
import org.junit.Test; | ||
import org.junit.experimental.categories.Category; | ||
|
||
/** | ||
* See HBASE-28608. Configuration tests for (non async) connections | ||
*/ | ||
@Category({ ClientTests.class, SmallTests.class }) | ||
public class TestConnectionConfiguration { | ||
|
||
@ClassRule | ||
public static final HBaseClassTestRule CLASS_RULE = | ||
HBaseClassTestRule.forClass(TestConnectionConfiguration.class); | ||
|
||
@Test | ||
public void testDefaultMetaOperationTimeout() { | ||
Configuration conf = HBaseConfiguration.create(); | ||
long clientOperationTimeoutMs = 1000; | ||
conf.setLong(HConstants.HBASE_CLIENT_OPERATION_TIMEOUT, clientOperationTimeoutMs); | ||
ConnectionConfiguration config = new ConnectionConfiguration(conf); | ||
assertEquals(clientOperationTimeoutMs, config.getOperationTimeout()); | ||
assertEquals(clientOperationTimeoutMs, config.getMetaOperationTimeout()); | ||
} | ||
|
||
} |