daria-malkova commented on a change in pull request #16826:
URL: https://github.com/apache/beam/pull/16826#discussion_r806661190



##########
File path: playground/backend/internal/cache/local/local_cache_test.go
##########
@@ -540,3 +608,36 @@ func TestLocalCache_clearItems(t *testing.T) {
                })
        }
 }
+
+func TestNew(t *testing.T) {
+       items := make(map[uuid.UUID]map[cache.SubKey]interface{})
+       pipelinesExpiration := make(map[uuid.UUID]time.Time)
+       type args struct {
+               ctx context.Context
+       }
+       tests := []struct {
+               name string
+               args args
+               want *Cache
+       }{
+               {
+                       // Test case with calling New method.

Review comment:
       Redundant

##########
File path: playground/backend/internal/cache/local/local_cache_test.go
##########
@@ -429,6 +487,16 @@ func TestLocalCache_startGC(t *testing.T) {
                                pipelinesExpiration: preparedExpMap,
                        },
                },
+               {
+                       // Test case with calling startGC method with nil items.
+                       // As a result, items stay the same.
+                       name: "Checking for deleting expired pipelines with nil 
items",

Review comment:
       Not clear

##########
File path: playground/backend/internal/cache/redis/redis_cache_test.go
##########
@@ -243,6 +243,23 @@ func TestRedisCache_SetValue(t *testing.T) {
                        },
                        wantErr: false,
                },
+               {
+                       // Test case with calling SetValue method with 
incorrect value.

Review comment:
       Redundant

##########
File path: playground/backend/internal/cache/local/local_cache_test.go
##########
@@ -191,12 +230,31 @@ func TestLocalCache_SetExpTime(t *testing.T) {
                expTime    time.Duration
        }
        tests := []struct {
-               name   string
-               fields fields
-               args   args
+               name    string
+               fields  fields
+               args    args
+               wantErr bool
        }{
                {
+                       // Test case with calling SetExpTime method with 
pipelineId and his expiration time.

Review comment:
       Redundant

##########
File path: playground/backend/internal/cache/redis/redis_cache_test.go
##########
@@ -535,6 +555,28 @@ func Test_unmarshalBySubKey(t *testing.T) {
                        want:    output,
                        wantErr: false,
                },
+               {
+                       // Test case with calling unmarshalBySubKey method with 
Canceled subKey.
+                       // As a result, want to receive false.

Review comment:
       Why it will be false?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to