Skip to content

Commit

Permalink
[ML] Improve assertion error msg in ResetJobIT (#89653)
Browse files Browse the repository at this point in the history
This adds an error message that reveals the audit messages
if the assertion that the last msg is about resetting the job
fails.

Relates #89644
  • Loading branch information
dimitris-athanasiou authored Aug 26, 2022
1 parent c348003 commit 6849031
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public void testReset() throws IOException {

List<String> auditMessages = fetchAllAuditMessages(job.getId());
assertThat(auditMessages.isEmpty(), is(false));
assertThat(auditMessages.get(auditMessages.size() - 1), equalTo("Job has been reset"));
assertThat("Audit messages: " + auditMessages, auditMessages.get(auditMessages.size() - 1), equalTo("Job has been reset"));
}

private Job.Builder createJob(String jobId, TimeValue bucketSpan) {
Expand Down

0 comments on commit 6849031

Please sign in to comment.