storagenode/piecestore: fix TestUpload
The test needs to wait for the upload information to be saved to the database. Fixes https://github.com/storj/storj/issues/6008 Change-Id: I1f258c923a4b33cbc571f97bad046cec70642a0b
This commit is contained in:
parent
0ca7d19fc7
commit
2463b881c6
@ -72,6 +72,8 @@ func TestUploadAndPartialDownload(t *testing.T) {
|
||||
}()
|
||||
}
|
||||
|
||||
require.NoError(t, planet.WaitForStorageNodeEndpoints(ctx))
|
||||
|
||||
var totalBandwidthUsage bandwidth.Usage
|
||||
for _, storagenode := range planet.StorageNodes {
|
||||
usage, err := storagenode.DB.Bandwidth().Summary(ctx, time.Now().Add(-10*time.Hour), time.Now().Add(10*time.Hour))
|
||||
@ -191,6 +193,8 @@ func TestUpload(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
require.NoError(t, planet.WaitForStorageNodeEndpoints(ctx))
|
||||
|
||||
from, to := date.MonthBoundary(time.Now().UTC())
|
||||
summary, err := planet.StorageNodes[0].DB.Bandwidth().SatelliteIngressSummary(ctx, planet.Satellites[0].ID(), from, to)
|
||||
require.NoError(t, err)
|
||||
|
Loading…
Reference in New Issue
Block a user