From 67ab8b888f8b393979624a2bd7d527fefd9dd6d7 Mon Sep 17 00:00:00 2001 From: huzheng Date: Thu, 6 Dec 2018 11:26:52 +0800 Subject: [PATCH] HBASE-21551 Memory leak when use scan with STREAM at server side - (addendum) --- .../hbase/regionserver/TestSwitchToStreamRead.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestSwitchToStreamRead.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestSwitchToStreamRead.java index 037b13e9b80..c1cecf8b590 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestSwitchToStreamRead.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestSwitchToStreamRead.java @@ -47,9 +47,9 @@ import org.apache.hadoop.hbase.regionserver.ScannerContext.LimitScope; import org.apache.hadoop.hbase.testclassification.MediumTests; import org.apache.hadoop.hbase.testclassification.RegionServerTests; import org.apache.hadoop.hbase.util.Bytes; -import org.junit.AfterClass; +import org.junit.After; import org.junit.Assert; -import org.junit.BeforeClass; +import org.junit.Before; import org.junit.ClassRule; import org.junit.Ignore; import org.junit.Test; @@ -74,8 +74,8 @@ public class TestSwitchToStreamRead { private static HRegion REGION; - @BeforeClass - public static void setUp() throws IOException { + @Before + public void setUp() throws IOException { UTIL.getConfiguration().setLong(StoreScanner.STORESCANNER_PREAD_MAX_BYTES, 2048); StringBuilder sb = new StringBuilder(256); for (int i = 0; i < 255; i++) { @@ -99,8 +99,8 @@ public class TestSwitchToStreamRead { } } - @AfterClass - public static void tearDown() throws IOException { + @After + public void tearDown() throws IOException { REGION.close(true); UTIL.cleanupTestDir(); }