get logs
This commit is contained in:
parent
68ad0c54d9
commit
ad26dc0c65
|
@ -133,8 +133,10 @@ public class KubernetesTestEngine extends AbstractEngine {
|
||||||
ClientCredential clientCredential = JSON.parseObject(configuration, ClientCredential.class);
|
ClientCredential clientCredential = JSON.parseObject(configuration, ClientCredential.class);
|
||||||
KubernetesProvider provider = new KubernetesProvider(JSON.toJSONString(clientCredential));
|
KubernetesProvider provider = new KubernetesProvider(JSON.toJSONString(clientCredential));
|
||||||
provider.confirmNamespace(loadTest.getProjectId());
|
provider.confirmNamespace(loadTest.getProjectId());
|
||||||
String joblog = provider.getKubernetesClient().batch().jobs().inNamespace(loadTest.getProjectId()).withName("job-" + loadTest.getId()).getLog();
|
try (KubernetesClient client = provider.getKubernetesClient()) {
|
||||||
logs.put(clientCredential.getMasterUrl(), joblog);
|
String joblog = client.batch().jobs().inNamespace(loadTest.getProjectId()).withName("job-" + loadTest.getId()).getLog();
|
||||||
|
logs.put(clientCredential.getMasterUrl(), joblog);
|
||||||
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
MSException.throwException(e);
|
MSException.throwException(e);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue