From 1bc94071f25b3ec4c5d1039a9516ab13c0c6e85d Mon Sep 17 00:00:00 2001 From: Paco Aranda Date: Mon, 17 Feb 2025 11:39:58 +0100 Subject: [PATCH] add order when listing records in test (#5813) # Description **Type of change** - Bug fix (non-breaking change which fixes an issue) **How Has This Been Tested** **Checklist** - I added relevant documentation - I followed the style guidelines of this project - I did a self-review of my code - I made corresponding changes to the documentation - I confirm My changes generate no new warnings - I have added tests that prove my fix is effective or that my feature works - I have added relevant notes to the CHANGELOG.md file (See https://keepachangelog.com/) --- argilla-server/tests/unit/contexts/hub/test_hub_dataset.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/argilla-server/tests/unit/contexts/hub/test_hub_dataset.py b/argilla-server/tests/unit/contexts/hub/test_hub_dataset.py index f0453b4981..7037e70222 100644 --- a/argilla-server/tests/unit/contexts/hub/test_hub_dataset.py +++ b/argilla-server/tests/unit/contexts/hub/test_hub_dataset.py @@ -471,7 +471,7 @@ async def test_hub_dataset_import_to_idempotency_without_external_id( await hub_dataset.import_to(db, mock_search_engine, dataset) assert (await db.execute(select(func.count(Record.id)))).scalar_one() == 5 - records = (await db.execute(select(Record))).scalars().all() + records = (await db.execute(select(Record).order_by(Record.inserted_at.asc()))).scalars().all() assert [record.external_id for record in records] == ["train_0", "train_1", "train_2", "train_3", "train_4"] async def test_hub_dataset_import_to_idempotency_without_external_id_and_multiple_splits(