[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better error handling if InfluxDB-database is not accessible #30

Open
dmuravov opened this issue Dec 4, 2018 · 0 comments
Open

Better error handling if InfluxDB-database is not accessible #30

dmuravov opened this issue Dec 4, 2018 · 0 comments

Comments

@dmuravov
Copy link
dmuravov commented Dec 4, 2018

A. Setup:

  1. JMeter-testplan checks a REST-API of a server-side software
  2. HTTP-Request blocks are used to send REST-calls
  3. Every ThreadGroup has a BackendListener to write into a time-series database.
  4. Such a BackendListener uses a JMeter plugin "JMeter-InfluxDB-Writer 1.2".

B. Test execution:

  1. JMeter is started with Maven (meter-maven-plugin:2.8.1).
  2. If the InfluxDB is not reachable for JMeter then an IllegalStateException is thrown
  3. After that a row of Timeout-errors come (which is understandable).
  4. JMeter hangs and never stops (as experiment I have waited for 2 hours).

C. My proposal:

  1. If something wrong happens in the startup phase with the Sampler-block then break the test with an error message.
  2. If something wrong happens with a supporting "secondary" element like a Backend-Listener then catch the exception, stop the execution and show a warning with a hint for the user to deactivate Backend-Listener with a passed property say "backend.listener.disabled=true" or fix the connection issue.

Reason for (2) is that developers use sometimes JMeter on their local machines without having set up (or having access to) all "add-ons" like a time-series database etc. They just want to verify quickly their changes in code and get simple feedback from JMeter in form of response times without any further statistic collection.

Example of the unhandled error is in the log-file.
jmeter_error.log

dmuravov pushed a commit to dmuravov/JMeter-InfluxDB-Writer that referenced this issue Dec 7, 2018
…ed" (default value = FALSE). Now the plugin reports a ERROR-log if connection to InfluxDB is not present and sets the above parameter to the value TRUE thus avoiding write-operations to InfluxDB which cause errors. NOTE: in order to avoid never ending hanging of JMeter in case backend listeners have problems the user should set JMeter property jmeterengine.force.system.exit=true. This will force JMeter to terminate at the end of the test.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant