From 461cfd645fb62c4262a487095b70df1bc8ec64f3 Mon Sep 17 00:00:00 2001 From: Matt Kocubinski Date: Wed, 10 Aug 2022 09:52:40 -0500 Subject: [PATCH] Fix flaky appconfig test (#12891) --- core/internal/testpb/modules.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/internal/testpb/modules.go b/core/internal/testpb/modules.go index 52e8b6bb1f56..c554ad73e236 100644 --- a/core/internal/testpb/modules.go +++ b/core/internal/testpb/modules.go @@ -35,6 +35,10 @@ func provideStoreKey(key depinject.ModuleKey, state *runtimeState) StoreKey { func provideApp(state *runtimeState, handlers map[string]Handler) App { return func(w io.Writer) { + sort.Slice(state.storeKeys, func(i, j int) bool { + return state.storeKeys[i].name < state.storeKeys[j].name + }) + for _, key := range state.storeKeys { _, _ = fmt.Fprintf(w, "got store key %s\n", key.name) }