-
Notifications
You must be signed in to change notification settings - Fork 38
Output Tester
The output tester is a program that can be used after deploying aidr-output, to test this module independently of the other modules.
It only requires the aidr-output module to be deployed.
The output tester is run through the following command:
mvn test -Dtest=OutputTesterTest PARAMETERS
These parameters are optional:
-Dconfig=FILE
-DnItems=NUMBER (default 2000)
The config is the name of the output configuration (or of a centralized configuration) to read properties that the tester needs to know to perform the testing: the URL of the output's API, and the name of the REDIS queue from which output reads.
The nItems is the number of items that should be written to the persister. It should be strictly greater than GetBufferedAIDRData.MAX_MESSAGES_COUNT so that we can appreciate the effects of the buffer.
The output test should generate a collection name as YYYYMMDDhhssmm-output-test. It should also generate synthetic Twitter messages with fixed random texts and random tweetids. It should keep those messages in memory for the duration of the text.
- Write to REDIS nItems items in the channel expected by output, if it fails, FAIL.
- Call the
/crisis/fetch/channel/{crisisCode}API, if it fails, FAIL. - Read from that API the returned tweets, if the number of messages is different from MAX_MESSAGES_COUNT (i.e. if it is greater than or less than MAX_MESSAGES_COUNT), FAIL.
- Compare all the tweets received with the latest MAX_MESSAGES_COUNT tweets sent. If any of them is different, FAIL.
- If this point is reached, exit with success code.
FAIL means printing a clear and informative message describing the condition and exiting with code 1 (non success).
On interrupt by the user, no action is needed.
- Home
- [What is AIDR?](AIDR Overview)
- The science behind AIDR
- [Operator's manual](AIDR Operator's Manual)
- [Public API documentation](API documentation)
- High-level overview
- Common
- DB Manager
- DTO standards
- Database schema
- Manager
- Manager API
- Collector
- Collector API
- Reconnect strategy
- Collector Tester
- Output
- Output API
- Output Buffered
- Output Streaming
- Output Tester
- Persister
- Persister API
- Persister Tester
- Tagger
- Tagger Concepts
- Tagger API
- Tagger Tester
- Trainer
- Trainer API
- PyBossa Trainer