Skip to content

Comments

fix/add test#1333

Merged
SAKURA-CAT merged 3 commits intomainfrom
fix/test
Nov 17, 2025
Merged

fix/add test#1333
SAKURA-CAT merged 3 commits intomainfrom
fix/test

Conversation

@SAKURA-CAT
Copy link
Member

添加了一些测试样例

Added unit tests for the trace_metrics function in test_upload.py, covering batching, pending state, and status code handling. Also updated the __all__ list in upload.py to include trace_metrics and MetricDict for proper module exports.
@SAKURA-CAT SAKURA-CAT requested a review from Zeyi-Lin November 9, 2025 11:07
@SAKURA-CAT SAKURA-CAT self-assigned this Nov 9, 2025
@SAKURA-CAT SAKURA-CAT added the 💪 enhancement New feature or request label Nov 9, 2025
@SAKURA-CAT SAKURA-CAT marked this pull request as draft November 9, 2025 12:27
Introduced a 1-second delay between batches when uploading metrics in trace_metrics to avoid potential server overload. Also updated DataPorter to remove unused LogModel import and changed _filter_log_by_epoch return type to bool.
Introduced timing checks in the test for batch metric uploads to ensure the process takes longer than 3 seconds, improving test coverage for upload duration.
@SAKURA-CAT SAKURA-CAT marked this pull request as ready for review November 17, 2025 12:17
@SAKURA-CAT SAKURA-CAT merged commit 88c6460 into main Nov 17, 2025
5 checks passed
@SAKURA-CAT SAKURA-CAT deleted the fix/test branch November 17, 2025 12:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

💪 enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants