Skip to content

Commit 7faedb1

Browse files
committed
Merge branch 'wangbill/versioning' of https://github.com/microsoft/durabletask-js into wangbill/versioning
2 parents e13a92f + ebe38b9 commit 7faedb1

2 files changed

Lines changed: 1 addition & 42 deletions

File tree

packages/durabletask-js/src/client/client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,7 @@ export class TaskHubGrpcClient {
590590
options?: PurgeInstanceOptions,
591591
): Promise<PurgeResult | undefined> {
592592
let res;
593-
if (typeof value === `string`) {
593+
if (typeof value === "string") {
594594
const instanceId = value;
595595
const req = new pb.PurgeInstancesRequest();
596596
req.setInstanceid(instanceId);

packages/durabletask-js/test/orchestration_context_methods.spec.ts

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -517,47 +517,6 @@ describe("OrchestrationContext.createReplaySafeLogger", () => {
517517
});
518518
});
519519

520-
describe("OrchestrationContext.version", () => {
521-
it("should return the version from ExecutionStarted event", async () => {
522-
let capturedVersion: string | undefined;
523-
const orchestrator: TOrchestrator = async (ctx: OrchestrationContext) => {
524-
capturedVersion = ctx.version;
525-
return "done";
526-
};
527-
528-
const registry = new Registry();
529-
const name = registry.addOrchestrator(orchestrator);
530-
const newEvents = [
531-
newOrchestratorStartedEvent(),
532-
newExecutionStartedEventWithVersion(name, TEST_INSTANCE_ID, "1.0.0"),
533-
];
534-
const executor = new OrchestrationExecutor(registry);
535-
await executor.execute(TEST_INSTANCE_ID, [], newEvents);
536-
537-
expect(capturedVersion).toEqual("1.0.0");
538-
});
539-
540-
it("should return empty string when no version is set", async () => {
541-
let capturedVersion: string | undefined = "should-be-empty";
542-
const orchestrator: TOrchestrator = async (ctx: OrchestrationContext) => {
543-
capturedVersion = ctx.version;
544-
return "done";
545-
};
546-
547-
const registry = new Registry();
548-
const name = registry.addOrchestrator(orchestrator);
549-
const newEvents = [
550-
newOrchestratorStartedEvent(),
551-
newExecutionStartedEvent(name, TEST_INSTANCE_ID),
552-
];
553-
const executor = new OrchestrationExecutor(registry);
554-
await executor.execute(TEST_INSTANCE_ID, [], newEvents);
555-
556-
// When no version is set in the ExecutionStarted event, the version property returns empty string
557-
expect(capturedVersion).toBe("");
558-
});
559-
});
560-
561520
describe("OrchestrationContext.compareVersionTo", () => {
562521
it("should return 0 when versions are equal", async () => {
563522
let comparisonResult: number | undefined;

0 commit comments

Comments
 (0)