Skip to content
This repository has been archived by the owner on May 15, 2024. It is now read-only.

Commit

Permalink
fix: use rand reader instead of repeated byte pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
elijaharita committed Sep 19, 2023
1 parent 5deacc1 commit 6621ba9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion integration/singularity/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ func (l *SingularityStore) Start(ctx context.Context) error {
logger.Infof("Checking %v storage providers", len(l.storageProviders))
for _, sp := range l.storageProviders {
logger.Infof("Checking storage provider %s", sp)
var foundSchedule bool
var foundSchedule *models.ModelSchedule
logger := logger.With("provider", sp)
for _, schd := range listPreparationSchedulesRes.Payload {
scheduleAddr, err := address.NewFromString(schd.Provider)
Expand Down
10 changes: 4 additions & 6 deletions integration/test/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package test

import (
"bytes"
"crypto/rand"
"encoding/json"
"io"
"net/http"
Expand All @@ -19,12 +20,9 @@ import (
func TestRoundTripPutAndGet(t *testing.T) {
env := NewEnvironment(t)

buf := new(bytes.Buffer)
for i := 0; i < 10000000; i++ {
_, err := buf.Write([]byte("1234567890"))
require.NoError(t, err)
}
wantBlob := buf.Bytes()
wantBlob, err := io.ReadAll(io.LimitReader(rand.Reader, 10<<20))
require.NoError(t, err)
buf := bytes.NewBuffer(wantBlob)

var postBlobResp api.PostBlobResponse
{
Expand Down

0 comments on commit 6621ba9

Please sign in to comment.