From e79871adfb7bb852434534f4182e4a822a571589 Mon Sep 17 00:00:00 2001 From: Geoffrey Ragot Date: Thu, 14 Nov 2024 18:01:39 +0100 Subject: [PATCH] fix: flaky test (account ordering not specified) --- internal/storage/ledger/volumes.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/storage/ledger/volumes.go b/internal/storage/ledger/volumes.go index a7a259aa0..aa8806108 100644 --- a/internal/storage/ledger/volumes.go +++ b/internal/storage/ledger/volumes.go @@ -114,7 +114,8 @@ func (s *Store) selectVolumes(oot, pit *time.Time, useInsertionDate bool, groupL ColumnExpr("sum(case when not is_source then amount else -amount end) as balance"). ModelTableExpr(s.GetPrefixedRelationName("moves")). Where("ledger = ?", s.ledger.Name). - GroupExpr("accounts_address, asset") + GroupExpr("accounts_address, asset"). + Order("accounts_address", "asset") dateFilterColumn := "effective_date" if useInsertionDate {