Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
124 commits
Select commit Hold shift + click to select a range
a66e3b6
add job to run tests on v4 cluster
DmitryBorisov-sm Sep 18, 2025
318f32a
move all the tests to integration-tests folder
DmitryBorisov-sm Sep 19, 2025
089312b
move unit test closer to source files, add seperate jobs during ci/cd
DmitryBorisov-sm Sep 19, 2025
08d4462
fix gh actions
DmitryBorisov-sm Sep 19, 2025
06fd9a0
simplify gh action
DmitryBorisov-sm Sep 19, 2025
6ffac7b
simplify gh action
DmitryBorisov-sm Sep 19, 2025
29ac67b
simplify gh action
DmitryBorisov-sm Sep 19, 2025
a6a34ec
simplify gh action
DmitryBorisov-sm Sep 19, 2025
f45bc55
cleanup
DmitryBorisov-sm Sep 19, 2025
5bbed6c
separate common and v5 only tests
DmitryBorisov-sm Sep 21, 2025
fc29227
simplify github action, update npm commands
DmitryBorisov-sm Sep 21, 2025
251acc3
fix linter errors
DmitryBorisov-sm Sep 21, 2025
8534375
adjust TaskManager tests timings
DmitryBorisov-sm Sep 21, 2025
1b82930
update gh action to run tests on node 18, 20, 22
DmitryBorisov-sm Sep 22, 2025
1c82c1f
simplify gh action, add name
DmitryBorisov-sm Sep 22, 2025
7cf90b9
update gh action name
DmitryBorisov-sm Sep 22, 2025
33ba63c
fix node.js v18 undici type errors
DmitryBorisov-sm Sep 22, 2025
52ff072
update ts ignore comments
DmitryBorisov-sm Sep 22, 2025
bc4e64f
fix jest warnings
DmitryBorisov-sm Sep 22, 2025
1ddd9fa
add max-parallel: 3
DmitryBorisov-sm Sep 22, 2025
7f9275d
max-parallel: 1
DmitryBorisov-sm Sep 22, 2025
3403c8e
test with updated h2 config
DmitryBorisov-sm Sep 23, 2025
9377975
test with updated h2 config
DmitryBorisov-sm Sep 23, 2025
7b44e9e
add retry interceptor
DmitryBorisov-sm Sep 23, 2025
c55fa7d
try to run tests on skdev cluster
DmitryBorisov-sm Sep 24, 2025
14e5b87
remove prev commit changes
DmitryBorisov-sm Sep 24, 2025
0e26df3
update undici retry interceptor config
DmitryBorisov-sm Sep 24, 2025
80160a2
try with clientTtl: 500
DmitryBorisov-sm Sep 24, 2025
967cedc
try to remove AbortController
DmitryBorisov-sm Sep 24, 2025
34bc5f5
try with modified undici agent tls config
DmitryBorisov-sm Sep 24, 2025
d250fcb
try without !onCancel.isCancelled condition
DmitryBorisov-sm Sep 24, 2025
ca9bc0c
try without CancelablePromise
DmitryBorisov-sm Sep 24, 2025
eaafcda
revert request changes
DmitryBorisov-sm Sep 24, 2025
538ff08
remove undici interceptor, add fetchWithRetry
DmitryBorisov-sm Sep 24, 2025
d2844a7
add description for network error
DmitryBorisov-sm Sep 24, 2025
bea31b9
update error message
DmitryBorisov-sm Sep 24, 2025
f0b8bbf
update error message
DmitryBorisov-sm Sep 24, 2025
ced9a99
try without max-parallel
DmitryBorisov-sm Sep 24, 2025
fb9ade3
restore max-parallel: 1
DmitryBorisov-sm Sep 24, 2025
11145b6
try with keepAliveTimeout: 1
DmitryBorisov-sm Sep 25, 2025
bb22271
try with new agent on each request
DmitryBorisov-sm Sep 25, 2025
d05a757
try with connect: { timeout: 60000 }
DmitryBorisov-sm Sep 25, 2025
2020864
tweak LoadTest
DmitryBorisov-sm Sep 25, 2025
d8b893a
retry with CONCURRENT_REQUESTS = 300
DmitryBorisov-sm Sep 25, 2025
bab839c
try sending 1 req each 100ms
DmitryBorisov-sm Sep 25, 2025
ddc768b
try with 200 requests
DmitryBorisov-sm Sep 25, 2025
fd980ee
try with 50ms
DmitryBorisov-sm Sep 25, 2025
589ca95
try with 1ms
DmitryBorisov-sm Sep 25, 2025
32a3787
retry with 10ms
DmitryBorisov-sm Sep 25, 2025
c4aa5a2
retry with 0ms
DmitryBorisov-sm Sep 25, 2025
ad42895
retry with 1ms
DmitryBorisov-sm Sep 25, 2025
91eed9e
retry with 5ms
DmitryBorisov-sm Sep 25, 2025
ef2a83e
retry with 10ms
DmitryBorisov-sm Sep 25, 2025
7f13858
restore undici agent
DmitryBorisov-sm Sep 25, 2025
d48a4d3
remove undici keepAliveTimeout
DmitryBorisov-sm Sep 25, 2025
31df670
update fetchWithRetry to trigger only on 429 error
DmitryBorisov-sm Sep 25, 2025
21d8c53
retry without AbortController, with new agent on each req
DmitryBorisov-sm Sep 25, 2025
a4dcf0e
restore changes from prev commit
DmitryBorisov-sm Sep 25, 2025
5ba1531
retry on node 20, 22, 24 with built-in fetch
DmitryBorisov-sm Sep 25, 2025
4712f82
restore undici fetch
DmitryBorisov-sm Sep 25, 2025
53b905a
retry fetching https://google.com
DmitryBorisov-sm Sep 25, 2025
f72dc7d
retry fetching cluster
DmitryBorisov-sm Sep 25, 2025
a97815e
retry with more tests
DmitryBorisov-sm Sep 25, 2025
f598aae
retry with sdkdev cluster
DmitryBorisov-sm Sep 25, 2025
6953394
retry with https://cloud.orkes.io/
DmitryBorisov-sm Sep 25, 2025
46afac2
retry with google
DmitryBorisov-sm Sep 25, 2025
e9f3e25
retry with google
DmitryBorisov-sm Sep 25, 2025
4126a30
retry with only google fetch test
DmitryBorisov-sm Sep 25, 2025
dbcfc9c
retry with 300 requests
DmitryBorisov-sm Sep 25, 2025
020713d
retry with 50 requests
DmitryBorisov-sm Sep 25, 2025
8eb519b
retry with google
DmitryBorisov-sm Sep 25, 2025
0dce52f
retry with 1000 requests
DmitryBorisov-sm Sep 25, 2025
a7ca859
retry with 1000 requests
DmitryBorisov-sm Sep 25, 2025
054e0df
retry with undici
DmitryBorisov-sm Sep 25, 2025
02e7464
retry with undici
DmitryBorisov-sm Sep 25, 2025
ca01cb9
retry with fetch
DmitryBorisov-sm Sep 25, 2025
d1f0685
retry with abortcontroller
DmitryBorisov-sm Sep 25, 2025
85de3b7
retry with abortcontroller
DmitryBorisov-sm Sep 25, 2025
aba45e4
retry with undici
DmitryBorisov-sm Sep 25, 2025
1b3ffd9
retry with fetch & 100 requests
DmitryBorisov-sm Sep 25, 2025
e947a4e
retry with 300 requests
DmitryBorisov-sm Sep 25, 2025
ca362bc
retry with 200 requests
DmitryBorisov-sm Sep 25, 2025
6b3789c
retry with abortcontroller
DmitryBorisov-sm Sep 25, 2025
51fb0b7
retry with 500 requests
DmitryBorisov-sm Sep 25, 2025
0bcb2ca
200 requests
DmitryBorisov-sm Sep 25, 2025
0d1edec
retry with orkes cluster
DmitryBorisov-sm Sep 25, 2025
b015af9
Update LoadTest.test.ts
DmitryBorisov-sm Sep 25, 2025
ee2cf6d
Update LoadTest.test.ts
DmitryBorisov-sm Sep 25, 2025
d26f2f5
Update LoadTest.test.ts
DmitryBorisov-sm Sep 25, 2025
adc72a3
Update LoadTest.test.ts
DmitryBorisov-sm Sep 25, 2025
ef63545
Update LoadTest.test.ts
DmitryBorisov-sm Sep 25, 2025
e9ee0ae
Update LoadTest.test.ts
DmitryBorisov-sm Sep 25, 2025
77ae4fd
Update LoadTest.test.ts
DmitryBorisov-sm Sep 25, 2025
76d0308
Update LoadTest.test.ts
DmitryBorisov-sm Sep 25, 2025
15e567e
Update LoadTest.test.ts
DmitryBorisov-sm Sep 25, 2025
0cef45c
Update LoadTest.test.ts
DmitryBorisov-sm Sep 25, 2025
5186525
Update LoadTest.test.ts
DmitryBorisov-sm Sep 25, 2025
0257568
Update LoadTest.test.ts
DmitryBorisov-sm Sep 25, 2025
4a03765
Update LoadTest.test.ts
DmitryBorisov-sm Sep 25, 2025
e3f1fbf
restore changes
DmitryBorisov-sm Sep 25, 2025
732b86a
retry with 500 connections
DmitryBorisov-sm Sep 25, 2025
39921c6
retry with 1 connection
DmitryBorisov-sm Sep 25, 2025
719f9b4
add maxSockets: 1 for node 18
DmitryBorisov-sm Sep 25, 2025
451fabe
Update resolveFetchFn.ts
DmitryBorisov-sm Sep 25, 2025
25b2092
remove node18
DmitryBorisov-sm Sep 25, 2025
f001ae7
Update resolveFetchFn.ts
DmitryBorisov-sm Sep 25, 2025
45526bf
update jest config
DmitryBorisov-sm Sep 25, 2025
a4898c4
fix worker example test, remove LoadTest
DmitryBorisov-sm Sep 25, 2025
6ec44ed
adjust integration tests workflow wait timing
DmitryBorisov-sm Sep 25, 2025
e91c26f
remove max-parallel
DmitryBorisov-sm Sep 25, 2025
55d645a
update tests to allow them running in parallel on the same cluster
DmitryBorisov-sm Sep 26, 2025
6210209
fix test "update task example"
DmitryBorisov-sm Sep 26, 2025
fde587f
simplify test package.json scripts
DmitryBorisov-sm Sep 26, 2025
d79dc4a
simplify test package.json scripts
DmitryBorisov-sm Sep 26, 2025
9ecce58
add ability to change maxHttpConnections via config and env var
DmitryBorisov-sm Sep 29, 2025
4f35bfc
use waitForWorkflowStatus util in readme.test.ts
DmitryBorisov-sm Sep 29, 2025
89c8613
remove comment with max-parallel
DmitryBorisov-sm Sep 29, 2025
3d61c4f
restore cronExpression changes in schedulerExecutor.test.ts
DmitryBorisov-sm Sep 29, 2025
7a7a380
renamed maxHttpConnections to maxHttp2Connections
DmitryBorisov-sm Sep 29, 2025
1ed5618
Delete .node-version
DmitryBorisov-sm Sep 29, 2025
df0597e
code review fixes
DmitryBorisov-sm Sep 29, 2025
d08e099
fix executor v5 test issues related to naming, remove test utils class
DmitryBorisov-sm Sep 30, 2025
83ce4c9
update metadata function names
DmitryBorisov-sm Sep 30, 2025
0780f30
update metadata function names
DmitryBorisov-sm Sep 30, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 16 additions & 9 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,32 @@ jobs:

tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: [20, 22, 24]
test: ["unit", "integration:v5", "integration:v4"]
name: Node.js v${{ matrix.node-version }} - ${{ matrix.test }} tests
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: "22"
node-version: ${{ matrix.node-version }}
- name: Install Dependencies
run: npm ci
- name: Run Tests and Add Annotations
run: npm test -- --ci --reporters=default --reporters=github-actions --reporters=jest-junit
- name: Run ${{ matrix.test }} Tests and Add Annotations
run: npm run test:${{ matrix.test }} -- --ci --reporters=default --reporters=github-actions --reporters=jest-junit
env:
CONDUCTOR_SERVER_URL: ${{ vars.SERVER_URL }}
CONDUCTOR_AUTH_KEY: ${{ secrets.AUTH_KEY }}
CONDUCTOR_AUTH_SECRET: ${{ secrets.AUTH_SECRET }}
- name: Publish Dorny Test Results Summary
CONDUCTOR_SERVER_URL: ${{ matrix.test == 'integration:v4' && vars.SERVER_URL_V4 || vars.SERVER_URL }}
CONDUCTOR_AUTH_KEY: ${{ matrix.test == 'integration:v4' && secrets.AUTH_KEY_V4 || secrets.AUTH_KEY }}
CONDUCTOR_AUTH_SECRET: ${{ matrix.test == 'integration:v4' && secrets.AUTH_SECRET_V4 || secrets.AUTH_SECRET }}
JEST_JUNIT_OUTPUT_NAME: ${{ matrix.test }}-test-results.xml
- name: Publish ${{ matrix.test }} Test Results
uses: dorny/test-reporter@v2
if: ${{ !cancelled() }}
with:
name: Test report
path: reports/jest-junit.xml
name: ${{ matrix.test }} Test Report
path: reports/${{ matrix.test }}-test-results.xml
reporter: jest-junit
1 change: 0 additions & 1 deletion .node-version

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import { expect, describe, test } from "@jest/globals";
import { orkesConductorClient } from "../../../orkes";
import { orkesConductorClient } from "../../src/orkes";

describe("EventResourceService", () => {
test("Should create an event handler with description and tags and then delete it", async () => {
const orkesClient = await orkesConductorClient();
const eventApi = orkesClient.eventResource;

const now = Date.now();
const [eventName, event, eventDescription, eventTagKey, eventTagValue] = [
"jsSdkTestEventName",
"jsSdkTest:eventHandler:1",
`jsSdkTest-EventName-${now}`,
`jsSdkTest:eventHandler:1${now}`,
"jsSdkTestDescription",
"jsSdkTestTagKey",
"jsSdkTestTagValue",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
import { expect, describe, test, jest } from "@jest/globals";
import { MetadataClient } from "../metadataClient";
import { taskDefinition } from "../sdk";
import { orkesConductorClient } from "../../orkes";
import { MetadataClient } from "../../src/core/metadataClient";
import { taskDefinition } from "../../src/core/sdk";
import { orkesConductorClient } from "../../src/orkes";

describe("MetadataClient", () => {
const clientPromise = orkesConductorClient();
const taskName = `jsSdkTest-test_task_definition-${Date.now()}`;

jest.setTimeout(15000);
test("Should register a task definition", async () => {
const client = await clientPromise;
const metadataClient = new MetadataClient(client);

const newTaskDefinition = taskDefinition({
name: "test_task_definition",
name: taskName,
description: "New Task Definition",
retryCount: 4,
timeoutSeconds: 7200,
Expand Down Expand Up @@ -62,7 +63,7 @@ describe("MetadataClient", () => {
const metadataClient = new MetadataClient(client);

const newTaskDefinition = taskDefinition({
name: "test_task_definition",
name: taskName,
description: "New Task Definition Update",
retryCount: 5,
timeoutSeconds: 7201,
Expand Down Expand Up @@ -110,14 +111,13 @@ describe("MetadataClient", () => {
test("Should unregister a task definition", async () => {
const client = await clientPromise;
const metadataClient = new MetadataClient(client);
const name ="test_task_definition";

await expect(
metadataClient.unregisterTask("test_task_definition")
metadataClient.unregisterTask(taskName)
).resolves.not.toThrow();

await expect(client.metadataResource.getTaskDef(
name
taskName
)).rejects.toThrow();
})
});
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
import { expect, describe, test, jest } from "@jest/globals";
import { simpleTask, taskDefinition, WorkflowExecutor } from "../../core";
import { orkesConductorClient } from "../../orkes";
import { TaskManager, ConductorWorker } from "../index";
import { mockLogger } from "./mockLogger";
import { TestUtil } from "../../core/__test__/utils/test-util";
import { simpleTask, taskDefinition, WorkflowExecutor } from "../../src/core";
import { orkesConductorClient } from "../../src/orkes";
import { TaskManager, ConductorWorker } from "../../src/task/index";
import { mockLogger } from "../utils/mockLogger";
import { waitForWorkflowCompletion } from "../utils/waitForWorkflowCompletion";


const BASE_TIME = 500;
const BASE_TIME = 1000;
describe("TaskManager", () => {
const clientPromise = orkesConductorClient();

jest.setTimeout(15000);
jest.setTimeout(30000);

test("Should run workflow with worker", async () => {
const client = await clientPromise;
const executor = new WorkflowExecutor(client);
const taskName = `jsSdkTest-taskmanager-test-${Date.now()}`;
const workflowName = `jsSdkTest-taskmanager-test-wf-${Date.now()}`;

const worker: ConductorWorker = {
taskDefName: "taskmanager-test",
taskDefName: taskName,
execute: async () => {
return {
outputData: {
Expand All @@ -34,22 +36,22 @@ describe("TaskManager", () => {
manager.startPolling();

await executor.registerWorkflow(true, {
name: "TaskManagerTest",
name: workflowName,
version: 1,
ownerEmail: "developers@orkes.io",
tasks: [simpleTask("taskmanager-test", "taskmanager-test", {})],
tasks: [simpleTask(taskName, taskName, {})],
inputParameters: [],
outputParameters: {},
timeoutSeconds: 0,
});

const executionId = await executor.startWorkflow({
name: "TaskManagerTest",
name: workflowName,
input: {},
version: 1,
});

const workflowStatus = await TestUtil.waitForWorkflowCompletion(executor, executionId, BASE_TIME * 4);
const workflowStatus = await waitForWorkflowCompletion(executor, executionId, BASE_TIME * 30);

expect(workflowStatus.status).toEqual("COMPLETED");

Expand All @@ -59,18 +61,20 @@ describe("TaskManager", () => {
test("On error it should call the errorHandler provided", async () => {
const client = await clientPromise;
const executor = new WorkflowExecutor(client);
const taskName = `jsSdkTest-taskmanager-error-handler-test-${Date.now()}`;
const workflowName = `jsSdkTest-taskmanager-error-handler-test-wf-${Date.now()}`;

const mockErrorHandler = jest.fn();

const worker: ConductorWorker = {
taskDefName: "taskmanager-error-handler-test-unique",
taskDefName: taskName,
execute: async () => {
throw new Error("This is a forced error for testing error handler");
},
};

await client.metadataResource.registerTaskDef([taskDefinition({
name: "taskmanager-error-handler-test-unique",
name: taskName,
timeoutSeconds: 0,
retryCount: 0,
})]);
Expand All @@ -83,23 +87,23 @@ describe("TaskManager", () => {
manager.startPolling();

await executor.registerWorkflow(true, {
name: "TaskManagerTestErrorHandlerUnique",
name: workflowName,
version: 1,
ownerEmail: "developers@orkes.io",
tasks: [simpleTask("taskmanager-error-handler-test-unique", "taskmanager-error-handler-test-unique", {})],
tasks: [simpleTask(taskName, taskName, {})],
inputParameters: [],
outputParameters: {},
timeoutSeconds: 0,
});

const status = await executor.startWorkflow({
name: "TaskManagerTestErrorHandlerUnique",
name: workflowName,
input: {},
version: 1,
correlationId: "errorHandlerTestIdentifierUnique"
correlationId: `${workflowName}-id`
});

const workflowStatus = await TestUtil.waitForWorkflowCompletion(executor, status, BASE_TIME * 6);
const workflowStatus = await waitForWorkflowCompletion(executor, status, BASE_TIME * 30);

expect(workflowStatus.status).toEqual("FAILED");
expect(mockErrorHandler).toHaveBeenCalledTimes(1);
Expand All @@ -109,16 +113,18 @@ describe("TaskManager", () => {
test("If no error handler provided. it should just update the task", async () => {
const client = await clientPromise;
const executor = new WorkflowExecutor(client);
const taskName = `jsSdkTest-taskmanager-error-test-${Date.now()}`;
const workflowName = `jsSdkTest-taskmanager-error-test-wf-${Date.now()}`;

const worker: ConductorWorker = {
taskDefName: "taskmanager-error-test",
taskDefName: taskName,
execute: async () => {
throw new Error("This is a forced error");
},
};

await client.metadataResource.registerTaskDef([taskDefinition({
name: "taskmanager-error-test",
name: taskName,
timeoutSeconds: 0,
retryCount: 0,
})]);
Expand All @@ -130,23 +136,23 @@ describe("TaskManager", () => {
manager.startPolling();

await executor.registerWorkflow(true, {
name: "TaskManagerTestE",
name: workflowName,
version: 1,
ownerEmail: "developers@orkes.io",
tasks: [simpleTask("taskmanager-error-test", "taskmanager-error-test", {})],
tasks: [simpleTask(taskName, taskName, {})],
inputParameters: [],
outputParameters: {},
timeoutSeconds: 0,
});

const executionId = await executor.startWorkflow({
name: "TaskManagerTestE",
name: workflowName,
input: {},
version: 1,
correlationId: "noErrorHandlerProvidedIdentifier"
correlationId: `${workflowName}-id`
});

const workflowStatus = await TestUtil.waitForWorkflowCompletion(executor, executionId!, BASE_TIME * 10);
const workflowStatus = await waitForWorkflowCompletion(executor, executionId!, BASE_TIME * 30);
expect(workflowStatus.status).toEqual("FAILED");
await manager.stopPolling();
});
Expand All @@ -158,7 +164,7 @@ describe("TaskManager", () => {
// just create a bunch of worker names
const workerNames: string[] = Array.from({ length: 3 })
.fill(0)
.map((_, i: number) => `taskman-multi-${1 + i}`);
.map((_, i: number) => `jsSdkTest-taskman-multi-${1 + i}-${Date.now()}`);

// names to actual workers
const workers: ConductorWorker[] = workerNames.map((name) => ({
Expand All @@ -183,7 +189,7 @@ describe("TaskManager", () => {

expect(manager.isPolling).toBeTruthy();

const workflowName = "TaskManagerTestMulti";
const workflowName = `jsSdkTest-taskmanager-multi-test-wf-${Date.now()}`;

// increase polling speed
manager.updatePollingOptions({ concurrency: 4 });
Expand All @@ -203,15 +209,15 @@ describe("TaskManager", () => {
const executionId = await executor.startWorkflow({
name: workflowName,
version: 1,
correlationId: "identifierTaskManMulti"
correlationId: `${workflowName}-id`
});

expect(executionId).toBeDefined();

// decrease speed again
manager.updatePollingOptions({ pollInterval: BASE_TIME, concurrency: 1 });

const workflowStatus = await TestUtil.waitForWorkflowCompletion(executor, executionId, BASE_TIME * 4);
const workflowStatus = await waitForWorkflowCompletion(executor, executionId, BASE_TIME * 30);

expect(workflowStatus.status).toEqual("COMPLETED");
await manager.stopPolling();
Expand All @@ -233,10 +239,11 @@ describe("TaskManager", () => {

test("Should not be able to startPolling if duplicate workers", async () => {
const client = await clientPromise;
const workerName = `jsSdkTest-worker-name-${Date.now()}`;

const workerNames: string[] = Array.from({ length: 3 })
.fill(0)
.map(() => `worker-name`);
.map(() => workerName);

// names to actual workers
const workers: ConductorWorker[] = workerNames.map((name) => ({
Expand All @@ -255,20 +262,21 @@ describe("TaskManager", () => {
options: { pollInterval: BASE_TIME, concurrency: 2 },
});
expect(() => manager.startPolling()).toThrow(
"Duplicate worker taskDefName: worker-name"
`Duplicate worker taskDefName: ${workerName}`
);
});

test("Updates single worker properties", async () => {
const client = await clientPromise;

const executor = new WorkflowExecutor(client);
const workerName = `jsSdkTest-taskman-single-worker-update-${Date.now()}`;
// just create a bunch of worker names
const workerNames: string[] = Array.from({ length: 3 })
.fill(0)
.map((_, i: number) => `taskman-single-worker-update${1 + i}`);
.map((_, i: number) => `${workerName}-${1 + i}`);

const candidateWorkerUpdate = "taskman-single-worker-update1";
const candidateWorkerUpdate = `${workerName}-1`;
const initialCandidateWorkflowOptions = {
concurrency: 1,
pollInterval: BASE_TIME * 3,
Expand Down Expand Up @@ -300,7 +308,7 @@ describe("TaskManager", () => {

expect(manager.isPolling).toBeTruthy();

const workflowName = "TaskManagerTestMultiSingleWorkerUpdate";
const workflowName = `jsSdkTest-taskmanager-multi-single-worker-update-wf-${Date.now()}`;

const updatedWorkerOptions = {
concurrency: 3,
Expand Down Expand Up @@ -328,14 +336,14 @@ describe("TaskManager", () => {
const executionId = await executor.startWorkflow({
name: workflowName,
version: 1,
correlationId: "identifierTaskManMulti"
correlationId: `${workflowName}-id`
});
expect(executionId).toBeDefined();

// decrease speed again
manager.updatePollingOptions({ pollInterval: BASE_TIME, concurrency: 1 });

const workflowStatus = await TestUtil.waitForWorkflowCompletion(executor, executionId, BASE_TIME * 10);
const workflowStatus = await waitForWorkflowCompletion(executor, executionId, BASE_TIME * 30);

expect(workflowStatus.status).toEqual("COMPLETED");
await manager.stopPolling();
Expand Down
Loading