Skip to content

Commit 903e795

Browse files
author
Philip Z
committed
Verify Business ID allocation on isolated DM8
1 parent 351c74c commit 903e795

3 files changed

Lines changed: 35 additions & 2 deletions

File tree

‎examples/business-id-runtime/README.md‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,20 @@ mvn -pl examples/business-id-runtime -am \
3131
-Dtest=BusinessIdRuntimeExampleTest \
3232
-Dsurefire.failIfNoSpecifiedTests=false test
3333
```
34+
35+
The live suite also verifies PostgreSQL, MySQL, and SQL Server in CI. The
36+
SQL Server cases include independent-connection allocation and concurrent
37+
schema startup. The DM8 case is deliberately local-only until a durable,
38+
licensed CI image is available. Run it only against a disposable DM8 instance;
39+
the test refuses to run without `TEAQL_TEST_DM8_ISOLATED=true`:
40+
41+
```bash
42+
TEAQL_REQUIRE_LIVE_DB=true \
43+
TEAQL_TEST_DM8_ISOLATED=true \
44+
TEAQL_TEST_DM8_URL='jdbc:dm://127.0.0.1:5236' \
45+
TEAQL_TEST_DM8_USER='SYSDBA' \
46+
TEAQL_TEST_DM8_PASSWORD='<test-instance-password>' \
47+
mvn -pl examples/business-id-runtime -am \
48+
'-Dtest=JdbcBusinessIdLiveDialectIT#dm8AllocatesAcrossInstancesAndRestart' \
49+
-Dsurefire.failIfNoSpecifiedTests=false test
50+
```

‎examples/business-id-runtime/pom.xml‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,5 +49,11 @@
4949
<version>13.4.0.jre11</version>
5050
<scope>test</scope>
5151
</dependency>
52+
<dependency>
53+
<groupId>com.dameng</groupId>
54+
<artifactId>DmJdbcDriver18</artifactId>
55+
<version>8.1.3.140</version>
56+
<scope>test</scope>
57+
</dependency>
5258
</dependencies>
5359
</project>

‎examples/business-id-runtime/src/test/java/io/teaql/examples/businessid/JdbcBusinessIdLiveDialectIT.java‎

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ public void sqlServerAllocatesAcrossInstancesAndRestart() throws Exception {
4444
verify("MSSQL");
4545
}
4646

47+
@Test
48+
public void dm8AllocatesAcrossInstancesAndRestart() throws Exception {
49+
verify("DM8");
50+
}
51+
4752
@Test
4853
public void sqlServerConcurrentSchemaStartupIsIdempotent() throws Exception {
4954
String url = System.getenv("TEAQL_TEST_MSSQL_URL");
@@ -99,8 +104,13 @@ private void verify(String dialect) throws Exception {
99104
}
100105
Assume.assumeTrue(dialect + " live database is not configured", false);
101106
}
102-
Assert.assertTrue("Use a dedicated teaql_live_* database for " + dialect,
103-
url.contains("teaql_live_"));
107+
if ("DM8".equals(dialect)) {
108+
Assert.assertEquals("Use only an isolated disposable DM8 instance",
109+
"true", System.getenv("TEAQL_TEST_DM8_ISOLATED"));
110+
} else {
111+
Assert.assertTrue("Use a dedicated teaql_live_* database for " + dialect,
112+
url.contains("teaql_live_"));
113+
}
104114

105115
BusinessIdDefinition definition = BusinessIdDefinition.dailySequence(
106116
"order_number", "CO", "commerce_order");

0 commit comments

Comments
 (0)