Skip to content

Commit 0ed2d47

Browse files
committed
test: increase test timeout
1 parent 4aa3671 commit 0ed2d47

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

tests/integration/process-instances.test.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@ import { deploy } from '../../src/commands/deployments.ts';
1010
import { existsSync, unlinkSync } from 'node:fs';
1111
import { join } from 'node:path';
1212
import { homedir } from 'node:os';
13+
import { ProcessDefinitionId, ProcessInstanceKey } from '@camunda8/orchestration-cluster-api';
1314

1415
// Wait time for Elasticsearch to index data before search queries
15-
const ELASTICSEARCH_CONSISTENCY_WAIT_MS = 5000;
16+
const ELASTICSEARCH_CONSISTENCY_WAIT_MS = 8000;
1617

1718
describe('Process Instance Integration Tests (requires Camunda 8 at localhost:8080)', () => {
1819
beforeEach(() => {
@@ -31,7 +32,7 @@ describe('Process Instance Integration Tests (requires Camunda 8 at localhost:80
3132

3233
// Create process instance
3334
const createResult = await client.createProcessInstance({
34-
processDefinitionId: 'simple-process',
35+
processDefinitionId: ProcessDefinitionId.assumeExists('simple-process')
3536
});
3637

3738
// Verify instance key is returned
@@ -48,7 +49,7 @@ describe('Process Instance Integration Tests (requires Camunda 8 at localhost:80
4849
// First deploy and create an instance
4950
await deploy(['tests/fixtures/simple.bpmn'], {});
5051
await client.createProcessInstance({
51-
processDefinitionId: 'simple-process',
52+
processDefinitionId: ProcessDefinitionId.assumeExists('simple-process'),
5253
});
5354

5455
// Search for process instances - filter by process definition ID
@@ -70,15 +71,15 @@ describe('Process Instance Integration Tests (requires Camunda 8 at localhost:80
7071
// Deploy and create an instance
7172
await deploy(['tests/fixtures/simple.bpmn'], {});
7273
const createResult = await client.createProcessInstance({
73-
processDefinitionId: 'simple-process',
74+
processDefinitionId: ProcessDefinitionId.assumeExists('simple-process'),
7475
});
7576

7677
const instanceKey = createResult.processInstanceKey.toString();
7778

7879
// Try to cancel - note: simple-process may complete instantly,
7980
// so we handle both success and "already completed" scenarios
8081
try {
81-
await client.cancelProcessInstance({ processInstanceKey: instanceKey });
82+
await client.cancelProcessInstance({ processInstanceKey: ProcessInstanceKey.assumeExists(instanceKey) });
8283
assert.ok(true, 'Process instance cancellation succeeded');
8384
} catch (error: any) {
8485
// If the process already completed, that's also acceptable

0 commit comments

Comments
 (0)