@Configuration
public class XdEc2Validation
extends java.lang.Object
Constructor and Description |
---|
XdEc2Validation(HadoopUtils hadoopUtil,
XdEnvironment xdEnvironment)
Construct a new instance of XdEc2Validation
|
Modifier and Type | Method and Description |
---|---|
void |
assertReceived(java.net.URL url,
java.lang.String streamName,
int msgCountExpected)
Retrieves the stream and verifies that all modules in the stream processed the data.
|
void |
assertReceived(java.net.URL url,
java.lang.String streamName,
java.lang.String moduleName,
java.lang.String channelName,
int msgCountExpected)
Verifies that the instances for the channel and module has in fact processed the correct number of messages.
|
void |
verifyContentContains(java.net.URL url,
java.lang.String fileName,
java.lang.String data)
Verifies that the data user gave us is contained in the result.
|
void |
verifyContentContainsIgnoreCase(java.net.URL url,
java.lang.String fileName,
java.lang.String data)
Verifies that the data user gave us is contained in the result.
|
void |
verifyHdfsTestContent(java.lang.String expectedResult,
java.lang.String pathToHdfsFile)
Evaluates the content of the hdfs file against a result.
|
void |
verifyLogContains(java.net.URL url,
java.lang.String data)
Verifies that the data is contained in the container log.
|
void |
verifyTestContent(java.net.URL url,
java.lang.String fileName,
java.lang.String data)
Verifies that the data user gave us is what was stored after the stream has processed the flow.
|
void |
verifyXDAdminReady(java.net.URL adminServer)
Assert is the admin server is available.
|
public XdEc2Validation(HadoopUtils hadoopUtil, XdEnvironment xdEnvironment)
public void verifyXDAdminReady(java.net.URL adminServer)
adminServer
- the location of the admin serverpublic void assertReceived(java.net.URL url, java.lang.String streamName, java.lang.String moduleName, java.lang.String channelName, int msgCountExpected)
url
- The server where the stream is deployedstreamName
- The stream to analyze.moduleName
- The name of the module.channelName
- The name of the channel to interrogate.msgCountExpected
- expected number of messages to have been successfully processed by the module.public void assertReceived(java.net.URL url, java.lang.String streamName, int msgCountExpected)
url
- The server where the stream is deployedstreamName
- The stream to analyze.java.lang.Exception
- Error processing JSON or making HTTP GET requestpublic void verifyTestContent(java.net.URL url, java.lang.String fileName, java.lang.String data)
url
- The server that the stream is deployed.fileName
- The file that contains the data to check.data
- The data used to evaluate the results of the stream.public void verifyLogContains(java.net.URL url, java.lang.String data)
url
- The server where the container is deployed.data
- the value that will be searched for, within the log file.public void verifyContentContains(java.net.URL url, java.lang.String fileName, java.lang.String data)
url
- The server where the container is deployed.fileName
- The file that contains the data to check.data
- The data used to evaluate the results of the stream.public void verifyContentContainsIgnoreCase(java.net.URL url, java.lang.String fileName, java.lang.String data)
url
- The server that the stream is deployed.fileName
- The file that contains the data to check.data
- The data used to evaluate the results of the stream.public void verifyHdfsTestContent(java.lang.String expectedResult, java.lang.String pathToHdfsFile)
expectedResult
- The data that should be within the hdfs file.pathToHdfsFile
- The location of the file on the hdfs file system