Package com.streambase.sb.unittest
Class BaseTestEnvironment
java.lang.Object
com.streambase.sb.unittest.BaseTestEnvironment
- All Implemented Interfaces:
SBTestEnvironment
A default implementation of
SBTestEnvironment for use
by SBServerManager instances. Retrieve the singleton DEFAULT_ENVIRONMENT
for most uses.- Since:
- 6.6
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreate a basic test environment that configures from a server configuration file per a system propertyBaseTestEnvironment(String confFilePath) Create a basic test environment that uses a specific configuration fileBaseTestEnvironment(String confFilePath, Map<String, String> engineSystemProperties) Create a basic test environment that uses a specific configuration file -
Method Summary
Modifier and TypeMethodDescriptiongetConf()booleanbooleanvoidsetNowImpl(NowImplementation nowImpl) Set the current implementation of now() function
-
Field Details
-
DEFAULT_ENVIRONMENT
- See Also:
-
-
Constructor Details
-
BaseTestEnvironment
public BaseTestEnvironment()Create a basic test environment that configures from a server configuration file per a system property- See Also:
-
BaseTestEnvironment
Create a basic test environment that uses a specific configuration file- Parameters:
confFilePath- The path to the conf file- Since:
- 6.6.13
-
BaseTestEnvironment
Create a basic test environment that uses a specific configuration file- Parameters:
confFilePath- The path to the conf fileengineSystemProperties- any engine-specific system properties associated with this environment, an empty map if none- Since:
- 10.5.0
-
-
Method Details
-
isIntermediateStreamDequeueEnabled
public boolean isIntermediateStreamDequeueEnabled()- Specified by:
isIntermediateStreamDequeueEnabledin interfaceSBTestEnvironment- Returns:
- whether intermediate stream dequeueing should be enabled
-
isAppDebuggingEnabled
public boolean isAppDebuggingEnabled()- Specified by:
isAppDebuggingEnabledin interfaceSBTestEnvironment- Returns:
- whether the debugger should be enabled
-
getConf
- Specified by:
getConfin interfaceSBTestEnvironment- Returns:
- the contents of a StreamBase configuration file that should not be null
- Throws:
StreamBaseException- if any error occurs accessing the configuration
-
getNowImpl
- Specified by:
getNowImplin interfaceSBTestEnvironment- Returns:
- the
NowImplementationvalue corresponding to the current implementation of now() function
-
setNowImpl
Description copied from interface:SBTestEnvironmentSet the current implementation of now() function- Specified by:
setNowImplin interfaceSBTestEnvironment- Parameters:
nowImpl- theNowImplementationvalue corresponding to the current implementation of now() function- Throws:
StreamBaseException- if any error occurs
-
getEngineSystemProperties
- Specified by:
getEngineSystemPropertiesin interfaceSBTestEnvironment- Returns:
- the engine-specific system properties associated with this environment, an empty map if none. Default implementation returns an empty map.
-