satellite/gracefulexit: fix test DeleteAllFinishedTransferQueueItems

Using random piece num may generate the exact same key or piecenum.
Instead use fixed piecenum and key.

Change-Id: I54b7bc1a6698149bf99608dd46501ea963cec084
This commit is contained in:
Egon Elbre 2021-02-19 18:15:22 +02:00
parent 62a2d05ae6
commit 630718c392

View File

@ -162,8 +162,8 @@ func generateTransferQueueItems(t *testing.T, nodes []*testplanet.StorageNode) (
)
for i, item := range items {
item.NodeID = getNodeID()
item.Key = metabase.SegmentKey{byte(rand.Int31n(256))}
item.PieceNum = rand.Int31()
item.Key = metabase.SegmentKey{byte(i)}
item.PieceNum = int32(i + 1)
items[i] = item
nodesItems[item.NodeID]++
}