@@ -0,0 +1,1180 @@
+/*%0A * The Alluxio Open Foundation licenses this work under the Apache License, version 2.0%0A * (the %22License%22). You may not use this work except in compliance with the License, which is%0A * available at www.apache.org/licenses/LICENSE-2.0%0A *%0A * This software is distributed on an %22AS IS%22 basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,%0A * either express or implied, as more fully set forth in the License.%0A *%0A * See the NOTICE file distributed with this work for information regarding copyright ownership.%0A */%0A%0Apackage alluxio.client.block;%0A%0Aimport io.netty.util.internal.chmv8.ConcurrentHashMapV8;%0Aimport org.powermock.reflect.Whitebox;%0A%0Aimport java.net.InetSocketAddress;%0A%0A/**%0A * Test utils for %7B@link BlockStoreContext%7D.%0A */%0Apublic class BlockStoreContextTestUtils %7B%0A  /**%0A   * Resets the %7B@link BlockStoreContext#mBlockMasterClientPool%7D.%0A   */%0A  public static void resetPool() %7B%0A    ConcurrentHashMapV8%3CInetSocketAddress, BlockWorkerThriftClientPool%3E poolMap =%0A        Whitebox.getInternalState(BlockStoreContext.class, %22BLOCK_WORKER_THRIFT_CLIENT_POOL%22);%0A    for (BlockWorkerThriftClientPool pool : poolMap.values()) %7B%0A      pool.close();%0A    %7D%0A    poolMap.clear();%0A  %7D%0A%7D%0A

Add BlockStoreContextTestUtils to clear pool.