Skip to content

Commit 0ae1701

Browse files
committed
Adjust SQL Server GitHub Action + fix flaky SQL Server Test
1 parent 234f9d2 commit 0ae1701

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

.github/workflows/sql-server.yml

+6-1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ jobs:
2020
fail-fast: false
2121
matrix:
2222
mssql: [2017-latest-ubuntu, 2019-latest]
23+
include:
24+
- mssql: 2017-latest-ubuntu
25+
healthRunnable: /opt/mssql-tools/bin/sqlcmd
26+
- mssql: 2019-latest
27+
healthRunnable: /opt/mssql-tools18/bin/sqlcmd -C
2328
services:
2429
mssql:
2530
image: mcr.microsoft.com/mssql/server:${{ matrix.mssql }}
@@ -30,7 +35,7 @@ jobs:
3035
- 1433/tcp
3136
# needed because the mssql container does not provide a health check
3237
options: >-
33-
--health-cmd="/opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P flowableStr0ngPassword -l 30 -Q \"SELECT 1\" || exit 1"
38+
--health-cmd="${{ matrix.healthRunnable }} -S localhost -U sa -P flowableStr0ngPassword -l 30 -Q \"SELECT 1\" || exit 1"
3439
--health-start-period 10s
3540
--health-interval 10s
3641
--health-timeout 5s

modules/flowable-cmmn-rest/src/test/java/org/flowable/cmmn/rest/service/api/runtime/CaseInstanceResourceTest.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818

1919
import java.io.IOException;
2020
import java.io.Serializable;
21-
import java.sql.Date;
2221
import java.time.Instant;
2322
import java.time.temporal.ChronoUnit;
23+
import java.util.Date;
2424

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

0 commit comments

Comments
 (0)