Skip to content

Commit c53bb02

Browse files
committed
fix test
1 parent 691e2bc commit c53bb02

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

test/e2e-azuremanaged/orchestration.spec.ts

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,28 @@ import {
2323
Task,
2424
TOrchestrator,
2525
} from "@microsoft/durabletask-js";
26+
import {
27+
DurableTaskAzureManagedClientBuilder,
28+
DurableTaskAzureManagedWorkerBuilder,
29+
} from "@microsoft/durabletask-js-azuremanaged";
2630

2731
// Read environment variables
2832
const endpoint = process.env.ENDPOINT || "localhost:8080";
33+
const taskHub = process.env.TASKHUB || "default";
2934

3035
describe("Durable Task Scheduler (DTS) E2E Tests", () => {
3136
let taskHubClient: TaskHubGrpcClient;
3237
let taskHubWorker: TaskHubGrpcWorker;
3338

3439
beforeEach(async () => {
35-
// Start a worker, which will connect to the DTS emulator in a background thread
36-
taskHubWorker = new TaskHubGrpcWorker(endpoint);
37-
taskHubClient = new TaskHubGrpcClient(endpoint);
40+
// Create client and worker using the Azure-managed builders with taskhub metadata
41+
taskHubClient = new DurableTaskAzureManagedClientBuilder()
42+
.endpoint(endpoint, taskHub, null) // null credential for emulator (no auth)
43+
.build();
44+
45+
taskHubWorker = new DurableTaskAzureManagedWorkerBuilder()
46+
.endpoint(endpoint, taskHub, null) // null credential for emulator (no auth)
47+
.build();
3848
});
3949

4050
afterEach(async () => {

0 commit comments

Comments
 (0)