TestService
Type Aliases
GetCurrentTime()
GetCurrentTime =
void
GetCurrentTime returns the current Temporal Test Server time
This time might not be equal to System#currentTimeMillis() due to time skipping.
Call Signature
GetCurrentTime(
request,callback):void
GetCurrentTime returns the current Temporal Test Server time
This time might not be equal to System#currentTimeMillis() due to time skipping.
Parameters
request
callback
Returns
void
Call Signature
GetCurrentTime(
request):Promise<GetCurrentTimeResponse>
GetCurrentTime returns the current Temporal Test Server time
This time might not be equal to System#currentTimeMillis() due to time skipping.
Parameters
request
Returns
Promise<GetCurrentTimeResponse>
Properties
name
readonlyname:"GetCurrentTime"
path
readonlypath:"/temporal.api.testservice.v1.TestService/GetCurrentTime"
requestStream
readonlyrequestStream:undefined
requestType
readonlyrequestType:"google.protobuf.Empty"
responseStream
readonlyresponseStream:undefined
responseType
readonlyresponseType:"GetCurrentTimeResponse"
GetCurrentTimeCallback
GetCurrentTimeCallback = (
error,response?) =>void
Callback as used by temporal.api.testservice.v1.TestService#getCurrentTime.
Parameters
error
Error | null
Error, if any
response?
GetCurrentTimeResponse
Returns
void
LockTimeSkipping()
LockTimeSkipping =
void
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
LockTimeSkipping(
request,callback):void
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.
Parameters
request
callback
Returns
void
Call Signature
LockTimeSkipping(
request):Promise<LockTimeSkippingResponse>
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.
Parameters
request
Returns
Promise<LockTimeSkippingResponse>
Properties
name
readonlyname:"LockTimeSkipping"
path
readonlypath:"/temporal.api.testservice.v1.TestService/LockTimeSkipping"
requestStream
readonlyrequestStream:undefined
requestType
readonlyrequestType:"LockTimeSkippingRequest"
responseStream
readonlyresponseStream:undefined
responseType
readonlyresponseType:"LockTimeSkippingResponse"
LockTimeSkippingCallback
LockTimeSkippingCallback = (
error,response?) =>void
Callback as used by temporal.api.testservice.v1.TestService#lockTimeSkipping.
Parameters
error
Error | null
Error, if any
response?
LockTimeSkippingResponse
Returns
void
Sleep()
Sleep =
void
This call returns only when the Test Server Time advances by the specified duration. This is an EXPERIMENTAL API.
Call Signature
Sleep(
request,callback):void
This call returns only when the Test Server Time advances by the specified duration. This is an EXPERIMENTAL API.
Parameters
request
callback
Returns
void
Call Signature
Sleep(
request):Promise<SleepResponse>
This call returns only when the Test Server Time advances by the specified duration. This is an EXPERIMENTAL API.
Parameters
request
Returns
Promise<SleepResponse>
Properties
name
readonlyname:"Sleep"
path
readonlypath:"/temporal.api.testservice.v1.TestService/Sleep"
requestStream
readonlyrequestStream:undefined
requestType
readonlyrequestType:"SleepRequest"
responseStream
readonlyresponseStream:undefined
responseType
readonlyresponseType:"SleepResponse"
SleepCallback
SleepCallback = (
error,response?) =>void
Callback as used by temporal.api.testservice.v1.TestService#sleep.
Parameters
error
Error | null
Error, if any
response?
SleepResponse
Returns
void
SleepUntil()
SleepUntil =
void
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
SleepUntil(
request,callback):void
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.
Parameters
request
callback
Returns
void
Call Signature
SleepUntil(
request):Promise<SleepResponse>
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.
Parameters
request
Returns
Promise<SleepResponse>
Properties
name
readonlyname:"SleepUntil"
path
readonlypath:"/temporal.api.testservice.v1.TestService/SleepUntil"
requestStream
readonlyrequestStream:undefined
requestType
readonlyrequestType:"SleepUntilRequest"
responseStream
readonlyresponseStream:undefined
responseType
readonlyresponseType:"SleepResponse"
SleepUntilCallback
SleepUntilCallback = (
error,response?) =>void
Callback as used by temporal.api.testservice.v1.TestService#sleepUntil.
Parameters
error
Error | null
Error, if any
response?
SleepResponse
Returns
void
UnlockTimeSkipping()
UnlockTimeSkipping =
void
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
UnlockTimeSkipping(
request,callback):void
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
Parameters
request
callback
Returns
void
Call Signature
UnlockTimeSkipping(
request):Promise<UnlockTimeSkippingResponse>
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
Parameters
request
Returns
Promise<UnlockTimeSkippingResponse>
Properties
name
readonlyname:"UnlockTimeSkipping"
path
readonlypath:"/temporal.api.testservice.v1.TestService/UnlockTimeSkipping"
requestStream
readonlyrequestStream:undefined
requestType
readonlyrequestType:"UnlockTimeSkippingRequest"
responseStream
readonlyresponseStream:undefined
responseType
readonlyresponseType:"UnlockTimeSkippingResponse"
UnlockTimeSkippingCallback
UnlockTimeSkippingCallback = (
error,response?) =>void
Callback as used by temporal.api.testservice.v1.TestService#unlockTimeSkipping.
Parameters
error
Error | null
Error, if any
response?
UnlockTimeSkippingResponse
Returns
void
UnlockTimeSkippingWithSleep()
UnlockTimeSkippingWithSleep =
void
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
UnlockTimeSkippingWithSleep(
request,callback):void
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.
Parameters
request
callback
UnlockTimeSkippingWithSleepCallback
Returns
void
Call Signature
UnlockTimeSkippingWithSleep(
request):Promise<SleepResponse>
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.
Parameters
request
Returns
Promise<SleepResponse>
Properties
name
readonlyname:"UnlockTimeSkippingWithSleep"
path
readonlypath:"/temporal.api.testservice.v1.TestService/UnlockTimeSkippingWithSleep"
requestStream
readonlyrequestStream:undefined
requestType
readonlyrequestType:"SleepRequest"
responseStream
readonlyresponseStream:undefined
responseType
readonlyresponseType:"SleepResponse"
UnlockTimeSkippingWithSleepCallback
UnlockTimeSkippingWithSleepCallback = (
error,response?) =>void
Callback as used by temporal.api.testservice.v1.TestService#unlockTimeSkippingWithSleep.
Parameters
error
Error | null
Error, if any
response?
SleepResponse
Returns
void