Skip to content

Commit

Permalink
Revert "RHPAM-4779: SLA due date value in ProcessInstanceLog table is…
Browse files Browse the repository at this point in the history
… not upd… (kiegroup#2396) (kiegroup#2436)"

This reverts commit 2d8b32b.
  • Loading branch information
gmunozfe committed Oct 10, 2024
1 parent 2d8b32b commit 64c0e51
Showing 1 changed file with 2 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
import java.util.Collection;
import java.time.LocalDate;
import java.time.ZoneId;
import java.util.Date;
Expand Down Expand Up @@ -57,10 +58,6 @@
public class ServicesAwareAuditEventBuilderTest extends AbstractKieServicesBaseTest {

private static final Logger logger = LoggerFactory.getLogger(ProcessServiceImplTest.class);

private static final Date TEST_DATE = Date.from(LocalDate.of(2024, 3, 14).atStartOfDay(ZoneId.systemDefault()).toInstant());

private static final String TEST_DEPLOYMENT_UNIT = "unit1";

private static final Date TEST_DATE = Date.from(LocalDate.of(2024, 3, 14).atStartOfDay(ZoneId.systemDefault()).toInstant());

Expand Down Expand Up @@ -103,7 +100,7 @@ private void setUpMocks() {
when(processInstance.getId()).thenReturn(1L);
when(processInstance.getDescription()).thenReturn("Some test Process");
when(processInstance.getSlaCompliance()).thenReturn(0);

when(processInstance.getSlaDueDate()).thenReturn(TEST_DATE);
when(processInstance.getMetaData()).thenReturn(processMetadata);

Expand All @@ -130,22 +127,6 @@ public void testBuildProcessStartedEvent() {

assertEquals("testUser", log.getIdentity());
}

/**
* Test build the ProcessInstanceLog for data change
*/
@Test
public void testBuildProcessDataChangedEventImpl() {

ProcessDataChangedEvent pdce = new ProcessDataChangedEventImpl(processInstance, kieRuntime);

ProcessInstanceLog log = (ProcessInstanceLog) builder.buildEvent(pdce);

assertEquals(TEST_DATE, log.getSlaDueDate());

assertEquals(TEST_DEPLOYMENT_UNIT, log.getExternalId());

}

/**
* Test build the ProcessInstanceLog for data change
Expand Down

0 comments on commit 64c0e51

Please sign in to comment.