Skip to content

Commit

Permalink
Adjust SQL Server GitHub Action + fix flaky SQL Server Test
Browse files Browse the repository at this point in the history
  • Loading branch information
filiphr committed Aug 19, 2024
1 parent 234f9d2 commit 0ae1701
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/sql-server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ jobs:
fail-fast: false
matrix:
mssql: [2017-latest-ubuntu, 2019-latest]
include:
- mssql: 2017-latest-ubuntu
healthRunnable: /opt/mssql-tools/bin/sqlcmd
- mssql: 2019-latest
healthRunnable: /opt/mssql-tools18/bin/sqlcmd -C
services:
mssql:
image: mcr.microsoft.com/mssql/server:${{ matrix.mssql }}
Expand All @@ -30,7 +35,7 @@ jobs:
- 1433/tcp
# needed because the mssql container does not provide a health check
options: >-
--health-cmd="/opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P flowableStr0ngPassword -l 30 -Q \"SELECT 1\" || exit 1"
--health-cmd="${{ matrix.healthRunnable }} -S localhost -U sa -P flowableStr0ngPassword -l 30 -Q \"SELECT 1\" || exit 1"
--health-start-period 10s
--health-interval 10s
--health-timeout 5s
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@

import java.io.IOException;
import java.io.Serializable;
import java.sql.Date;
import java.time.Instant;
import java.time.temporal.ChronoUnit;
import java.util.Date;

import org.apache.http.HttpStatus;
import org.apache.http.client.methods.CloseableHttpResponse;
Expand Down Expand Up @@ -57,6 +57,8 @@ public class CaseInstanceResourceTest extends BaseSpringRestTestCase {
@CmmnDeployment(resources = { "org/flowable/cmmn/rest/service/api/repository/oneHumanTaskCase.cmmn" })
public void testGetCaseInstance() throws Exception {
Authentication.setAuthenticatedUserId("getCaseUser");
cmmnEngineConfiguration.getClock()
.setCurrentTime(Date.from(Instant.now().truncatedTo(ChronoUnit.SECONDS)));
CaseInstance caseInstance = runtimeService.createCaseInstanceBuilder()
.caseDefinitionKey("oneHumanTaskCase")
.businessKey("myBusinessKey")
Expand Down

0 comments on commit 0ae1701

Please sign in to comment.