Skip to content

Conversation

@NguyenHoangSon96
Copy link
Contributor

@NguyenHoangSon96 NguyenHoangSon96 commented Apr 10, 2025

Closes Issue

Proposed Changes

  • This test case "test_write_polars_batching" will sometimes throw an error because the post_write() wasn't called when the mock test was run. The batching process is asynchronous.

  • I changed self.client._write_api._write_service.post_write.call_args[1]['body'] to assert_called_once_with() because the error thrown by this method is clearer.

  • I use this script to test test_write_polars_batching() automatically
    auto_test.txt

Before the fix
Screenshot 2025-04-10 at 15 44 50

After the fix
Screenshot 2025-04-10 at 15 46 54

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 Apr 10, 2025
@NguyenHoangSon96 NguyenHoangSon96 linked an issue Apr 10, 2025 that may be closed by this pull request
@codecov
Copy link

codecov bot commented Apr 10, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 61.92%. Comparing base (4317ade) to head (981ec4e).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #126   +/-   ##
=======================================
  Coverage   61.92%   61.92%           
=======================================
  Files          33       33           
  Lines        2135     2135           
=======================================
  Hits         1322     1322           
  Misses        813      813           

☔ View full report in Codecov by Sentry.
📢 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.

Copy link
Contributor

@jansimonb jansimonb left a comment

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 70f42dd into main Apr 14, 2025
24 checks passed
@NguyenHoangSon96 NguyenHoangSon96 deleted the fix/flaky-test branch April 14, 2025 09:18
@karel-rehor karel-rehor added this to the 0.13.0 milestone May 20, 2025
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.

tests: Flakey test - test_write_polars_batching

4 participants