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
-
Constructor Summary
ConstructorDescriptionCreate 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()
boolean
boolean
void
setNowImpl
(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:
isIntermediateStreamDequeueEnabled
in interfaceSBTestEnvironment
- Returns:
- whether intermediate stream dequeueing should be enabled
-
isAppDebuggingEnabled
public boolean isAppDebuggingEnabled()- Specified by:
isAppDebuggingEnabled
in interfaceSBTestEnvironment
- Returns:
- whether the debugger should be enabled
-
getConf
- Specified by:
getConf
in 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:
getNowImpl
in interfaceSBTestEnvironment
- Returns:
- the
NowImplementation
value corresponding to the current implementation of now() function
-
setNowImpl
Description copied from interface:SBTestEnvironment
Set the current implementation of now() function- Specified by:
setNowImpl
in interfaceSBTestEnvironment
- Parameters:
nowImpl
- theNowImplementation
value corresponding to the current implementation of now() function- Throws:
StreamBaseException
- if any error occurs
-
getEngineSystemProperties
- Specified by:
getEngineSystemProperties
in interfaceSBTestEnvironment
- Returns:
- the engine-specific system properties associated with this environment, an empty map if none. Default implementation returns an empty map.
-