[ml] [test] changed error handling
Original commit: elastic/x-pack-elasticsearch@75cacd82a4
This commit is contained in:
parent
5386beec29
commit
dd33fae50f
|
@ -124,7 +124,10 @@ public abstract class BaseMlIntegTestCase extends SecurityIntegTestCase {
|
||||||
client.execute(CloseJobAction.INSTANCE, new CloseJobAction.Request(jobId)).get();
|
client.execute(CloseJobAction.INSTANCE, new CloseJobAction.Request(jobId)).get();
|
||||||
assertTrue(response.isClosed());
|
assertTrue(response.isClosed());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.warn("Job [" + jobId + "] couldn't be closed", e);
|
// CONFLICT is ok, as it means the job has been closed already, which isn't an issue at all.
|
||||||
|
if (RestStatus.CONFLICT != ExceptionsHelper.status(e.getCause())) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
DeleteJobAction.Response response =
|
DeleteJobAction.Response response =
|
||||||
client.execute(DeleteJobAction.INSTANCE, new DeleteJobAction.Request(jobId)).get();
|
client.execute(DeleteJobAction.INSTANCE, new DeleteJobAction.Request(jobId)).get();
|
||||||
|
|
Loading…
Reference in New Issue