mirror of
https://github.com/mainflux/mainflux.git
synced 2025-05-02 22:17:10 +08:00

* Fix failed subscription handling in ws adapter Fix unsubscribing bug in ws adapter. Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com> * Add subscription fail and publish fail test cases Update mock implementation to receive publish error in order to support these test cases. Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com> * Update mainflux version to 0.2.3 Update project version and load tests version to 0.2.3. Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com> * Update version endpoint response format Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>
Load Test
This SBT project contains load tests written for mainflux platform.
Setup
In order to run load tests you must have openjdk8 and sbt installed on your machine.
Configuration
Tests are configured to use variables from JAVA_OPTS
presented in the
following table. Note that any unset variables will be replaced with their
default values.
Variable | Description | Default |
---|---|---|
manager | Manager service URL | http://localhost:8180 |
http | HTTP adapter service URL | http://localhost:8182 |
requests | Number of requests to be sent per second | 100 |
Usage
This project contains two simulations:
PublishSimulation
CreateAndRetrieveClientSimulation
To run all tests you will have to run following commands:
cd <path_to_mainflux_project>/load-test
sbt gatling:test
Publish Simulation
PublishSimulation
contains load tests for publishing messages. To run this test use following command:
sbt "gatling:testOnly com.mainflux.loadtest.simulations.PublishSimulation"
Create And Retrieve Client Simulation
CreateAndRetrieveClientSimulation
contains load tests for creating and retrieving clients. To run this test use following command:
sbt "gatling:testOnly com.mainflux.loadtest.simulations.CreateAndRetrieveClientSimulation"