fix(container-test): batch create segment position sort (#25394)

This commit is contained in:
Novice 2025-09-09 13:47:29 +08:00 committed by GitHub
parent 7dfb72e381
commit 566e0fd3e5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 1 deletions

View File

@ -296,7 +296,12 @@ class TestBatchCreateSegmentToIndexTask:
from extensions.ext_database import db
# Check that segments were created
segments = db.session.query(DocumentSegment).filter_by(document_id=document.id).all()
segments = (
db.session.query(DocumentSegment)
.filter_by(document_id=document.id)
.order_by(DocumentSegment.position)
.all()
)
assert len(segments) == 3
# Verify segment content and metadata