use of com.dtflys.forest.logging.LogConfiguration in project forest by dromara.
the class Test1 method testClient1.
@Test
public void testClient1() {
StopWatch sw = new StopWatch();
sw.start();
ForestResponse response = baiduClient.testTimeout("xxx");
sw.stop();
assertNotNull(response);
ForestRequest request = response.getRequest();
int reqTimeout = request.getTimeout();
assertEquals(50, reqTimeout);
long time = sw.getTotalTimeMillis();
assertTrue(time >= 50);
assertTrue(time <= 3600);
LogConfiguration logConfiguration = request.getLogConfiguration();
assertTrue(logConfiguration.isLogEnabled());
assertTrue(logConfiguration.isLogRequest());
// assertTrue(logConfiguration.isLogResponseStatus());
// assertTrue(!logConfiguration.isLogResponseContent());
// assertTrue(logConfiguration.getLogHandler() instanceof TestLogHandler);
}
Aggregations