Skip to content

test(milvus): cast exposed_port to str for substring assert - #1035

Closed
Tranquility2 wants to merge 1 commit into
mainfrom
fix/milvus-test-port-type
Closed

test(milvus): cast exposed_port to str for substring assert#1035
Tranquility2 wants to merge 1 commit into
mainfrom
fix/milvus-test-port-type

Conversation

@Tranquility2

Copy link
Copy Markdown
Contributor

Problem

test_run_milvus_success asserts:

asserturlandexposed_portinurl

get_exposed_port() returns int, so the in check against a string url raises:

TypeError: 'in <string>' requires string as left operand, not int

CI evidence: test (3.10|3.13|3.14, milvus) jobs fail this assertion for both v2.4.0 and v2.4.4.

Fix

Cast exposed_port to str before the substring check.

@codecov

codecovBot commented Jun 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.12%. Comparing base (be4c857) to head (a7df3d7).

Additional details and impacted files
@@ Coverage Diff @@## main #1035 +/- ##
==========================================
- Coverage 83.29% 83.12% -0.18% 
==========================================
Files 16 16 Lines 1754 1754 Branches 193 193 ==========================================
- Hits 1461 1458 -3 - Misses 236 240 +4 + Partials 57 56 -1 

☔ 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.

@Tranquility2

Copy link
Copy Markdown
ContributorAuthor

Superseded by the src-layout migration (#1045) and subsequent test fixes on main.
tests/community/milvus/test_milvus.py already does assert str(exposed_port) in url, which is the same fix proposed here.
Closing.

alexanderankin pushed a commit that referenced this pull request Jun 6, 2026
The repo currently has no `codecov.yml`, so Codecov uses its strict
defaults: any coverage drop (project) and any patch under 100% are
reported as failing statuses on PRs.
This produces frequent red checks on small refactors even when coverage
is unchanged or trivially impacted (e.g. #1035, #1038).
This change adds a minimal `codecov.yml` that keeps useful signal while
removing the noise:
- `coverage.status.project.default.threshold: 1%` — allow up to a 1%
project-coverage drop without failing.
- `coverage.status.project.default.if_ci_failed: success` — don't
double-report when the CI run itself failed.
- `coverage.status.patch.default.informational: true` — still report
patch coverage, but never block PRs on it.
- `comment.require_changes: true` — only post a PR comment when coverage
actually changes.
Validated with `curl --data-binary @codecov.yml
https://codecov.io/validate` → `Valid!`.
Real coverage regressions will still surface (anything > 1% project
drop), and contributors keep getting patch-coverage feedback — it just
won't block.
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@Tranquility2