File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed
Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff 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
2832const endpoint = process . env . ENDPOINT || "localhost:8080" ;
33+ const taskHub = process . env . TASKHUB || "default" ;
2934
3035describe ( "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 ( ) => {
You can’t perform that action at this time.
0 commit comments