From d016331dd4fa64c880d48f073c9cb36f4c89a08d Mon Sep 17 00:00:00 2001 From: Paschalis Tsilias Date: Fri, 16 Aug 2024 15:13:37 +0300 Subject: [PATCH] Fix misleading comments Signed-off-by: Paschalis Tsilias --- client/internal/httpsender_test.go | 4 ++-- client/internal/wsreceiver_test.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/client/internal/httpsender_test.go b/client/internal/httpsender_test.go index 37d7b095..3d07140b 100644 --- a/client/internal/httpsender_test.go +++ b/client/internal/httpsender_test.go @@ -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. @@ -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] diff --git a/client/internal/wsreceiver_test.go b/client/internal/wsreceiver_test.go index 15f032f8..a1c21dc7 100644 --- a/client/internal/wsreceiver_test.go +++ b/client/internal/wsreceiver_test.go @@ -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. @@ -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]