Skip to content

Commit

Permalink
format code
Browse files Browse the repository at this point in the history
  • Loading branch information
bohrqiu committed Oct 8, 2024
1 parent 92be78b commit d36ab09
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@
import com.alipay.sofa.rpc.server.SofaRejectedExecutionHandler;
import org.junit.Assert;
import org.junit.Test;

import java.util.Set;
import java.util.concurrent.Executor;
import java.util.concurrent.RejectedExecutionHandler;
import java.util.concurrent.ThreadPoolExecutor;

public class UserThreadPoolManagerTest {
Expand Down Expand Up @@ -69,11 +71,12 @@ public void userThreadPoolBuildTest() {
}

@Test
public void testRejectedExecutionHandler(){
public void testRejectedExecutionHandler() {
UserThreadPool userThreadPool = new UserThreadPool();
Executor executorService = userThreadPool.getUserExecutor();
Assert.assertTrue(executorService instanceof ThreadPoolExecutor);
Assert.assertTrue(((ThreadPoolExecutor) executorService).getRejectedExecutionHandler() instanceof SofaRejectedExecutionHandler);
RejectedExecutionHandler rejectedExecutionHandler = ((ThreadPoolExecutor) executorService).getRejectedExecutionHandler();
Assert.assertTrue(rejectedExecutionHandler instanceof SofaRejectedExecutionHandler);
}

@Test
Expand Down

0 comments on commit d36ab09

Please sign in to comment.