Skip to content

Commit

Permalink
Fix misleading comments
Browse files Browse the repository at this point in the history
Signed-off-by: Paschalis Tsilias <paschalis.tsilias@grafana.com>
  • Loading branch information
tpaschalis committed Aug 16, 2024
1 parent 3a347a0 commit d016331
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions client/internal/httpsender_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ func TestPackageUpdatesInParallel(t *testing.T) {
blockSyncCh := make(chan struct{})
doneCh := make([]<-chan struct{}, 0)

// Use `ch` to simulate blocking behavior on the first call to Sync().
// Use `ch` to simulate blocking behavior on the second call to Sync().
// This will allow both Sync() calls to be called in parallel; we will
// first make sure that both are inflight before manually releasing the
// channel so that both go through in sequence.
Expand Down Expand Up @@ -284,7 +284,7 @@ func TestPackageUpdatesInParallel(t *testing.T) {
return messages.Load() == 2
}, 2*time.Second, 100*time.Millisecond, "both messages must have been processed successfully")

// Release the first Sync call so it can continue and wait for both of them to complete.
// Release the second Sync call so it can continue and wait for both of them to complete.
blockSyncCh <- struct{}{}
<-doneCh[0]
<-doneCh[1]
Expand Down
4 changes: 2 additions & 2 deletions client/internal/wsreceiver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ func TestWSPackageUpdatesInParallel(t *testing.T) {
doneCh := make([]<-chan struct{}, 0)
localPackageState := NewInMemPackagesStore()

// Use `ch` to simulate blocking behavior on the first call to Sync().
// Use `ch` to simulate blocking behavior on the second call to Sync().
// This will allow both Sync() calls to be called in parallel; we will
// first make sure that both are inflight before manually releasing the
// channel so that both go through in sequence.
Expand Down Expand Up @@ -292,7 +292,7 @@ func TestWSPackageUpdatesInParallel(t *testing.T) {
return messages.Load() == 2
}, 2*time.Second, 100*time.Millisecond, "both messages must have been processed successfully")

// Release the first Sync call so it can continue and wait for both of them to complete.
// Release the second Sync call so it can continue and wait for both of them to complete.
blockSyncCh <- struct{}{}
<-doneCh[0]
<-doneCh[1]
Expand Down

0 comments on commit d016331

Please sign in to comment.