Skip to content

Commit

Permalink
chore: Clean up comments
Browse files Browse the repository at this point in the history
  • Loading branch information
viccon committed Dec 5, 2024
1 parent 5c85c53 commit f2a0c00
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions distribution_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ func TestDistributedStorage(t *testing.T) {
fetchObserver.AssertFetchCount(t, 1)
fetchObserver.Clear()

// The keys are written asynchonously, to the distributed storage.
// The keys are written asynchonously to the distributed storage.
time.Sleep(100 * time.Millisecond)
distributedStorage.assertRecord(t, key)
distributedStorage.assertGetCount(t, 1)
Expand All @@ -176,7 +176,7 @@ func TestDistributedStorage(t *testing.T) {
t.Errorf("expected valuekey1, got %s", res)
}

// The keys are written asynchonously, to the distributed storage.
// The keys are written asynchonously to the distributed storage.
time.Sleep(100 * time.Millisecond)
fetchObserver.AssertFetchCount(t, 1)
distributedStorage.assertGetCount(t, 2)
Expand Down Expand Up @@ -410,7 +410,7 @@ func TestDistributedStorageBatch(t *testing.T) {
fetchObserver.AssertFetchCount(t, 1)
fetchObserver.Clear()

// The keys are written asynchonously, to the distributed storage.
// The keys are written asynchonously to the distributed storage.
time.Sleep(100 * time.Millisecond)
distributedStorage.assertRecords(t, firstBatchOfIDs, keyFn)
distributedStorage.assertGetCount(t, 1)
Expand Down Expand Up @@ -443,7 +443,7 @@ func TestDistributedStorageBatch(t *testing.T) {
fetchObserver.AssertRequestedRecords(t, []string{"4", "5", "6"})
fetchObserver.AssertFetchCount(t, 2)

// The keys are written asynchonously, to the distributed storage.
// The keys are written asynchonously to the distributed storage.
time.Sleep(100 * time.Millisecond)
distributedStorage.assertRecords(t, secondBatchOfIDs, keyFn)
distributedStorage.assertGetCount(t, 2)
Expand Down Expand Up @@ -479,7 +479,7 @@ func TestDistributedStaleStorageBatch(t *testing.T) {
fetchObserver.AssertFetchCount(t, 1)
fetchObserver.Clear()

// The keys are written asynchonously, to the distributed storage.
// The keys are written asynchonously to the distributed storage.
time.Sleep(100 * time.Millisecond)
distributedStorage.assertRecords(t, firstBatchOfIDs, keyFn)
distributedStorage.assertGetCount(t, 1)
Expand Down Expand Up @@ -545,7 +545,7 @@ func TestDistributedStorageBatchDeletes(t *testing.T) {
fetchObserver.AssertFetchCount(t, 1)
fetchObserver.Clear()

// The keys are written asynchonously, to the distributed storage.
// The keys are written asynchonously to the distributed storage.
time.Sleep(100 * time.Millisecond)
distributedStorage.assertRecords(t, batchOfIDs, keyFn)
distributedStorage.assertGetCount(t, 1)
Expand Down Expand Up @@ -577,15 +577,15 @@ func TestDistributedStorageBatchDeletes(t *testing.T) {
fetchObserver.AssertRequestedRecords(t, batchOfIDs)
fetchObserver.AssertFetchCount(t, 2)

// The keys are written asynchonously, to the distributed storage.
// The keys are written asynchonously to the distributed storage.
time.Sleep(100 * time.Millisecond)
distributedStorage.assertRecords(t, []string{"1", "2"}, keyFn)
distributedStorage.assertGetCount(t, 2)
distributedStorage.assertSetCount(t, 2)
distributedStorage.assertDeleteCount(t, 1)
}

func TestDistributedStorageBatchConverstToMissingRecord(t *testing.T) {
func TestDistributedStorageBatchConvertsToMissingRecord(t *testing.T) {
t.Parallel()

staleDuration := time.Minute
Expand Down Expand Up @@ -614,7 +614,7 @@ func TestDistributedStorageBatchConverstToMissingRecord(t *testing.T) {
fetchObserver.AssertFetchCount(t, 1)
fetchObserver.Clear()

// The keys are written asynchonously, to the distributed storage.
// The keys are written asynchonously to the distributed storage.
time.Sleep(100 * time.Millisecond)
distributedStorage.assertRecords(t, batchOfIDs, keyFn)
distributedStorage.assertGetCount(t, 1)
Expand Down Expand Up @@ -647,7 +647,7 @@ func TestDistributedStorageBatchConverstToMissingRecord(t *testing.T) {
fetchObserver.AssertFetchCount(t, 2)
fetchObserver.Clear()

// The keys are written asynchonously, to the distributed storage.
// The keys are written asynchonously to the distributed storage.
time.Sleep(100 * time.Millisecond)
distributedStorage.assertRecords(t, []string{"1", "2"}, keyFn)
distributedStorage.assertGetCount(t, 2)
Expand All @@ -674,14 +674,14 @@ func TestDistributedStorageBatchConverstToMissingRecord(t *testing.T) {
fetchObserver.AssertRequestedRecords(t, batchOfIDs)
fetchObserver.AssertFetchCount(t, 3)

// The keys are written asynchonously, to the distributed storage.
// The keys are written asynchonously to the distributed storage.
time.Sleep(100 * time.Millisecond)
distributedStorage.assertRecords(t, batchOfIDs, keyFn)
distributedStorage.assertGetCount(t, 3)
distributedStorage.assertSetCount(t, 3)
distributedStorage.assertDeleteCount(t, 0)

// Make sure we get it from the distributed cache.
// Delete the ids to make sure that we get them from the distributed cache.
for _, id := range batchOfIDs {
c.Delete(keyFn(id))
}
Expand Down

0 comments on commit f2a0c00

Please sign in to comment.