hass-core/tests/components
Jan Losinski d0b9f08bf2 InfluxDB send retry after IOError (#10263)
* Implement data write retry for InfluxDB

This adds an optional max_retries parameter to the InfluxDB component
to specify if and how often the component should try to send the data
if the connection failed due to an IOError.

The sending will be scheduled for a retry in 20 seconds as often as the
user specified. This can be handy for flaky getwork connections between
the DB and Homeassistant or outages like daily DSL reconnects.

Signed-off-by: Jan Losinski <losinski@wh2.tu-dresden.de>

* Add unittest for influx write retries

Signed-off-by: Jan Losinski <losinski@wh2.tu-dresden.de>

* Add RetryOnError as helper decorator in util

Signed-off-by: Jan Losinski <losinski@wh2.tu-dresden.de>

* Add unittests for RetryOnError

Signed-off-by: Jan Losinski <losinski@wh2.tu-dresden.de>

* Use RetryOnError decorator in InfluxDB

This replaces the scheduling logic in the InfluxDB component with the
RetryOnError decorator from homeassistant.util

Signed-off-by: Jan Losinski <losinski@wh2.tu-dresden.de>

* Make the linters happy

Signed-off-by: Jan Losinski <losinski@wh2.tu-dresden.de>

* Implement a queue limit for the retry decorator.

This adds a queue limit to the RetryOnError handler. It limits the
number of calls waiting for be retried. If this number is exceeded,
every new call will discard the oldest one in the queue.

* influxdb: Add the retry queue limit option.

* Make the linter happy.

* Make pylint happy

* Log exception of dropped retry

* Move RetryOnError decorator to influxdb component.

* Fix bug in logging usage

* Fix imports

* Add newlines at the end of files.

* Remove blank line

* Remove blank line
2017-11-23 16:58:18 -08:00
..
alarm_control_panel Add Arm Custom Bypass to alarm_control_panel (#10697) 2017-11-20 18:34:21 +01:00
alexa Implement entity and domain exclude/include for Alexa (#10647) 2017-11-17 21:10:24 -08:00
automation Fire numeric_state action when first state change matches criteria (#10125) 2017-10-25 16:01:09 +02:00
binary_sensor Add attribute to show who last un/set alarm (SPC) (#9906) 2017-11-11 12:36:03 -08:00
calendar assertEquals is deprecated (#7777) 2017-05-25 22:21:22 -07:00
camera Add new service 'snapshot' for camera (#10207) 2017-10-29 23:14:26 +01:00
climate Restore target temperature for generic thermostat (#10635) 2017-11-17 17:32:58 +01:00
cloud Cloud updates (#10567) 2017-11-15 08:16:19 +01:00
config Zwave save cache to file now. (#10381) 2017-11-06 15:15:52 +01:00
counter Move counter component (#10332) 2017-11-05 13:51:52 +01:00
cover Add entity_picture_template options to Template Cover, Template Light, Template Sensor, and Template Switch (#9854) 2017-10-30 09:28:37 -07:00
device_tracker Support for Unifi direct access device tracker (No unifi controller software) (#10097) 2017-11-17 14:47:40 -05:00
emulated_hue Refactored to new global json saving and loading (#10677) 2017-11-19 19:47:55 -08:00
fan Move counter component (#10332) 2017-11-05 13:51:52 +01:00
google_assistant add support for color temperature and color to Google Assistant (#10039) 2017-11-15 23:00:43 -08:00
group Move group services into their own YAML (#9597) 2017-10-01 23:18:10 -07:00
http Update aiohttp to 2.3.1 (#10139) 2017-11-05 18:42:31 -08:00
image_processing Fix a bunch of typos (#9545) 2017-09-23 17:15:46 +02:00
light Cleanup old stale restore feature (#10593) 2017-11-15 23:03:41 -08:00
lock Fix attribute entity (#8066) 2017-06-17 10:03:49 -07:00
mailbox Add longer text strings to mailbox demo to test string truncation (#8893) 2017-08-08 23:37:16 +02:00
media_player Use a template for the Universal media player state (#10395) 2017-11-14 11:41:19 +01:00
mqtt Make MQTT reconnection logic more resilient and fix race condition (#10133) 2017-11-17 10:29:23 -08:00
notify Add Facebook Notification tests (#10642) 2017-11-17 21:12:36 -08:00
persistent_notification Change persistent notification to avoid long text in entity state (#9967) 2017-10-21 21:59:05 +02:00
recorder Maintain recorder purge schedule (#10279) 2017-11-03 08:28:16 -07:00
remote Clean up remote component (#8728) 2017-07-31 20:52:39 -07:00
scene Add voluptuous config validation to scenes (#6830) 2017-03-28 23:39:53 -07:00
sensor Temporarily fix yahoo weather API issue and add unit test. (#10737) 2017-11-23 12:45:56 -08:00
switch Fix import in tests (#10525) 2017-11-11 22:24:43 +02:00
timer Move timer into correct folder (#10324) 2017-11-03 21:10:08 -07:00
tts Allow to pass YandexTTS options via sevice call (#10578) 2017-11-16 09:10:25 -08:00
vacuum Added new statistic attributes (#9433) 2017-09-25 22:27:27 +02:00
weather Move temperature display helper from components to helpers (#10555) 2017-11-14 10:36:18 +01:00
zwave Remove extra info from zwave entity states (#10413) 2017-11-07 10:13:39 -05:00
__init__.py Fix PEP257 issues 2016-03-09 10:25:50 +01:00
test_alert.py Adding done_message to alert (#8116) 2017-06-30 21:07:12 -07:00
test_api.py API POST has new state validation (fix for state = 0) (#8324) 2017-07-03 23:35:57 +02:00
test_configurator.py Convert configurator to use markdown (#10668) 2017-11-20 14:11:55 +01:00
test_conversation.py Fix conversation (#10686) 2017-11-20 20:26:36 -08:00
test_datadog.py Remove more test requirements (#7574) 2017-05-13 21:25:54 -07:00
test_demo.py Add Intent component (#8434) 2017-07-21 21:38:53 -07:00
test_device_sun_light_trigger.py Fix tests (#7659) 2017-05-19 07:37:39 -07:00
test_dialogflow.py Use constants for HTTP headers (#10313) 2017-11-04 12:04:05 -07:00
test_discovery.py Update netdisco (#7563) 2017-05-12 20:14:17 -07:00
test_duckdns.py Add DuckDNS component (#9556) 2017-09-24 15:48:45 -07:00
test_dyson.py Add support to Dyson 360 Eye robot vacuum using new vacuum platform (#8852) 2017-08-06 13:08:46 +02:00
test_ffmpeg.py Split bootstrap into bs + setup (#6416) 2017-03-05 10:41:54 +01:00
test_frontend.py Fix tests 2017-11-20 22:38:12 -08:00
test_google.py assertEquals is deprecated (#7777) 2017-05-25 22:21:22 -07:00
test_google_domains.py Add Google Domains component (#9996) 2017-10-25 11:42:53 +02:00
test_graphite.py Split bootstrap into bs + setup (#6416) 2017-03-05 10:41:54 +01:00
test_hassio.py Add panel build type (#10589) 2017-11-14 22:39:06 -08:00
test_history.py Add history_graph component (#9472) 2017-09-23 10:01:48 -07:00
test_history_graph.py Add history_graph component (#9472) 2017-09-23 10:01:48 -07:00
test_influxdb.py InfluxDB send retry after IOError (#10263) 2017-11-23 16:58:18 -08:00
test_init.py Fix a bunch of typos (#9545) 2017-09-23 17:15:46 +02:00
test_input_boolean.py Initial state over restore state (#6924) 2017-04-04 09:29:49 -07:00
test_input_datetime.py Correct input_datetime initial value parsing (#10417) 2017-11-15 23:16:22 -08:00
test_input_number.py Added increment + decrement to input_number (#9870) 2017-10-25 15:25:33 +02:00
test_input_select.py Initial state over restore state (#6924) 2017-04-04 09:29:49 -07:00
test_input_text.py Cleanup input_text (#9326) 2017-09-08 21:19:49 -07:00
test_intent_script.py Add Intent component (#8434) 2017-07-21 21:38:53 -07:00
test_introduction.py Split bootstrap into bs + setup (#6416) 2017-03-05 10:41:54 +01:00
test_kira.py Add Kira component to sensor and remote platforms (#7479) 2017-05-12 21:12:47 -07:00
test_litejet.py Fix up docstring for tests (#5090) 2016-12-28 20:04:59 +02:00
test_logbook.py Consolidate frontend (#9915) 2017-10-24 19:36:27 -07:00
test_logentries.py Split bootstrap into bs + setup (#6416) 2017-03-05 10:41:54 +01:00
test_logger.py Split bootstrap into bs + setup (#6416) 2017-03-05 10:41:54 +01:00
test_microsoft_face.py Support adding different server locations for Microsoft face component (#7532) 2017-05-12 10:53:25 +02:00
test_mqtt_eventstream.py Split bootstrap into bs + setup (#6416) 2017-03-05 10:41:54 +01:00
test_mqtt_statestream.py Add include/exclude filter to mqtt_statestream (#10354) 2017-11-08 15:54:12 +01:00
test_namecheapdns.py Make host optional (#10063) 2017-10-23 15:24:04 +02:00
test_no_ip.py Support for NO-IP (#10155) 2017-10-27 10:15:47 +02:00
test_panel_custom.py Fix panel_custom (#10303) 2017-11-03 10:28:31 +01:00
test_panel_iframe.py Pre-construct frontend index.html (#10520) 2017-11-11 15:22:05 -08:00
test_pilight.py Split bootstrap into bs + setup (#6416) 2017-03-05 10:41:54 +01:00
test_plant.py Fix plants calling async methods from sync context (#8200) 2017-06-25 10:07:28 -07:00
test_prometheus.py Add support for Prometheus (#8211) 2017-07-10 21:20:17 -07:00
test_proximity.py Split bootstrap into bs + setup (#6416) 2017-03-05 10:41:54 +01:00
test_python_script.py Added sorted() to python_script (#10621) 2017-11-16 22:06:02 -08:00
test_remember_the_milk.py integration with Remember The Milk. (#9803) 2017-10-31 20:33:47 -07:00
test_rest_command.py exposed content_type in rest_command (#7101) 2017-04-18 11:50:43 +02:00
test_rflink.py Cover component for RFlink (#9432) 2017-09-29 00:49:03 +02:00
test_rfxtrx.py Split bootstrap into bs + setup (#6416) 2017-03-05 10:41:54 +01:00
test_ring.py Clean artifacts after running Ring tests. (#6944) 2017-04-05 11:26:56 +02:00
test_rss_feed_template.py Feature/rss feed template (#7032) 2017-04-24 22:16:47 -07:00
test_script.py Group service / dynamic handling (#7971) 2017-06-16 00:52:28 +02:00
test_shell_command.py Split bootstrap into bs + setup (#6416) 2017-03-05 10:41:54 +01:00
test_shopping_list.py Shopping list: add item HTTP API (#10674) 2017-11-20 21:44:22 -08:00
test_sleepiq.py aiohttp 2 (#6835) 2017-03-30 00:50:53 -07:00
test_snips.py Add Intent component (#8434) 2017-07-21 21:38:53 -07:00
test_spc.py Add attribute to show who last un/set alarm (SPC) (#9906) 2017-11-11 12:36:03 -08:00
test_splunk.py splunk: Handle datetime objects in event payload (#9628) 2017-09-30 09:35:25 +02:00
test_statsd.py Adding support for mapping keys to value in statsd (#8665) 2017-07-27 08:58:34 +02:00
test_sun.py Refactor sun component for correctness (#7295) 2017-05-09 00:03:34 -07:00
test_system_log.py Add basic backend support for a system log (#10492) 2017-11-14 20:35:56 -08:00
test_updater.py Honor PEP8 naming convention (#8909) 2017-08-10 19:31:28 +02:00
test_upnp.py Allow specifying multiple ports for UPNP component (#9560) 2017-09-24 13:08:58 -07:00
test_vultr.py Fix import in tests (#10525) 2017-11-11 22:24:43 +02:00
test_wake_on_lan.py New service send_magic_packet with new component wake_on_lan (#8397) 2017-07-10 18:37:51 -07:00
test_weblink.py Split bootstrap into bs + setup (#6416) 2017-03-05 10:41:54 +01:00
test_websocket_api.py Add an option to serve ES6 JS to clients (#10474) 2017-11-10 23:02:06 -08:00
test_zone.py Split bootstrap into bs + setup (#6416) 2017-03-05 10:41:54 +01:00