Skip to content

Commit 32404c4

Browse files
committed
Add prints
1 parent ca29db9 commit 32404c4

File tree

3 files changed

+21
-1
lines changed

3 files changed

+21
-1
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ jobs:
111111
# Run integration tests.
112112
# Uses the native binaries built in compile-native-binaries, but build `@temporalio/*` packages locally.
113113
integration-tests:
114-
timeout-minutes: 20
114+
timeout-minutes: 5
115115
needs:
116116
- compile-native-binaries-debug
117117
strategy:

packages/test/src/test-bridge.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,36 +173,44 @@ test("Stopping Worker after creating another runtime doesn't fail", async (t) =>
173173
const runtime1 = native.newRuntime(GenericConfigs.runtime.basic);
174174

175175
// Starts Worker 0
176+
console.log('Starting Worker 0');
176177
const client0 = await native.newClient(runtime0, GenericConfigs.client.basic);
177178
const worker0 = native.newWorker(client0, GenericConfigs.worker.basic);
178179
await native.workerValidate(worker0);
179180

180181
// Start Worker 1
182+
console.log('Starting Worker 1');
181183
const client1 = await native.newClient(runtime1, GenericConfigs.client.basic);
182184
const worker1 = native.newWorker(client1, GenericConfigs.worker.basic);
183185
await native.workerValidate(worker1);
184186

185187
// Start polling on Worker 1 (note reverse order of Worker 0)
188+
console.log('Starting polling on Worker 1');
186189
const wftPromise1 = native.workerPollWorkflowActivation(worker1);
187190
const atPromise1 = native.workerPollActivityTask(worker1);
188191

189192
// Start polling on Worker 0
193+
console.log('Starting polling on Worker 0');
190194
const wftPromise0 = native.workerPollWorkflowActivation(worker0);
191195
const atPromise0 = native.workerPollActivityTask(worker0);
192196

193197
// Cleanly shutdown Worker 1
198+
console.log('Shutting down Worker 1');
194199
native.workerInitiateShutdown(worker1);
195200
await expectShutdownError(wftPromise1);
196201
await expectShutdownError(atPromise1);
197202
await native.workerFinalizeShutdown(worker1);
198203
// Leave Client 1 and Runtime 1 alive
204+
console.log('Leave Client 1 and Runtime 1 alive');
199205

200206
// Create Runtime 2 and Worker 2, but don't immediately use them
207+
console.log('Creating Worker 2');
201208
const runtime2 = native.newRuntime(GenericConfigs.runtime.basic);
202209
const client2 = await native.newClient(runtime2, GenericConfigs.client.basic);
203210
const worker2 = native.newWorker(client2, GenericConfigs.worker.basic);
204211

205212
// Cleanly shutdown Worker 0
213+
console.log('Shutting down Worker 0');
206214
native.workerInitiateShutdown(worker0);
207215
await expectShutdownError(wftPromise0);
208216
await expectShutdownError(atPromise0);
@@ -211,9 +219,11 @@ test("Stopping Worker after creating another runtime doesn't fail", async (t) =>
211219
native.runtimeShutdown(runtime0);
212220

213221
// Start yet another runtime, we really won't use it
222+
console.log("Start yet another runtime, we really won't use it");
214223
const _runtime3 = native.newRuntime(GenericConfigs.runtime.basic);
215224

216225
// Start polling on Worker 2, then shut it down cleanly
226+
console.log('Starting polling on Worker 2');
217227
await native.workerValidate(worker2);
218228
const wftPromise2 = native.workerPollWorkflowActivation(worker2); // TODO: failing here
219229
const atPromise2 = native.workerPollActivityTask(worker2);
@@ -223,6 +233,7 @@ test("Stopping Worker after creating another runtime doesn't fail", async (t) =>
223233
await native.workerFinalizeShutdown(worker2);
224234
native.clientClose(client2);
225235
native.runtimeShutdown(runtime2);
236+
console.log('t.pass()');
226237

227238
t.pass();
228239
});

packages/test/src/test-runtime.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,20 +58,29 @@ if (RUN_INTEGRATION_TESTS) {
5858
const logger = new DefaultLogger('TRACE');
5959
Runtime.install({ logger });
6060
{
61+
console.log('Runtime.instance().options.logger', Runtime.instance().options.logger);
6162
const runtime = Runtime.instance();
6263
t.is(runtime.options.logger, logger);
64+
console.log("1.0");
6365
}
6466
const worker = await Worker.create({
6567
...defaultOptions,
6668
taskQueue: 'q1', // Same as the first Worker created
6769
});
70+
console.log("1.1");
6871
const workerDrained = worker.run();
72+
console.log("1.2");
6973
worker.shutdown();
74+
console.log("1.3");
7075
await workerDrained;
7176
{
77+
console.log("1.4");
7278
const runtime = Runtime.instance();
79+
console.log("1.5");
7380
t.is(runtime.options.logger, logger);
81+
console.log("1.6");
7482
await runtime.shutdown();
83+
console.log("1.7");
7584
}
7685
});
7786

0 commit comments

Comments
 (0)