From 44bf9bf903a71e590e92182d2f1201957b1ce59f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Magiera?= Date: Thu, 20 May 2021 10:39:00 +0200 Subject: [PATCH] tests: Better state logging in pledgeSectors --- api/test/window_post.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/api/test/window_post.go b/api/test/window_post.go index 48fe3fd6c..1e8090f11 100644 --- a/api/test/window_post.go +++ b/api/test/window_post.go @@ -247,12 +247,15 @@ func pledgeSectors(t *testing.T, ctx context.Context, miner TestStorageNode, n, toCheck[number] = struct{}{} } + for len(toCheck) > 0 { flushSealingBatches(t, ctx, miner) + states := map[api.SectorState]int{} for n := range toCheck { st, err := miner.SectorsStatus(ctx, n, false) require.NoError(t, err) + states[st.State]++ if st.State == api.SectorState(sealing.Proving) { delete(toCheck, n) } @@ -261,8 +264,9 @@ func pledgeSectors(t *testing.T, ctx context.Context, miner TestStorageNode, n, } } + build.Clock.Sleep(100 * time.Millisecond) - fmt.Printf("WaitSeal: %d\n", len(s)) + fmt.Printf("WaitSeal: %d %+v\n", len(s), states) } }