Skip to content

Influx: add tests for write buffering (#406) - #412

Closed
isarrider wants to merge 1 commit into
volkszaehler:feat/influx-retryfrom
isarrider:test/influx-buffer
Closed

isarrider wants to merge 1 commit into
volkszaehler:feat/influx-retryfrom
isarrider:test/influx-buffer

Conversation

@isarrider

Copy link
Copy Markdown
Contributor

Adds tests for the write buffering in #406. This PR targets the feat/influx-retry branch and only adds server/influx_test.go; #406's code is unchanged.

  • TestInfluxBufferOptions: checks the retry queue size (in batches), retry count and retry time derived from buffer for 0, 500ms, 10m and 1h, including the client defaults for 0 and the one-batch minimum.
  • TestInfluxOutage: simulates a 20s database outage against a fake InfluxDB server and checks that every point arrives once it is back with a 1h buffer.
  • TestInfluxOutageDefault: the same outage loses data with the client defaults, so the outage test is meaningful.

The outage tests take about 1–1.5 minutes and are skipped with -short.

- TestInfluxBufferOptions checks the retry queue size, retry count and
  retry time derived from the buffer duration, including the client
  defaults for 0 and the one-batch minimum
- TestInfluxOutage simulates a 20s database outage against a fake
  server and checks that every point is delivered with a 1h buffer
- TestInfluxOutageDefault checks that the same outage loses data with
  the client defaults, so the outage test is meaningful

The outage tests are skipped with -short.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XzyNHxELw6PasHKku3kreU
@isarrider

Copy link
Copy Markdown
Contributor Author

Closed in favor of #413

@isarrider isarrider closed this Nov 4, 2026
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

Successfully merging this pull request may close these issues.

1 participant