tests: Better state logging in pledgeSectors

This commit is contained in:
Łukasz Magiera 2021-05-20 10:39:00 +02:00
parent 51139361c7
commit 44bf9bf903

View File

@ -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)
}
}