Package io.temporal.testserver
Class TestServer
- java.lang.Object
-
- io.temporal.testserver.TestServer
-
public class TestServer extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTestServer.InProcessTestServerstatic classTestServer.PortBoundTestServer
-
Constructor Summary
Constructors Constructor Description TestServer()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static TestServer.PortBoundTestServercreatePortBoundServer(int port)Creates an out-of-process rather than in-process server, and does not set up a client.static TestServer.PortBoundTestServercreatePortBoundServer(int port, boolean lockTimeSkipping)Creates an out-of-process rather than in-process server, and does not set up a client.static TestServer.InProcessTestServercreateServer()static TestServer.InProcessTestServercreateServer(boolean lockTimeSkipping)static TestServer.InProcessTestServercreateServer(boolean lockTimeSkipping, long initialTimeMillis)static voidmain(java.lang.String[] args)
-
-
-
Method Detail
-
main
public static void main(java.lang.String[] args) throws java.io.IOException- Throws:
java.io.IOException
-
createPortBoundServer
public static TestServer.PortBoundTestServer createPortBoundServer(int port)
Creates an out-of-process rather than in-process server, and does not set up a client. Useful, for example, if you want to use the test service from other SDKs.- Parameters:
port- the port to listen on
-
createPortBoundServer
public static TestServer.PortBoundTestServer createPortBoundServer(int port, boolean lockTimeSkipping)
Creates an out-of-process rather than in-process server, and does not set up a client. Useful, for example, if you want to use the test service from other SDKs.- Parameters:
lockTimeSkipping- true if the time skipping should be locked (disabled) by default after creation of the server. To make test server behave like a real one in respect to time, this flag should betrue.port- the port to listen on
-
createServer
public static TestServer.InProcessTestServer createServer()
- Returns:
- created in-memory service
-
createServer
public static TestServer.InProcessTestServer createServer(boolean lockTimeSkipping)
- Parameters:
lockTimeSkipping- true if the time skipping should be locked (disabled) by default after creation of the server. To make test server behave like a real one in respect to time, this flag should betrue.- Returns:
- created in-memory service
-
createServer
public static TestServer.InProcessTestServer createServer(boolean lockTimeSkipping, long initialTimeMillis)
- Parameters:
lockTimeSkipping- true if the time skipping should be locked (disabled) by default after creation of the serverinitialTimeMillis- initial timestamp for the test server,System.currentTimeMillis()will be used if 0.- Returns:
- created in-memory service
-
-