Skip to content

test: adjust partial writes test to v3.10 behaviour#218

Merged
NguyenHoangSon96 merged 2 commits into
mainfrom
test/fix-partial-writes-test
Jun 19, 2026
Merged

test: adjust partial writes test to v3.10 behaviour#218
NguyenHoangSon96 merged 2 commits into
mainfrom
test/fix-partial-writes-test

Conversation

@NguyenHoangSon96

@NguyenHoangSon96 NguyenHoangSon96 commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Closes #

Proposed Changes

  • Influxdb3 (3.10 released yesterday) returns different errors, so we need to update our tests to accommodate it.
  • InfluxDB 3.10 write-error behavior
Endpoint accept_partial HTTP Data written Expected client behaviour?
v2 true 400, code="invalid" None API Exception/Error
v2 false 400, code="invalid" None API Exception/Error
v3 true 400, error="partial write of line protocol occurred", data=array Valid lines written PartialWrite Exception/Error
v3 false 400, error="line protocol parsing error", data=object None API Exception
  • Fix gpg download scripts.

Checklist

  • CHANGELOG.md updated
  • Rebased/mergeable
  • A test has been added if appropriate
  • Tests pass
  • Commit messages are conventional
  • Sign CLA (if not already signed)

@NguyenHoangSon96 NguyenHoangSon96 self-assigned this Jun 19, 2026
Copilot AI review requested due to automatic review settings June 19, 2026 02:54

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adjusts the integration tests for write error handling to match InfluxDB v3.10 behavior, specifically differentiating between partial-write errors vs. hard failures depending on accept_partial and API version.

Changes:

  • Update test_v3_error to assert InfluxDBPartialWriteError only when accept_partial=True, otherwise assert ApiException with the expected v3 error payload.
  • Update test_v2_error to expect ApiException for both accept_partial settings and validate the v2 error JSON structure.
  • Add JSON parsing to validate structured error bodies returned by the server.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/test_influxdb_client_3_integration.py
@codecov

codecov Bot commented Jun 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.90%. Comparing base (665d998) to head (6b35fcc).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #218      +/-   ##
==========================================
+ Coverage   77.65%   78.90%   +1.24%     
==========================================
  Files          38       36       -2     
  Lines        2721     2607     -114     
==========================================
- Hits         2113     2057      -56     
+ Misses        608      550      -58     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@NguyenHoangSon96

Copy link
Copy Markdown
Contributor Author

Hi @alespour ,
My #217 could take forerver to finish so I moved your fixs to here so this fix will be available in main
branch ASAP.

@alespour alespour left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@NguyenHoangSon96 NguyenHoangSon96 merged commit e36d3d7 into main Jun 19, 2026
24 checks passed
@NguyenHoangSon96 NguyenHoangSon96 deleted the test/fix-partial-writes-test branch June 19, 2026 07:01
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.

3 participants