ASF Bugzilla – Attachment 35685 Details for
Bug 61534
Convert AssertionError to a failed assertion in the JSR223Assertion allowing users to use assert in their code
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Catch AssertionError on assertions and use them to fill in the failure message
assertionerror.diff (text/plain), 13.68 KB, created by
Felix Schumacher
on 2018-01-19 11:26:28 UTC
(
hide
)
Description:
Catch AssertionError on assertions and use them to fill in the failure message
Filename:
MIME Type:
Creator:
Felix Schumacher
Created:
2018-01-19 11:26:28 UTC
Size:
13.68 KB
patch
obsolete
>Index: docs/images/asf-logo.png >=================================================================== >Kann nicht anzeigen: Dateityp ist als binär angegeben. >svn:mime-type = image/png >Index: docs/images/jmeter_square.png >=================================================================== >Kann nicht anzeigen: Dateityp ist als binär angegeben. >svn:mime-type = application/octet-stream >Index: docs/images/screenshots/Search-Correlation.png >=================================================================== >Kann nicht anzeigen: Dateityp ist als binär angegeben. >svn:mime-type = image/png >Index: docs/images/screenshots/Select-Recording-Template.png >=================================================================== >Kann nicht anzeigen: Dateityp ist als binär angegeben. >svn:mime-type = image/png >Index: docs/images/screenshots/aggregate_report.png >=================================================================== >Kann nicht anzeigen: Dateityp ist als binär angegeben. >svn:mime-type = application/octet-stream >Index: docs/images/screenshots/aggregate_report_grouped.png >=================================================================== >Kann nicht anzeigen: Dateityp ist als binär angegeben. >svn:mime-type = image/png >Index: docs/images/screenshots/backend_listener_influxdb_graph.png >=================================================================== >Kann nicht anzeigen: Dateityp ist als binär angegeben. >svn:mime-type = image/png >Index: docs/images/screenshots/changes/2.13/module_controller_tree_view.png >=================================================================== >Kann nicht anzeigen: Dateityp ist als binär angegeben. >svn:mime-type = image/png >Index: docs/images/screenshots/changes/2.8/05_http_defaults_url_filter.png >=================================================================== >Kann nicht anzeigen: Dateityp ist als binär angegeben. >svn:mime-type = image/png >Index: docs/images/screenshots/changes/2.8/06_os_sampler_stdout-err-in.png >=================================================================== >Kann nicht anzeigen: Dateityp ist als binär angegeben. >svn:mime-type = image/png >Index: docs/images/screenshots/changes/3.0/graphite_backend_listener_regex.png >=================================================================== >Kann nicht anzeigen: Dateityp ist als binär angegeben. >svn:mime-type = application/octet-stream >Index: docs/images/screenshots/changes/3.0/report_transactions_per_second.png >=================================================================== >Kann nicht anzeigen: Dateityp ist als binär angegeben. >svn:mime-type = application/octet-stream >Index: docs/images/screenshots/changes/3.2/backend_influxdb.png >=================================================================== >Kann nicht anzeigen: Dateityp ist als binär angegeben. >svn:mime-type = image/png >Index: docs/images/screenshots/changes/3.2/dns_cache_manager_static_hosts.png >=================================================================== >Kann nicht anzeigen: Dateityp ist als binär angegeben. >svn:mime-type = image/png >Index: docs/images/screenshots/changes/3.2/http_recorder_1.png >=================================================================== >Kann nicht anzeigen: Dateityp ist als binär angegeben. >svn:mime-type = image/png >Index: docs/images/screenshots/changes/3.2/http_recorder_2.png >=================================================================== >Kann nicht anzeigen: Dateityp ist als binär angegeben. >svn:mime-type = image/png >Index: docs/images/screenshots/changes/3.2/http_request.png >=================================================================== >Kann nicht anzeigen: Dateityp ist als binär angegeben. >svn:mime-type = image/png >Index: docs/images/screenshots/changes/3.2/jms_publisher_reconnect.png >=================================================================== >Kann nicht anzeigen: Dateityp ist als binär angegeben. >svn:mime-type = image/png >Index: docs/images/screenshots/changes/3.2/jms_subscriber_content_encoding.png >=================================================================== >Kann nicht anzeigen: Dateityp ist als binär angegeben. >svn:mime-type = image/png >Index: docs/images/screenshots/changes/3.2/jms_subscriber_reconnect_pause.png >=================================================================== >Kann nicht anzeigen: Dateityp ist als binär angegeben. >svn:mime-type = image/png >Index: docs/images/screenshots/changes/3.2/menu_add_think_times.png >=================================================================== >Kann nicht anzeigen: Dateityp ist als binär angegeben. >svn:mime-type = image/png >Index: docs/images/screenshots/changes/3.2/menu_apply_naming_policy.png >=================================================================== >Kann nicht anzeigen: Dateityp ist als binär angegeben. >svn:mime-type = image/png >Index: docs/images/screenshots/changes/3.2/report_statistics.png >=================================================================== >Kann nicht anzeigen: Dateityp ist als binär angegeben. >svn:mime-type = image/png >Index: docs/images/screenshots/changes/3.2/response_assertion.png >=================================================================== >Kann nicht anzeigen: Dateityp ist als binär angegeben. >svn:mime-type = image/png >Index: docs/images/screenshots/changes/3.2/search_replace.png >=================================================================== >Kann nicht anzeigen: Dateityp ist als binär angegeben. >svn:mime-type = image/png >Index: docs/images/screenshots/changes/3.2/sorting.png >=================================================================== >Kann nicht anzeigen: Dateityp ist als binär angegeben. >svn:mime-type = image/png >Index: docs/images/screenshots/changes/3.2/xpath_extractor_matchno.png >=================================================================== >Kann nicht anzeigen: Dateityp ist als binär angegeben. >svn:mime-type = image/png >Index: docs/images/screenshots/changes/3.3/influxdb_udp.png >=================================================================== >Kann nicht anzeigen: Dateityp ist als binär angegeben. >svn:mime-type = image/png >Index: docs/images/screenshots/changes/3.3/jdbc_config_validation_driver_url.png >=================================================================== >Kann nicht anzeigen: Dateityp ist als binär angegeben. >svn:mime-type = image/png >Index: docs/images/screenshots/changes/3.3/jdbc_config_validation_query.png >=================================================================== >Kann nicht anzeigen: Dateityp ist als binär angegeben. >svn:mime-type = image/png >Index: docs/images/screenshots/changes/3.3/jmeter_export_transactions_menu.png >=================================================================== >Kann nicht anzeigen: Dateityp ist als binär angegeben. >svn:mime-type = image/png >Index: docs/images/screenshots/changes/3.3/jmeter_export_transactions_result.png >=================================================================== >Kann nicht anzeigen: Dateityp ist als binär angegeben. >svn:mime-type = image/png >Index: docs/images/screenshots/changes/3.3/jmeter_function_add_time.png >=================================================================== >Kann nicht anzeigen: Dateityp ist als binär angegeben. >svn:mime-type = image/png >Index: docs/images/screenshots/changes/3.3/jmeter_function_random_date.png >=================================================================== >Kann nicht anzeigen: Dateityp ist als binär angegeben. >svn:mime-type = image/png >Index: docs/images/screenshots/changes/3.3/jmeter_function_result.png >=================================================================== >Kann nicht anzeigen: Dateityp ist als binär angegeben. >svn:mime-type = image/png >Index: docs/images/screenshots/changes/3.3/jmeter_if_controller.png >=================================================================== >Kann nicht anzeigen: Dateityp ist als binär angegeben. >svn:mime-type = image/png >Index: docs/images/screenshots/counter.png >=================================================================== >Kann nicht anzeigen: Dateityp ist als binär angegeben. >svn:mime-type = application/octet-stream >Index: docs/images/screenshots/dashboard/report_active_threads_over_time.png >=================================================================== >Kann nicht anzeigen: Dateityp ist als binär angegeben. >svn:mime-type = application/octet-stream >Index: docs/images/screenshots/dashboard/report_apdex_and_summary.png >=================================================================== >Kann nicht anzeigen: Dateityp ist als binär angegeben. >svn:mime-type = application/octet-stream >Index: docs/images/screenshots/dashboard/report_connect_time_over_time.png >=================================================================== >Kann nicht anzeigen: Dateityp ist als binär angegeben. >svn:mime-type = image/png >Index: docs/images/screenshots/dashboard/report_statistics.png >=================================================================== >Kann nicht anzeigen: Dateityp ist als binär angegeben. >svn:mime-type = application/octet-stream >Index: docs/images/screenshots/dashboard/report_transactions_per_second.png >=================================================================== >Kann nicht anzeigen: Dateityp ist als binär angegeben. >svn:mime-type = application/octet-stream >Index: docs/images/screenshots/dashboard/response_time_overview.png >=================================================================== >Kann nicht anzeigen: Dateityp ist als binär angegeben. >svn:mime-type = image/png >Index: docs/images/screenshots/dashboard/response_time_percentiles_over_time.png >=================================================================== >Kann nicht anzeigen: Dateityp ist als binär angegeben. >svn:mime-type = image/png >Index: docs/images/screenshots/dashboard/top_5_errors_by_sampler.png >=================================================================== >Kann nicht anzeigen: Dateityp ist als binär angegeben. >svn:mime-type = image/png >Index: docs/images/screenshots/grafana_dashboard.png >=================================================================== >Kann nicht anzeigen: Dateityp ist als binär angegeben. >svn:mime-type = application/octet-stream >Index: docs/images/screenshots/jdbc-config/jdbc-conn-config.png >=================================================================== >Kann nicht anzeigen: Dateityp ist als binär angegeben. >svn:mime-type = application/octet-stream >Index: docs/images/screenshots/jms/jms_pub.png >=================================================================== >Kann nicht anzeigen: Dateityp ist als binär angegeben. >svn:mime-type = application/octet-stream >Index: docs/images/screenshots/logic-controller/interleave-controller.png >=================================================================== >Kann nicht anzeigen: Dateityp ist als binär angegeben. >svn:mime-type = application/octet-stream >Index: docs/images/screenshots/mailervisualizer.png >=================================================================== >Kann nicht anzeigen: Dateityp ist als binär angegeben. >svn:mime-type = application/octet-stream >Index: docs/images/screenshots/proxy_control.png >=================================================================== >Kann nicht anzeigen: Dateityp ist als binär angegeben. >svn:mime-type = application/octet-stream >Index: docs/images/screenshots/recorder_popup_info.png >=================================================================== >Kann nicht anzeigen: Dateityp ist als binär angegeben. >svn:mime-type = image/png >Index: docs/images/screenshots/summary_report.png >=================================================================== >Kann nicht anzeigen: Dateityp ist als binär angegeben. >svn:mime-type = application/octet-stream >Index: docs/images/screenshots/summary_report_grouped.png >=================================================================== >Kann nicht anzeigen: Dateityp ist als binär angegeben. >svn:mime-type = image/png >Index: src/components/org/apache/jmeter/assertions/JSR223Assertion.java >=================================================================== >--- src/components/org/apache/jmeter/assertions/JSR223Assertion.java (Revision 1821610) >+++ src/components/org/apache/jmeter/assertions/JSR223Assertion.java (Arbeitskopie) >@@ -46,12 +46,7 @@ > Bindings bindings = scriptEngine.createBindings(); > bindings.put("SampleResult", response); > bindings.put("AssertionResult", result); >- try { >- processFileOrScript(scriptEngine, bindings); >- } catch (AssertionError ae) { // NOSONAR We don't want to log the exception as it is handled >- result.setFailure(true); >- result.setFailureMessage(ae.toString()); >- } >+ processFileOrScript(scriptEngine, bindings); > result.setError(false); > } catch (IOException | ScriptException e) { > log.error("Problem in JSR223 script: {}", getName(), e); >@@ -60,7 +55,7 @@ > } > return result; > } >- >+ > @Override > public Object clone() { > return super.clone(); >Index: src/core/org/apache/jmeter/threads/JMeterThread.java >=================================================================== >--- src/core/org/apache/jmeter/threads/JMeterThread.java (Revision 1821610) >+++ src/core/org/apache/jmeter/threads/JMeterThread.java (Arbeitskopie) >@@ -811,8 +811,11 @@ > AssertionResult assertionResult; > try { > assertionResult = assertion.getResult(result); >- } catch (ThreadDeath e) { >- throw e; >+ } catch (AssertionError e) { >+ log.debug("AssertionError processing Assertion.", e); >+ assertionResult = new AssertionResult("Assertion failed! See log file."); >+ assertionResult.setFailure(true); >+ assertionResult.setFailureMessage(e.toString()); > } catch (JMeterError e) { > log.error("Error processing Assertion.", e); > assertionResult = new AssertionResult("Assertion failed! See log file.");
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 61534
:
35333
| 35685