... | ... | @@ -28,9 +28,50 @@ new_block = { |
|
|
|
|
|
#### Explanation of process
|
|
|
|
|
|
The hash generating process (aka publisher in MQ language), will send the generated "block" over to the message exchange. On the other side the validating processes (aka consumer in MQ language) will pop the messages from the queue and validate the "block". All blocks received on this end _must_ be valid, in order to pass this test.
|
|
|
|
|
|
|
|
|
## Scenario 2
|
|
|
* Scope: Check performance, low level validation of results
|
|
|
* Out of scope: n/a
|
|
|
|
|
|
### Producer
|
|
|
|
|
|
The generating process (aka publisher in MQ language), will just send a fixed hash to the message broker. The hash, however, contain, at least, UTF-8 characters, if not UTF-16. Since this is a fixed string, it can still be validated on the other side by the validating processes (aka consumer in MQ language).
|
|
|
|
|
|
#### Example hash
|
|
|
``` python
|
|
|
'testdict': {
|
|
|
u'مفتاح': u' قيمة',
|
|
|
u'键': u'值',
|
|
|
u'キー': u'値'
|
|
|
}
|
|
|
```
|
|
|
|
|
|
#### Explanation of the test
|
|
|
|
|
|
Since the process sends non-ASCII characters over the channel, we can see if the encoding/decoding works correct or not. In theory this will also test if JSON module from Python does it's job correctly, but given our experience, this is usually not the problem.
|
|
|
|
|
|
## Comparison
|
|
|
|
|
|
All these tests will be done with CloudAMQP as well.
|
|
|
|
|
|
|
|
|
## Deployment of the test scripts
|
|
|
|
|
|
### Requirements
|
|
|
|
|
|
*TODO*
|
|
|
|
|
|
* Firewall open for accessing MQ server
|
|
|
* HTTP(s) Proxy (for pip)
|
|
|
* pika Python module
|
|
|
|
|
|
### Steps to deploy
|
|
|
|
|
|
* Checkout source via git
|
|
|
* Create Python virtual environment
|
|
|
* Source virtualenv
|
|
|
* Install requirements (eg. using pip, since this is known to work)
|
|
|
* Change AMQP URL by exporting shell variable AMQP_URL
|
|
|
* Run as many publishers/consumer |
|
|
\ No newline at end of file |