Class TestServer
java.lang.Object
io.temporal.testserver.TestServer
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classstatic final class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreatePortBoundServer(int port) Creates an out-of-process rather than in-process server, and does not set up a client.createPortBoundServer(int port, boolean lockTimeSkipping) Creates an out-of-process rather than in-process server, and does not set up a client.createServer(boolean lockTimeSkipping) createServer(boolean lockTimeSkipping, long initialTimeMillis) static void
-
Constructor Details
-
TestServer
public TestServer()
-
-
Method Details
-
main
- Throws:
IOException
-
createPortBoundServer
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:
port- the port to listen onlockTimeSkipping- 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.
-
createServer
- Returns:
- created in-memory service
-
createServer
- 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
-