mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 02:42:27 +00:00
swarm/storage/localstore: adjust subscriptions tests delays and comments
This commit is contained in:
parent
c5e4c61385
commit
015d9775d4
2 changed files with 12 additions and 4 deletions
|
|
@ -65,9 +65,11 @@ func TestDB_SubscribePull(t *testing.T) {
|
|||
// upload some chunks just after subscribe
|
||||
uploadRandomChunksBin(t, db, uploader, addrs, &wantedChunksCount, 5)
|
||||
|
||||
time.Sleep(500 * time.Millisecond)
|
||||
time.Sleep(200 * time.Millisecond)
|
||||
|
||||
// upload some chunks after some short time
|
||||
// to ensure that subscription will include them
|
||||
// in a dynamic environment
|
||||
uploadRandomChunksBin(t, db, uploader, addrs, &wantedChunksCount, 3)
|
||||
|
||||
checkErrChan(ctx, t, errChan, wantedChunksCount)
|
||||
|
|
@ -117,9 +119,11 @@ func TestDB_SubscribePull_multiple(t *testing.T) {
|
|||
// upload some chunks just after subscribe
|
||||
uploadRandomChunksBin(t, db, uploader, addrs, &wantedChunksCount, 5)
|
||||
|
||||
time.Sleep(500 * time.Millisecond)
|
||||
time.Sleep(200 * time.Millisecond)
|
||||
|
||||
// upload some chunks after some short time
|
||||
// to ensure that subscription will include them
|
||||
// in a dynamic environment
|
||||
uploadRandomChunksBin(t, db, uploader, addrs, &wantedChunksCount, 3)
|
||||
|
||||
checkErrChan(ctx, t, errChan, wantedChunksCount*subsCount)
|
||||
|
|
|
|||
|
|
@ -96,9 +96,11 @@ func TestDB_SubscribePush(t *testing.T) {
|
|||
// upload some chunks just after subscribe
|
||||
uploadRandomChunks(5)
|
||||
|
||||
time.Sleep(500 * time.Millisecond)
|
||||
time.Sleep(200 * time.Millisecond)
|
||||
|
||||
// upload some chunks after some short time
|
||||
// to ensure that subscription will include them
|
||||
// in a dynamic environment
|
||||
uploadRandomChunks(3)
|
||||
|
||||
checkErrChan(ctx, t, errChan, len(chunks))
|
||||
|
|
@ -177,9 +179,11 @@ func TestDB_SubscribePush_multiple(t *testing.T) {
|
|||
// upload some chunks just after subscribe
|
||||
uploadRandomChunks(5)
|
||||
|
||||
time.Sleep(500 * time.Millisecond)
|
||||
time.Sleep(200 * time.Millisecond)
|
||||
|
||||
// upload some chunks after some short time
|
||||
// to ensure that subscription will include them
|
||||
// in a dynamic environment
|
||||
uploadRandomChunks(3)
|
||||
|
||||
// number of addresses received by all subscriptions
|
||||
|
|
|
|||
Loading…
Reference in a new issue