@camunda/e2e-test-suite 0.0.1588 → 0.0.1590
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -31,7 +31,10 @@ class PhysicalTenantPage {
|
|
|
31
31
|
await (0, test_1.expect)(banner).toBeVisible({ timeout: 60000 });
|
|
32
32
|
}
|
|
33
33
|
async expectInstance(processId, instanceKey, visible) {
|
|
34
|
-
|
|
34
|
+
// Each physical tenant has its own key space, so the same instance key can
|
|
35
|
+
// exist in both. Operate only honours `processDefinitionId` (an unknown
|
|
36
|
+
// `process` param is dropped), which scopes the lookup to this process.
|
|
37
|
+
await this.page.goto(`${this.root}/operate/processes?active=true&incidents=true&completed=true&canceled=true&processDefinitionId=${encodeURIComponent(processId)}&processInstanceKey=${instanceKey}`);
|
|
35
38
|
const instance = this.page.getByRole('link', {
|
|
36
39
|
name: `View instance ${instanceKey}`,
|
|
37
40
|
exact: true,
|
|
@@ -19,18 +19,24 @@ class TenantAPI {
|
|
|
19
19
|
async deploy(connector = false) {
|
|
20
20
|
const id = `PhysicalTenant_${await (0, _setup_1.generateRandomStringAsync)(16)}`;
|
|
21
21
|
const model = await (0, promises_1.readFile)(`resources/c8run-physical-tenant-${connector ? 'connector' : 'isolation'}.bpmn`, 'utf8');
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
22
|
+
const buffer = Buffer.from(model.replace('PHYSICAL_TENANT_PROCESS', id));
|
|
23
|
+
let response;
|
|
24
|
+
// On slow native runners (macOS Intel) the single broker's actors stall
|
|
25
|
+
// for up to a minute while every suite starts at once, and the gateway
|
|
26
|
+
// answers 504 DEADLINE_EXCEEDED / 503 RESOURCE_EXHAUSTED. Retrying is safe:
|
|
27
|
+
// the same bytes under the same resource name are deduplicated by the
|
|
28
|
+
// engine, so a retry returns the original definition, not a new version.
|
|
29
|
+
await (0, test_1.expect)(async () => {
|
|
30
|
+
response = await this.request.post(`${this.root}/v2/deployments`, {
|
|
31
|
+
// Native Windows can exceed the inherited 10s action timeout while
|
|
32
|
+
// concurrent suites deploy.
|
|
33
|
+
timeout: 60000,
|
|
34
|
+
multipart: {
|
|
35
|
+
resources: { name: `${id}.bpmn`, mimeType: 'application/xml', buffer },
|
|
31
36
|
},
|
|
32
|
-
}
|
|
33
|
-
|
|
37
|
+
});
|
|
38
|
+
(0, test_1.expect)([503, 504], await response.text()).not.toContain(response.status());
|
|
39
|
+
}).toPass({ timeout: 180000, intervals: [5000, 10000, 15000] });
|
|
34
40
|
(0, test_1.expect)(response.status(), await response.text()).toBe(200);
|
|
35
41
|
const body = await response.json();
|
|
36
42
|
const definition = body.deployments[0].processDefinition;
|
|
@@ -46,6 +52,9 @@ class TenantAPI {
|
|
|
46
52
|
}
|
|
47
53
|
async create(key, variables = {}) {
|
|
48
54
|
const response = await this.request.post(`${this.root}/v2/process-instances`, {
|
|
55
|
+
// Not idempotent, so never resent; wait out a busy broker instead of
|
|
56
|
+
// the inherited 10s action timeout (the gateway itself caps at 15s).
|
|
57
|
+
timeout: 60000,
|
|
49
58
|
data: { processDefinitionKey: key, variables },
|
|
50
59
|
});
|
|
51
60
|
(0, test_1.expect)(response.status(), await response.text()).toBe(200);
|