@Test
    public void testHystrixTimeout() {
        providerConfig = defaultServer(2000);
        providerConfig.export();

        consumerConfig = defaultClient()
            .setTimeout(10000);

        HystrixService HystrixService = consumerConfig.refer();

        long start = System.currentTimeMillis();
        try {
            HystrixService.sayHello("abc", 24);
            Future future = SofaResponseFuture.getFuture();
            Assert.assertFalse(future.isDone());
            Assert.assertFalse(future.isCancelled());
            SofaResponseFuture.getResponse(10000, true);
            Assert.fail();
        } catch (Exception e) {
            Assert.assertTrue(e instanceof SofaRpcException);
            final Throwable cause = e.getCause();
            Assert.assertTrue(cause.getMessage(), cause instanceof HystrixRuntimeException);
            Assert.assertTrue((System.currentTimeMillis() - start) > HYSTRIX_DEFAULT_TIMEOUT);
        }
    }
@author <a href=mailto:scienjus@gmail.com>ScienJus</a>
test/test-integration/src/test/java/com/alipay/sofa/rpc/hystrix/HystrixFilterAsyncTest.java