From c3a5e672a05adc9013d03eab8c9bcac6878ff3bf Mon Sep 17 00:00:00 2001 From: worstell Date: Mon, 15 Apr 2024 18:16:42 -0400 Subject: [PATCH] fix: flaky error order in test (#1268) --- buildengine/build_test.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/buildengine/build_test.go b/buildengine/build_test.go index 9b973d175d..c7f4b85a78 100644 --- a/buildengine/build_test.go +++ b/buildengine/build_test.go @@ -73,6 +73,12 @@ func assertBuildProtoErrors(msgs ...string) assertion { } // normalize results + errs := make([]error, 0, len(errorList.Errors)) + for _, e := range errorList.Errors { + errs = append(errs, *e) + } + schema.SortErrorsByPosition(errs) + for _, e := range errorList.Errors { e.EndColumn = 0 }