Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
funky-eyes committed Jan 20, 2025
1 parent 73682b1 commit b28bf40
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,9 @@ public void testHandleCommand() throws Exception {
msg.add(rpcRequestCommand2);
RpcCommandHandler rpcCommandHandler = new RpcCommandHandler(new RpcCommandFactory());
rpcCommandHandler.handleCommand(remotingContext, msg);
countDownLatch.await(10, TimeUnit.SECONDS);
Assert.assertTrue(remotingContextList.size() == 2);
boolean result = countDownLatch.await(10, TimeUnit.SECONDS);
Assert.assertTrue(result);
Assert.assertEquals(2, remotingContextList.size());
Assert.assertTrue(remotingContextList.get(0).getTimeout() != remotingContextList.get(1).getTimeout());
}

Expand All @@ -89,7 +90,8 @@ public boolean isStarted() {

@Override
public BizContext preHandleRequest(RemotingContext remotingCtx, Object request) {
Assert.assertTrue(remotingCtx != remotingContext);
System.out.println(request.getClass()+"|"+remotingCtx+"|"+remotingContext);
Assert.assertNotSame(remotingCtx, remotingContext);
remotingContextList.add(remotingCtx);
countDownLatch.countDown();
return null;
Expand Down

0 comments on commit b28bf40

Please sign in to comment.