public final class ServerCache extends Object
Static utility testing class to keep a Web Server open between tests. This is to prevent the expensive server creation/deploy occurring multiple times per test suite.
| Modifier and Type | Method and Description |
|---|---|
static LdeLauncher |
getLauncher()
Get the shared instance of the launcher.
|
static String |
getUrl() |
static boolean |
isRunning() |
static void |
restartServer()
Stop the server if it is running, then run it.
|
static void |
startServer()
Start the server.
|
static void |
stopServer()
Stop the server.
|
public static LdeLauncher getLauncher()
Get the shared instance of the launcher.
Warning: ensure concurrency is considered with any commands run on the TestLauncher. Lock on the returned instance to ensure safe concurrent behaviour with other threads using this class.
public static String getUrl()
public static void stopServer()
public static void restartServer()
public static boolean isRunning()
public static void startServer()
Copyright © 2016. All rights reserved.