From e6264c9573bdac22ab2a56be88998f2d6530f62b Mon Sep 17 00:00:00 2001 From: stack Date: Wed, 1 Apr 2020 17:49:35 -0700 Subject: [PATCH] HBASE-24100 [Flakey Tests] Add test to check we work properly when port clash setting up thriftserver Addendum; add missing @ClassRule --- .../hadoop/hbase/thrift/TestBindExceptionHandling.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/hbase-thrift/src/test/java/org/apache/hadoop/hbase/thrift/TestBindExceptionHandling.java b/hbase-thrift/src/test/java/org/apache/hadoop/hbase/thrift/TestBindExceptionHandling.java index 0658ed80f32..fa1d141df82 100644 --- a/hbase-thrift/src/test/java/org/apache/hadoop/hbase/thrift/TestBindExceptionHandling.java +++ b/hbase-thrift/src/test/java/org/apache/hadoop/hbase/thrift/TestBindExceptionHandling.java @@ -17,14 +17,20 @@ */ package org.apache.hadoop.hbase.thrift; +import static org.junit.Assert.assertNotNull; +import org.apache.hadoop.hbase.HBaseClassTestRule; import org.apache.hadoop.hbase.testclassification.ClientTests; import org.apache.hadoop.hbase.testclassification.MediumTests; +import org.junit.ClassRule; import org.junit.Test; import org.junit.experimental.categories.Category; -import static org.junit.Assert.assertNotNull; @Category({ ClientTests.class, MediumTests.class}) public class TestBindExceptionHandling { + @ClassRule + public static final HBaseClassTestRule CLASS_RULE = + HBaseClassTestRule.forClass(TestBindExceptionHandling.class); + /** * See if random port choosing works around port clashes */