Public Member Functions | |
EngineFilteringTest () throws Exception | |
Override void | acsLogConnConnecting () |
Override void | acsLogConnDisconnected () |
Override void | acsLogConnEstablished () |
Override void | acsLogConnLost () |
Override void | acsLogConnSuspended () |
Override void | acsLogsDelay () |
Override void | reportStatus (String status) |
Override void | logEntryReceived (ILogEntry logEntry) |
Override void | xmlEntryReceived (String xmlLogString) |
Override void | errorReceived (String xml) |
void | testAddFilter () throws Exception |
void | testAddFiltersVector () throws Exception |
void | testFiltering () throws Exception |
Protected Member Functions | |
Override void | setUp () throws Exception |
Override void | tearDown () throws Exception |
Private Attributes | |
LCEngine | engine |
Vector< ILogEntry > | receivedLogs |
int | xmlLogs = 0 |
int | xmlInfos = 0 |
Static Private Attributes | |
final int | TIMEOUT = 120 |
final int | NUMBER_OF_LOGS = 100 |
|
Constructor
|
|
|
|
Disconnected
|
|
|
|
Connection lost: tat will show this situation
|
|
tat will show this situation |
|
|
|
Method executed in case of error: print a message in the stdout, tat will show this error
|
|
Executed whenever a new log is received. Filtering works here. The received log is added to the vector
|
|
|
|
Setup the environment by creating the engine with a null set of filters. The engine is disconnected because some of the tests do not need the connection alive.
|
|
|
|
Test the adding and clearing filters
|
|
Test adding a FiltersVector |
|
Set a filter and checks if the logs received are those passing a filters. In this case we do not need to check the correctness of the logs received in the listeners but only if they are received or not because it means that the engine is using the filters. For this example, the test defines 1 filter based on the type of the logs. The correctness of the filtering is also tested in another test because the engine uses the same filters used by the table.
|
|
XML entries are not filtered!
|
|
|
|
|
|
|
|
|
|
|
|
|