Skip to content

Commit

Permalink
Set secondary sort for flaky test
Browse files Browse the repository at this point in the history
  • Loading branch information
purplesmoke05 committed Oct 31, 2024
1 parent 6c07d49 commit 4b35259
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/routers/issuer/settlement_issuer.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,8 @@ async def list_all_dvp_deliveries(
stmt = stmt.order_by(IDXDelivery.create_blocktimestamp)
else: # DESC
stmt = stmt.order_by(desc(IDXDelivery.create_blocktimestamp))
# NOTE: Set secondary sort for consistent results
stmt = stmt.order_by(IDXDelivery.delivery_id)

# Pagination
if request_query.limit is not None:
Expand Down
2 changes: 2 additions & 0 deletions app/routers/misc/settlement_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,8 @@ async def list_all_dvp_agent_deliveries(
stmt = stmt.order_by(IDXDelivery.create_blocktimestamp)
else: # DESC
stmt = stmt.order_by(desc(IDXDelivery.create_blocktimestamp))
# NOTE: Set secondary sort for consistent results
stmt = stmt.order_by(IDXDelivery.delivery_id)

# Pagination
if request_query.limit is not None:
Expand Down

0 comments on commit 4b35259

Please sign in to comment.