执行测试前检查kafka

This commit is contained in:
shiziyuan9527 2020-06-17 10:59:30 +08:00
parent 1e4db9b55f
commit 0bf62d76c3
1 changed files with 6 additions and 1 deletions

View File

@ -86,7 +86,12 @@ public class DockerTestEngine extends AbstractEngine {
testRequest.setTestData(context.getTestData());
testRequest.setEnv(context.getEnv());
restTemplate.postForObject(uri, testRequest, String.class);
try {
restTemplate.postForObject(uri, testRequest, String.class);
} catch (Exception e) {
LogUtil.error(e);
MSException.throwException(Translator.get("load_test_kafka_invalid"));
}
}
@Override