From 3faa2fca1d3d53a862c9ef164b997613b74e280d Mon Sep 17 00:00:00 2001 From: jstastny-cz Date: Thu, 26 Sep 2024 16:24:50 +0200 Subject: [PATCH] [7.67.x-blue] improve assertion messages for UserTaskAdminServiceIntegrationTest.testErrorHandling --- .../jbpm/admin/UserTaskAdminServiceIntegrationTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kie-server-parent/kie-server-tests/kie-server-integ-tests-jbpm/src/test/java/org/kie/server/integrationtests/jbpm/admin/UserTaskAdminServiceIntegrationTest.java b/kie-server-parent/kie-server-tests/kie-server-integ-tests-jbpm/src/test/java/org/kie/server/integrationtests/jbpm/admin/UserTaskAdminServiceIntegrationTest.java index e4a6191c8c..5827345224 100644 --- a/kie-server-parent/kie-server-tests/kie-server-integ-tests-jbpm/src/test/java/org/kie/server/integrationtests/jbpm/admin/UserTaskAdminServiceIntegrationTest.java +++ b/kie-server-parent/kie-server-tests/kie-server-integ-tests-jbpm/src/test/java/org/kie/server/integrationtests/jbpm/admin/UserTaskAdminServiceIntegrationTest.java @@ -1112,7 +1112,7 @@ public void testErrorHandling() throws Exception { List errors = processAdminClient.getErrors(CONTAINER_ID, false, 0, 10); assertNotNull(errors); - assertEquals(0, errors.size()); + Assertions.assertThat(errors).as("Check there are no errors before.").isEmpty(); try { processClient.signalProcessInstance(CONTAINER_ID, processInstanceId, "Signal1", null); @@ -1123,7 +1123,7 @@ public void testErrorHandling() throws Exception { errors = processAdminClient.getErrorsByProcessInstance(CONTAINER_ID, processInstanceId, false, 0, 10); assertNotNull(errors); - assertEquals(1, errors.size()); + Assertions.assertThat(errors).as("Check that the previous error is returned.").hasSize(1); ExecutionErrorInstance errorInstance = errors.get(0); assertNotNull(errorInstance.getErrorId()); assertNull(errorInstance.getError());