@@ -226,22 +226,32 @@ export class TestWorkflowEnvironment {
226
226
/**
227
227
* Start a time skipping workflow environment.
228
228
*
229
- * By default, this environment will automatically skip to the next events in time when a workflow handle's `result`
230
- * is awaited on (which includes {@link WorkflowClient.execute}). Before the result is awaited on, time can be
231
- * manually skipped forward using {@link sleep}. The currently known time can be obtained via {@link currentTimeMs}.
229
+ * This environment automatically skips to the next events in time when a workflow handle's `result` is awaited on
230
+ * (which includes {@link WorkflowClient.execute}). Before the result is awaited on, time can be manually skipped
231
+ * forward using {@link sleep}. The currently known time can be obtained via {@link currentTimeMs}.
232
232
*
233
- * Internally, this environment lazily downloads a test-server binary for the current OS/arch from the [Java SDK
234
- * releases](https://github.com/temporalio/sdk-java/releases) into the temp directory if it is not already there.
235
- * Then the executable is started and will be killed when {@link teardown} is called.
233
+ * This environment will be powered by the Temporal Time Skipping Test Server (part of the [Java SDK](https://github.com/temporalio/sdk-java)).
234
+ * Note that the Time Skipping Test Server does not support full capabilities of the regular Temporal Server, and may
235
+ * occasionally present different behaviors. For general Workflow testing, it is generally preferable to use {@link createLocal}
236
+ * instead.
236
237
*
237
238
* Users can reuse this environment for testing multiple independent workflows, but not concurrently. Time skipping,
238
239
* which is automatically done when awaiting a workflow result and manually done on sleep, is global to the
239
- * environment, not to the workflow under test.
240
+ * environment, not to the workflow under test. We highly recommend running tests serially when using a single
241
+ * environment or creating a separate environment per test.
240
242
*
241
- * We highly recommend, running tests serially when using a single environment or creating a separate environment per
242
- * test.
243
+ * By default, the latest release of the Test Serveer will be downloaded and cached to a temporary directory
244
+ * (e.g. `$TMPDIR/temporal-test-server-sdk-typescript-*` or `%TEMP%/temporal-test-server-sdk-typescript-*.exe`). Note
245
+ * that existing cached binairies will be reused without validation that they are still up-to-date, until the SDK
246
+ * itself is updated. Alternatively, a specific version number of the Test Server may be provided, or the path to an
247
+ * existing Test Server binary may be supplied; see {@link LocalTestWorkflowEnvironmentOptions.server.executable}.
243
248
*
244
- * In the future, the test server implementation may be changed to another implementation.
249
+ * Note that the Test Server implementation may be changed to another one in the future. Therefore, there is no
250
+ * guarantee that Test Server options, and particularly those provided through the `extraArgs` array, will continue to
251
+ * be supported in the future.
252
+ *
253
+ * IMPORTANT: At this time, the Time Skipping Test Server is not supported on ARM platforms. Execution on Apple
254
+ * silicon Macs will work if Rosetta 2 is installed.
245
255
*/
246
256
static async createTimeSkipping ( opts ?: TimeSkippingTestWorkflowEnvironmentOptions ) : Promise < TestWorkflowEnvironment > {
247
257
return await this . create ( {
@@ -252,19 +262,25 @@ export class TestWorkflowEnvironment {
252
262
}
253
263
254
264
/**
255
- * Start a full Temporal server locally, downloading if necessary .
265
+ * Start a full Temporal server locally.
256
266
*
257
267
* This environment is good for testing full server capabilities, but does not support time skipping like
258
268
* {@link createTimeSkipping} does. {@link supportsTimeSkipping} will always return `false` for this environment.
259
269
* {@link sleep} will sleep the actual amount of time and {@link currentTimeMs} will return the current time.
260
270
*
261
271
* This local environment will be powered by [Temporal CLI](https://github.com/temporalio/cli), which is a
262
272
* self-contained executable for Temporal. By default, Temporal's database will not be persisted to disk, and no UI
263
- * will be started.
273
+ * will be launched.
274
+ *
275
+ * By default, the latest release of the CLI will be downloaded and cached to a temporary directory
276
+ * (e.g. `$TMPDIR/temporal-sdk-typescript-*` or `%TEMP%/temporal-sdk-typescript-*.exe`). Note that existing cached
277
+ * binairies will be reused without validation that they are still up-to-date, until the SDK itself is updated.
278
+ * Alternatively, a specific version number of the CLI may be provided, or the path to an existing CLI binary may be
279
+ * supplied; see {@link LocalTestWorkflowEnvironmentOptions.server.executable}.
264
280
*
265
- * The CLI executable will be downloaded and cached to a temporary directory. See
266
- * { @link LocalTestWorkflowEnvironmentOptions.server.executable.type} if you'd prefer to provide the CLI executable
267
- * yourself .
281
+ * Note that the Dev Server implementation may be changed to another one in the future. Therefore, there is no
282
+ * guarantee that Dev Server options, and particularly those provided through the `extraArgs` array, will continue to
283
+ * be supported in the future .
268
284
*/
269
285
static async createLocal ( opts ?: LocalTestWorkflowEnvironmentOptions ) : Promise < TestWorkflowEnvironment > {
270
286
return await this . create ( {
0 commit comments