Skip to content

Commit

Permalink
Refetch case instances to make sure the time that we compare against …
Browse files Browse the repository at this point in the history
…is the same as in the DB

SQL Server sometimes rounds up the time, with this approach we avoid having flaky tests on SQL Server
  • Loading branch information
filiphr committed Aug 28, 2024
1 parent d4d26c8 commit 0b8a631
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,8 @@ public void testQueryCaseInstancesPagingAndSorting() throws Exception {
Authentication.setAuthenticatedUserId("queryCaseUser");
CaseInstance caseInstance1 = runtimeService.createCaseInstanceBuilder().caseDefinitionKey("oneHumanTaskCase").start();
CaseInstance caseInstance2 = runtimeService.createCaseInstanceBuilder().caseDefinitionKey("testRepeatingStage").start();
caseInstance1 = runtimeService.createCaseInstanceQuery().caseInstanceId(caseInstance1.getId()).singleResult();
caseInstance2 = runtimeService.createCaseInstanceQuery().caseInstanceId(caseInstance2.getId()).singleResult();

// Create request node
ObjectNode requestNode = objectMapper.createObjectNode();
Expand Down

0 comments on commit 0b8a631

Please sign in to comment.