Skip to main content

Namespace: TestService

testservice.v1.TestService

Type Aliases

GetCurrentTime

Ƭ GetCurrentTime: Object

GetCurrentTime returns the current Temporal Test Server time

This time might not be equal to System#currentTimeMillis() due to time skipping.

Call signature

▸ (request, callback): void

Parameters
NameType
requestIEmpty
callbackGetCurrentTimeCallback
Returns

void

▸ (request): Promise<GetCurrentTimeResponse>

Parameters
NameType
requestIEmpty
Returns

Promise<GetCurrentTimeResponse>

Type declaration

NameType
name"GetCurrentTime"
path"/temporal.api.testservice.v1.TestService/GetCurrentTime"
requestStreamundefined
requestType"google.protobuf.Empty"
responseStreamundefined
responseType"GetCurrentTimeResponse"

GetCurrentTimeCallback

Ƭ GetCurrentTimeCallback: (error: Error | null, response?: GetCurrentTimeResponse) => void

Callback as used by temporal.api.testservice.v1.TestService#getCurrentTime.

Type declaration

▸ (error, response?): void

Parameters
NameTypeDescription
errorError | nullError, if any
response?GetCurrentTimeResponseGetCurrentTimeResponse
Returns

void


LockTimeSkipping

Ƭ LockTimeSkipping: Object

LockTimeSkipping increments Time Locking Counter by one.

If Time Locking Counter is positive, time skipping is locked (disabled). When time skipping is disabled, the time in test server is moving normally, with a real time pace. Test Server is typically started with locked time skipping and Time Locking Counter = 1.

LockTimeSkipping and UnlockTimeSkipping calls are counted.

Call signature

▸ (request, callback): void

Parameters
NameType
requestILockTimeSkippingRequest
callbackLockTimeSkippingCallback
Returns

void

▸ (request): Promise<LockTimeSkippingResponse>

Parameters
NameType
requestILockTimeSkippingRequest
Returns

Promise<LockTimeSkippingResponse>

Type declaration

NameType
name"LockTimeSkipping"
path"/temporal.api.testservice.v1.TestService/LockTimeSkipping"
requestStreamundefined
requestType"LockTimeSkippingRequest"
responseStreamundefined
responseType"LockTimeSkippingResponse"

LockTimeSkippingCallback

Ƭ LockTimeSkippingCallback: (error: Error | null, response?: LockTimeSkippingResponse) => void

Callback as used by temporal.api.testservice.v1.TestService#lockTimeSkipping.

Type declaration

▸ (error, response?): void

Parameters
NameTypeDescription
errorError | nullError, if any
response?LockTimeSkippingResponseLockTimeSkippingResponse
Returns

void


Sleep

Ƭ Sleep: Object

This call returns only when the Test Server Time advances by the specified duration. This is an EXPERIMENTAL API.

Call signature

▸ (request, callback): void

Parameters
NameType
requestISleepRequest
callbackSleepCallback
Returns

void

▸ (request): Promise<SleepResponse>

Parameters
NameType
requestISleepRequest
Returns

Promise<SleepResponse>

Type declaration

NameType
name"Sleep"
path"/temporal.api.testservice.v1.TestService/Sleep"
requestStreamundefined
requestType"SleepRequest"
responseStreamundefined
responseType"SleepResponse"

SleepCallback

Ƭ SleepCallback: (error: Error | null, response?: SleepResponse) => void

Callback as used by temporal.api.testservice.v1.TestService#sleep.

Type declaration

▸ (error, response?): void

Parameters
NameTypeDescription
errorError | nullError, if any
response?SleepResponseSleepResponse
Returns

void


SleepUntil

Ƭ SleepUntil: Object

This call returns only when the Test Server Time advances to the specified timestamp. If the current Test Server Time is beyond the specified timestamp, returns immediately. This is an EXPERIMENTAL API.

Call signature

▸ (request, callback): void

Parameters
NameType
requestISleepUntilRequest
callbackSleepUntilCallback
Returns

void

▸ (request): Promise<SleepResponse>

Parameters
NameType
requestISleepUntilRequest
Returns

Promise<SleepResponse>

Type declaration

NameType
name"SleepUntil"
path"/temporal.api.testservice.v1.TestService/SleepUntil"
requestStreamundefined
requestType"SleepUntilRequest"
responseStreamundefined
responseType"SleepResponse"

SleepUntilCallback

Ƭ SleepUntilCallback: (error: Error | null, response?: SleepResponse) => void

Callback as used by temporal.api.testservice.v1.TestService#sleepUntil.

Type declaration

▸ (error, response?): void

Parameters
NameTypeDescription
errorError | nullError, if any
response?SleepResponseSleepResponse
Returns

void


UnlockTimeSkipping

Ƭ UnlockTimeSkipping: Object

UnlockTimeSkipping decrements Time Locking Counter by one.

If the counter reaches 0, it unlocks time skipping and fast forwards time. LockTimeSkipping and UnlockTimeSkipping calls are counted. Calling UnlockTimeSkipping does not guarantee that time is going to be fast forwarded as another lock can be holding it.

Time Locking Counter can't be negative, unbalanced calls to UnlockTimeSkipping will lead to rpc call failure

Call signature

▸ (request, callback): void

Parameters
NameType
requestIUnlockTimeSkippingRequest
callbackUnlockTimeSkippingCallback
Returns

void

▸ (request): Promise<UnlockTimeSkippingResponse>

Parameters
NameType
requestIUnlockTimeSkippingRequest
Returns

Promise<UnlockTimeSkippingResponse>

Type declaration

NameType
name"UnlockTimeSkipping"
path"/temporal.api.testservice.v1.TestService/UnlockTimeSkipping"
requestStreamundefined
requestType"UnlockTimeSkippingRequest"
responseStreamundefined
responseType"UnlockTimeSkippingResponse"

UnlockTimeSkippingCallback

Ƭ UnlockTimeSkippingCallback: (error: Error | null, response?: UnlockTimeSkippingResponse) => void

Callback as used by temporal.api.testservice.v1.TestService#unlockTimeSkipping.

Type declaration

▸ (error, response?): void

Parameters
NameTypeDescription
errorError | nullError, if any
response?UnlockTimeSkippingResponseUnlockTimeSkippingResponse
Returns

void


UnlockTimeSkippingWithSleep

Ƭ UnlockTimeSkippingWithSleep: Object

UnlockTimeSkippingWhileSleep decreases time locking counter by one and increases it back once the Test Server Time advances by the duration specified in the request.

This call returns only when the Test Server Time advances by the specified duration.

If it is called when Time Locking Counter is

  • more than 1 and no other unlocks are coming in, rpc call will block for the specified duration, time will not be fast forwarded.
  • 1, it will lead to fast forwarding of the time by the duration specified in the request and quick return of this rpc call.
  • 0 will lead to rpc call failure same way as an unbalanced UnlockTimeSkipping.

Call signature

▸ (request, callback): void

Parameters
NameType
requestISleepRequest
callbackUnlockTimeSkippingWithSleepCallback
Returns

void

▸ (request): Promise<SleepResponse>

Parameters
NameType
requestISleepRequest
Returns

Promise<SleepResponse>

Type declaration

NameType
name"UnlockTimeSkippingWithSleep"
path"/temporal.api.testservice.v1.TestService/UnlockTimeSkippingWithSleep"
requestStreamundefined
requestType"SleepRequest"
responseStreamundefined
responseType"SleepResponse"

UnlockTimeSkippingWithSleepCallback

Ƭ UnlockTimeSkippingWithSleepCallback: (error: Error | null, response?: SleepResponse) => void

Callback as used by temporal.api.testservice.v1.TestService#unlockTimeSkippingWithSleep.

Type declaration

▸ (error, response?): void

Parameters
NameTypeDescription
errorError | nullError, if any
response?SleepResponseSleepResponse
Returns

void