Skip to content

Commit 22ea480

Browse files
committed
Test fixes
1 parent 4ce2e2d commit 22ea480

File tree

6 files changed

+17
-7
lines changed

6 files changed

+17
-7
lines changed

.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ env:
1919

2020
# Use these variables to force specific version of CLI/Time Skipping Server for SDK tests
2121
# TESTS_CLI_VERSION: 'v0.13.2'
22-
TESTS_CLI_VERSION: 'v1.3.1-priority.0'
22+
TESTS_CLI_VERSION: 'v1.3.1-persistence-fix.0'
2323
# TESTS_TIME_SKIPPING_SERVER_VERSION: 'v1.24.1'
2424

2525
jobs:

.github/workflows/release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ env:
1414

1515
# Use these variables to force specific version of CLI/Time Skipping Server for SDK tests
1616
# TESTS_CLI_VERSION: 'v0.13.2'
17-
TESTS_CLI_VERSION: 'v1.3.1-priority.0'
17+
TESTS_CLI_VERSION: 'v1.3.1-persistence-fix.0'
1818
# TESTS_TIME_SKIPPING_SERVER_VERSION: 'v1.24.1'
1919

2020
jobs:

packages/test/src/test-integration-split-one.ts

+1
Original file line numberDiff line numberDiff line change
@@ -734,6 +734,7 @@ test('Workflow can read WorkflowInfo', configMacro, async (t, config) => {
734734
startTime: res.startTime,
735735
runStartTime: res.runStartTime,
736736
currentBuildId: res.currentBuildId, // eslint-disable-line deprecation/deprecation
737+
currentDeploymentVersion: res.currentDeploymentVersion,
737738
// unsafe.now is a function, so doesn't make it through serialization, but .now is required, so we need to cast
738739
unsafe: { isReplaying: false } as UnsafeWorkflowInfo,
739740
});

packages/test/src/test-sinks.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ if (RUN_INTEGRATION_TESTS) {
9494
});
9595

9696
// Capture volatile values that are hard to predict
97-
const { historySize, startTime, runStartTime, currentBuildId } = recordedCalls[0].info; // eslint-disable-line deprecation/deprecation
97+
const { historySize, startTime, runStartTime, currentBuildId, currentDeploymentVersion } = recordedCalls[0].info; // eslint-disable-line deprecation/deprecation
9898
t.true(historySize > 300);
9999

100100
const info: WorkflowInfo = {
@@ -129,6 +129,7 @@ if (RUN_INTEGRATION_TESTS) {
129129
startTime,
130130
runStartTime,
131131
currentBuildId,
132+
currentDeploymentVersion,
132133
// unsafe.now() doesn't make it through serialization, but .now is required, so we need to cast
133134
unsafe: {
134135
isReplaying: false,

packages/test/src/test-worker-deployment-versioning.ts

+11-4
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const test = makeTestFunction({ workflowsPath: __filename });
1818
test('Worker deployment based versioning', async (t) => {
1919
const taskQueue = 'worker-deployment-based-versioning-' + randomUUID();
2020
const deploymentName = 'deployment-' + randomUUID();
21-
const client = t.context.env.client;
21+
const { client, nativeConnection } = t.context.env;
2222

2323
const w1DeploymentVersion = {
2424
buildId: '1.0',
@@ -41,6 +41,7 @@ test('Worker deployment based versioning', async (t) => {
4141
version: w1DeploymentVersion,
4242
defaultVersioningBehavior: 'PINNED',
4343
},
44+
connection: nativeConnection,
4445
});
4546
const worker1Promise = worker1.run();
4647
worker1Promise.catch((err) => {
@@ -55,6 +56,7 @@ test('Worker deployment based versioning', async (t) => {
5556
version: w2DeploymentVersion,
5657
defaultVersioningBehavior: 'PINNED',
5758
},
59+
connection: nativeConnection,
5860
});
5961
const worker2Promise = worker2.run();
6062
worker2Promise.catch((err) => {
@@ -69,6 +71,7 @@ test('Worker deployment based versioning', async (t) => {
6971
version: w3DeploymentVersion,
7072
defaultVersioningBehavior: 'PINNED',
7173
},
74+
connection: nativeConnection,
7275
});
7376
const worker3Promise = worker3.run();
7477
worker3Promise.catch((err) => {
@@ -136,7 +139,7 @@ test('Worker deployment based versioning', async (t) => {
136139
test('Worker deployment based versioning with ramping', async (t) => {
137140
const taskQueue = 'worker-deployment-based-ramping-' + randomUUID();
138141
const deploymentName = 'deployment-ramping-' + randomUUID();
139-
const client = t.context.env.client;
142+
const { client, nativeConnection } = t.context.env;
140143

141144
const v1 = {
142145
buildId: '1.0',
@@ -155,6 +158,7 @@ test('Worker deployment based versioning with ramping', async (t) => {
155158
version: v1,
156159
defaultVersioningBehavior: 'PINNED',
157160
},
161+
connection: nativeConnection,
158162
});
159163
const worker1Promise = worker1.run();
160164
worker1Promise.catch((err) => {
@@ -169,6 +173,7 @@ test('Worker deployment based versioning with ramping', async (t) => {
169173
version: v2,
170174
defaultVersioningBehavior: 'PINNED',
171175
},
176+
connection: nativeConnection,
172177
});
173178
const worker2Promise = worker2.run();
174179
worker2Promise.catch((err) => {
@@ -245,7 +250,7 @@ test('Worker deployment with dynamic workflow on run', async (t) => {
245250

246251
const taskQueue = 'worker-deployment-dynamic-' + randomUUID();
247252
const deploymentName = 'deployment-dynamic-' + randomUUID();
248-
const client = t.context.env.client;
253+
const { client, nativeConnection } = t.context.env;
249254

250255
const version = {
251256
buildId: '1.0',
@@ -260,6 +265,7 @@ test('Worker deployment with dynamic workflow on run', async (t) => {
260265
version,
261266
defaultVersioningBehavior: 'AUTO_UPGRADE',
262267
},
268+
connection: nativeConnection,
263269
});
264270

265271
const workerPromise = worker.run();
@@ -297,7 +303,7 @@ test('Worker deployment with dynamic workflow on run', async (t) => {
297303
test('Workflows can use default versioning behavior', async (t) => {
298304
const taskQueue = 'task-queue-default-versioning-' + randomUUID();
299305
const deploymentName = 'deployment-default-versioning-' + randomUUID();
300-
const client = t.context.env.client;
306+
const { client, nativeConnection } = t.context.env;
301307

302308
const workerV1 = {
303309
buildId: '1.0',
@@ -312,6 +318,7 @@ test('Workflows can use default versioning behavior', async (t) => {
312318
version: workerV1,
313319
defaultVersioningBehavior: 'PINNED',
314320
},
321+
connection: nativeConnection,
315322
});
316323

317324
const workerPromise = worker.run();

packages/worker/src/connection.ts

+1
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ export class NativeConnection {
4545
*/
4646
static async connect(options?: NativeConnectionOptions): Promise<NativeConnection> {
4747
try {
48+
console.log('Connecting to Temporal server...: ', options);
4849
const client = await Runtime.instance().createNativeClient(options);
4950
return new this(client);
5051
} catch (err) {

0 commit comments

Comments
 (0)